]> git.droids-corp.org - dpdk.git/commitdiff
net/hns3: remove custom macro for minimum length
authorHuisong Li <lihuisong@huawei.com>
Sat, 21 Dec 2019 10:32:48 +0000 (18:32 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 17 Jan 2020 18:46:01 +0000 (19:46 +0100)
This patch replaces custom macro named HNS3_MIN_FRAME_LEN for ethernet
minimum frame length with the macro named RTE_ETHER_MIN_LEN that defined
in DPDK framework.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
drivers/net/hns3/hns3_ethdev.c
drivers/net/hns3/hns3_ethdev.h
drivers/net/hns3/hns3_rxtx.c

index fa0af847ad2e59c0d2c70a9a06ac24e6dc8c08d0..4ce9515a9285ff9a53f56315ec842e33105f7a21 100644 (file)
@@ -2148,7 +2148,7 @@ hns3_set_mac_mtu(struct hns3_hw *hw, uint16_t new_mps)
 
        req = (struct hns3_config_max_frm_size_cmd *)desc.data;
        req->max_frm_size = rte_cpu_to_le_16(new_mps);
-       req->min_frm_size = HNS3_MIN_FRAME_LEN;
+       req->min_frm_size = RTE_ETHER_MIN_LEN;
 
        return hns3_cmd_send(hw, &desc, 1);
 }
index 004cd75a9a102c1642a1d78afa010ab07da211ae..7422706a8ad1294d0a021c8914b1f3f3926891cd 100644 (file)
@@ -33,7 +33,6 @@
 #define HNS3_MAX_BD_SIZE               65535
 #define HNS3_MAX_TX_BD_PER_PKT         8
 #define HNS3_MAX_FRAME_LEN             9728
-#define HNS3_MIN_FRAME_LEN             64
 #define HNS3_VLAN_TAG_SIZE             4
 #define HNS3_DEFAULT_RX_BUF_LEN                2048
 
index e1bdba97220f4094efe2ac3ed95361e01b2e9116..d9219d123ad1224e80fe793195eeec7a6347ab1c 100644 (file)
@@ -1551,7 +1551,7 @@ hns3_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
                m = tx_pkts[i];
 
                /* check the size of packet */
-               if (m->pkt_len < HNS3_MIN_FRAME_LEN) {
+               if (m->pkt_len < RTE_ETHER_MIN_LEN) {
                        rte_errno = EINVAL;
                        return i;
                }