net/hinic: fix MTU consistency with firmware
authorGuoyang Zhou <zhouguoyang@huawei.com>
Fri, 16 Jul 2021 09:54:30 +0000 (17:54 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 23 Jul 2021 13:37:17 +0000 (15:37 +0200)
commit3596d7b607831205048efcf818e451526f6c9598
tree9a9d4b50676ecfe37758a0be8f7348e4220fe177
parent68fa836d0ff83229e1404f1274c90e1bff2475c8
net/hinic: fix MTU consistency with firmware

The configuration of MTU is inconsistent in the driver and
firmware when the port is stopped, started and reconfigured.
Before, HINIC_MAX_JUMBO_FRAME_SIZE include VLAN tag, but when
frame and pktlen are converted to each other do not include
VLAN tag. And port_mtu_set function will use HINIC_MAX_JUMBO_FRAME_SIZE
to calculate eth_overhead, so MTU will be inconsistent in the driver and
firmware.

Fixes: e542ab51ab27 ("net/hinic: fix jumbo frame flag condition for MTU set")
Cc: stable@dpdk.org
Signed-off-by: Guoyang Zhou <zhouguoyang@huawei.com>
drivers/net/hinic/base/hinic_pmd_niccfg.h
drivers/net/hinic/hinic_pmd_ethdev.c
drivers/net/hinic/hinic_pmd_ethdev.h