net/mlx5: fix using flow tunnel before null check
[dpdk.git] / drivers / net / hns3 / hns3_rxtx.h
index f9b3048..6689397 100644 (file)
@@ -464,6 +464,22 @@ struct hns3_tx_queue {
         *     not need to recalculate it.
         */
        uint8_t tso_mode;
+       /*
+        * 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;
        /*
         * The minimum length of the packet supported by hardware in the Tx
         * direction.