net/af_packet: remove timestamp from packet status
[dpdk.git] / drivers / net / hinic / hinic_pmd_ethdev.h
index 77b4b91..8f1b3d5 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <rte_ethdev.h>
 #include <rte_ethdev_core.h>
+#include <ethdev_driver.h>
 
 #include "base/hinic_compat.h"
 #include "base/hinic_pmd_cfg.h"
 #define HINIC_UINT32_BIT_SIZE      (CHAR_BIT * sizeof(uint32_t))
 #define HINIC_VFTA_SIZE            (4096 / HINIC_UINT32_BIT_SIZE)
 
+#define HINIC_MAX_MTU_SIZE              9600
+#define HINIC_MIN_MTU_SIZE              256
+
+#define HINIC_VLAN_TAG_SIZE             4
+#define HINIC_ETH_OVERHEAD \
+       (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + HINIC_VLAN_TAG_SIZE * 2)
+
+#define HINIC_MIN_FRAME_SIZE        (HINIC_MIN_MTU_SIZE + HINIC_ETH_OVERHEAD)
+#define HINIC_MAX_JUMBO_FRAME_SIZE  (HINIC_MAX_MTU_SIZE + HINIC_ETH_OVERHEAD)
+
+#define HINIC_MTU_TO_PKTLEN(mtu)    ((mtu) + HINIC_ETH_OVERHEAD)
+
+#define HINIC_PKTLEN_TO_MTU(pktlen) ((pktlen) - HINIC_ETH_OVERHEAD)
+
+/* The max frame size with default MTU */
+#define HINIC_ETH_MAX_LEN           (RTE_ETHER_MTU + HINIC_ETH_OVERHEAD)
+
 enum hinic_dev_status {
        HINIC_DEV_INIT,
        HINIC_DEV_CLOSE,
@@ -329,6 +347,7 @@ struct hinic_nic_dev {
        unsigned int flags;
        struct nic_service_cap nic_cap;
        u32 rx_mode_status;     /* promisc or allmulticast */
+       pthread_mutex_t rx_mode_mutex;
        u32 dev_status;
 
        char proc_dev_name[HINIC_DEV_NAME_LEN];