enic: fix port id in received mbufs
[dpdk.git] / lib / librte_pmd_enic / enic.h
index f128e64..0eba334 100644 (file)
@@ -66,9 +66,9 @@
 #define ENIC_CALC_IP_CKSUM      1
 #define ENIC_CALC_TCP_UDP_CKSUM 2
 #define ENIC_MAX_MTU            9000
-#define PAGE_SIZE               4096
+#define ENIC_PAGE_SIZE          4096
 #define PAGE_ROUND_UP(x) \
-       ((((unsigned long)(x)) + PAGE_SIZE-1) & (~(PAGE_SIZE-1)))
+       ((((unsigned long)(x)) + ENIC_PAGE_SIZE-1) & (~(ENIC_PAGE_SIZE-1)))
 
 #define ENICPMD_VFIO_PATH          "/dev/vfio/vfio"
 /*#define ENIC_DESC_COUNT_MAKE_ODD (x) do{if ((~(x)) & 1) { (x)--; } }while(0)*/
@@ -99,6 +99,7 @@ struct enic {
        struct vnic_dev_bar bar0;
        struct vnic_dev *vdev;
 
+       unsigned int port_id;
        struct rte_eth_dev *rte_dev;
        struct enic_fdir fdir;
        char bdf_name[ENICPMD_BDF_LENGTH];
@@ -110,7 +111,7 @@ struct enic {
        pthread_t err_intr_thread;
        int promisc;
        int allmulti;
-       int ig_vlan_strip_en;
+       uint8_t ig_vlan_strip_en;
        int link_status;
        u8 hw_ip_checksum;
 
@@ -134,7 +135,7 @@ struct enic {
        unsigned int intr_count;
 };
 
-static inline unsigned int enic_cq_rq(struct enic *enic, unsigned int rq)
+static inline unsigned int enic_cq_rq(__rte_unused struct enic *enic, unsigned int rq)
 {
        return rq;
 }
@@ -144,7 +145,7 @@ static inline unsigned int enic_cq_wq(struct enic *enic, unsigned int wq)
        return enic->rq_count + wq;
 }
 
-static inline unsigned int enic_msix_err_intr(struct enic *enic)
+static inline unsigned int enic_msix_err_intr(__rte_unused struct enic *enic)
 {
        return 0;
 }