net/qede: free packets in bulk
[dpdk.git] / drivers / net / hns3 / hns3_ethdev.h
index f69e2d8..ac255a3 100644 (file)
@@ -47,6 +47,9 @@
 #define HNS3_UNLIMIT_PROMISC_MODE       0
 #define HNS3_LIMIT_PROMISC_MODE         1
 
+#define HNS3_SPECIAL_PORT_SW_CKSUM_MODE         0
+#define HNS3_SPECIAL_PORT_HW_CKSUM_MODE         1
+
 #define HNS3_UC_MACADDR_NUM            128
 #define HNS3_VF_UC_MACADDR_NUM         48
 #define HNS3_MC_MACADDR_NUM            128
@@ -567,6 +570,22 @@ struct hns3_hw {
        uint8_t drop_stats_mode;
 
        uint8_t max_non_tso_bd_num; /* max BD number of one non-TSO packet */
+       /*
+        * udp checksum mode.
+        * value range:
+        *      HNS3_SPECIAL_PORT_HW_CKSUM_MODE/HNS3_SPECIAL_PORT_SW_CKSUM_MODE
+        *
+        *  - HNS3_SPECIAL_PORT_SW_CKSUM_MODE
+        *     In this mode, HW can not do checksum for special UDP port like
+        *     4789, 4790, 6081 for non-tunnel UDP packets and UDP tunnel
+        *     packets without the PKT_TX_TUNEL_MASK in the mbuf. So, PMD need
+        *     do the checksum for these packets to avoid a checksum error.
+        *
+        *  - HNS3_SPECIAL_PORT_HW_CKSUM_MODE
+        *     In this mode, HW does not have the preceding problems and can
+        *     directly calculate the checksum of these UDP packets.
+        */
+       uint8_t udp_cksum_mode;
 
        struct hns3_port_base_vlan_config port_base_vlan_cfg;
        /*
@@ -968,9 +987,8 @@ hns3_test_and_clear_bit(unsigned int nr, volatile uint64_t *addr)
 }
 
 int hns3_buffer_alloc(struct hns3_hw *hw);
-int hns3_dev_filter_ctrl(struct rte_eth_dev *dev,
-                        enum rte_filter_type filter_type,
-                        enum rte_filter_op filter_op, void *arg);
+int hns3_dev_flow_ops_get(struct rte_eth_dev *dev,
+                         const struct rte_flow_ops **ops);
 bool hns3_is_reset_pending(struct hns3_adapter *hns);
 bool hns3vf_is_reset_pending(struct hns3_adapter *hns);
 void hns3_update_link_status_and_event(struct hns3_hw *hw);