net: thunderx: Support for upto 96 queues for a VF
[deliverable/linux.git] / drivers / net / ethernet / cavium / thunder / nic.h
index 89b997e07313881d419327cfdcac69256232e3b8..35b2ee1bc07edf645fb1952c8441a7c0080e856d 100644 (file)
@@ -258,13 +258,23 @@ struct nicvf_drv_stats {
 };
 
 struct nicvf {
+       struct nicvf            *pnicvf;
        struct net_device       *netdev;
        struct pci_dev          *pdev;
        u8                      vf_id;
        u8                      node;
-       u8                      tns_mode;
+       u8                      tns_mode:1;
+       u8                      sqs_mode:1;
        u16                     mtu;
        struct queue_set        *qs;
+#define        MAX_SQS_PER_VF_SINGLE_NODE              5
+#define        MAX_SQS_PER_VF                          11
+       u8                      sqs_id;
+       u8                      sqs_count; /* Secondary Qset count */
+       struct nicvf            *snicvf[MAX_SQS_PER_VF];
+       u8                      rx_queues;
+       u8                      tx_queues;
+       u8                      max_queues;
        void __iomem            *reg_base;
        bool                    link_up;
        u8                      duplex;
@@ -330,14 +340,19 @@ struct nicvf {
 #define        NIC_MBOX_MSG_RQ_SW_SYNC         0x0F    /* Flush inflight pkts to RQ */
 #define        NIC_MBOX_MSG_BGX_STATS          0x10    /* Get stats from BGX */
 #define        NIC_MBOX_MSG_BGX_LINK_CHANGE    0x11    /* BGX:LMAC link status */
-#define NIC_MBOX_MSG_CFG_DONE          0x12    /* VF configuration done */
-#define NIC_MBOX_MSG_SHUTDOWN          0x13    /* VF is being shutdown */
+#define        NIC_MBOX_MSG_ALLOC_SQS          0x12    /* Allocate secondary Qset */
+#define        NIC_MBOX_MSG_NICVF_PTR          0x13    /* Send nicvf ptr to PF */
+#define        NIC_MBOX_MSG_PNICVF_PTR         0x14    /* Get primary qset nicvf ptr */
+#define        NIC_MBOX_MSG_SNICVF_PTR         0x15    /* Send sqet nicvf ptr to PVF */
+#define        NIC_MBOX_MSG_CFG_DONE           0xF0    /* VF configuration done */
+#define        NIC_MBOX_MSG_SHUTDOWN           0xF1    /* VF is being shutdown */
 
 struct nic_cfg_msg {
        u8    msg;
        u8    vf_id;
-       u8    tns_mode;
        u8    node_id;
+       u8    tns_mode:1;
+       u8    sqs_mode:1;
        u8    mac_addr[ETH_ALEN];
 };
 
@@ -345,6 +360,7 @@ struct nic_cfg_msg {
 struct qs_cfg_msg {
        u8    msg;
        u8    num;
+       u8    sqs_count;
        u64   cfg;
 };
 
@@ -361,6 +377,7 @@ struct sq_cfg_msg {
        u8    msg;
        u8    qs_num;
        u8    sq_num;
+       bool  sqs_mode;
        u64   cfg;
 };
 
@@ -420,6 +437,21 @@ struct bgx_link_status {
        u32   speed;
 };
 
+/* Get Extra Qset IDs */
+struct sqs_alloc {
+       u8    msg;
+       u8    vf_id;
+       u8    qs_count;
+};
+
+struct nicvf_ptr {
+       u8    msg;
+       u8    vf_id;
+       bool  sqs_mode;
+       u8    sqs_id;
+       u64   nicvf;
+};
+
 /* 128 bit shared memory between PF and each VF */
 union nic_mbx {
        struct { u8 msg; }      msg;
@@ -434,6 +466,8 @@ union nic_mbx {
        struct rss_cfg_msg      rss_cfg;
        struct bgx_stats_msg    bgx_stats;
        struct bgx_link_status  link_status;
+       struct sqs_alloc        sqs_alloc;
+       struct nicvf_ptr        nicvf;
 };
 
 #define NIC_NODE_ID_MASK       0x03
This page took 0.026442 seconds and 5 git commands to generate.