Hi, > -----Original Message----- > From: Steve Yang <[email protected]> > Sent: Thursday, December 17, 2020 17:23 > To: [email protected] > Cc: Lu, Wenzhuo <[email protected]>; Xing, Beilei > <[email protected]>; Iremonger, Bernard > <[email protected]>; [email protected]; > [email protected]; [email protected]; > [email protected]; Guo, Jia <[email protected]>; Wang, Haiyue > <[email protected]>; [email protected]; [email protected]; > [email protected]; [email protected]; > [email protected]; [email protected]; > [email protected]; [email protected]; Wu, Jingjing > <[email protected]>; Yang, Qiming <[email protected]>; Zhang, Qi > Z <[email protected]>; Xu, Rosen <[email protected]>; > [email protected]; [email protected]; > [email protected]; [email protected]; [email protected]; > [email protected]; [email protected]; > [email protected]; [email protected]; > [email protected]; [email protected]; > [email protected]; Yigit, Ferruh <[email protected]>; > [email protected]; Ananyev, Konstantin > <[email protected]>; [email protected]; > [email protected]; [email protected]; > [email protected]; [email protected]; > [email protected]; [email protected]; [email protected]; > [email protected]; [email protected]; [email protected]; > [email protected]; Zhang, Helin <[email protected]>; > [email protected]; [email protected]; Xu, Ting > <[email protected]>; Li, Xiaoyun <[email protected]>; Wei, Dan > <[email protected]>; Pei, Andy <[email protected]>; > [email protected]; [email protected]; [email protected]; > Richardson, Bruce <[email protected]>; [email protected]; > [email protected]; [email protected]; > [email protected]; Zhao1, Wei <[email protected]>; > Jiang, JunyuX <[email protected]>; [email protected]; > [email protected]; [email protected]; > [email protected]; Yang, SteveX <[email protected]> > Subject: [PATCH v2 10/22] net/ipn3ke: fix the jumbo frame flag condition for > mtu set > > The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition, > but the Ether overhead is larger than 18 when it supports dual VLAN tags. > That will cause the jumbo flag rx offload is wrong when MTU size is > 'RTE_ETHER_MTU'. > > This fix will change the boundary condition with 'RTE_ETHER_MTU' and > overhead. > > Fixes: 70d6b7f550f4 ("net/ipn3ke: add representor") > > Signed-off-by: Steve Yang <[email protected]> > --- > drivers/net/ipn3ke/ipn3ke_ethdev.h | 1 + > drivers/net/ipn3ke/ipn3ke_representor.c | 2 +- > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.h > b/drivers/net/ipn3ke/ipn3ke_ethdev.h > index 9b0cf309c8..a6815a9cca 100644 > --- a/drivers/net/ipn3ke/ipn3ke_ethdev.h > +++ b/drivers/net/ipn3ke/ipn3ke_ethdev.h > @@ -640,6 +640,7 @@ ipn3ke_tm_ops_get(struct rte_eth_dev *ethdev, > */ > #define IPN3KE_ETH_OVERHEAD \ > (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + > IPN3KE_VLAN_TAG_SIZE * 2) > +#define IPN3KE_ETH_MAX_LEN (RTE_ETHER_MTU + > IPN3KE_ETH_OVERHEAD) > > #define IPN3KE_MAC_FRAME_SIZE_MAX 9728 > #define IPN3KE_MAC_RX_FRAME_MAXLENGTH 0x00AE > diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c > b/drivers/net/ipn3ke/ipn3ke_representor.c > index 8a53602576..9e15cce34f 100644 > --- a/drivers/net/ipn3ke/ipn3ke_representor.c > +++ b/drivers/net/ipn3ke/ipn3ke_representor.c > @@ -2801,7 +2801,7 @@ ipn3ke_rpst_mtu_set(struct rte_eth_dev *ethdev, > uint16_t mtu) > return -EBUSY; > } > > - if (frame_size > RTE_ETHER_MAX_LEN) > + if (frame_size > IPN3KE_ETH_MAX_LEN) > dev_data->dev_conf.rxmode.offloads |= > (uint64_t)(DEV_RX_OFFLOAD_JUMBO_FRAME); > else > -- > 2.17.1
Reviewed-by: Rosen Xu <[email protected]>

