From: Sachin Saxena Date: Mon, 11 Nov 2019 16:08:57 +0000 (+0530) Subject: net/dpaa2: fix Rx offload flags on jumbo MTU set X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=0d20cda8a935d0df3c6e483422151705200907d0;p=dpdk.git net/dpaa2: fix Rx offload flags on jumbo MTU set The JUMBO frame handling in dpaa2_dev_mtu_set api was not correct. When frame_size is greater than RTE_ETHER_MAX_LEN, the intention is to add JUMBO flag in rx offload while it was resetting all other flags other than JUMBO as AND operator was used instead of OR. Fixes: 0ebce6129bc6 ("net/dpaa2: support new ethdev offload APIs") Cc: stable@dpdk.org Signed-off-by: Sachin Saxena Reviewed-by: Gagandeep Singh --- diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index eea31f2546..2cde55e7cc 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -1289,7 +1289,7 @@ dpaa2_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) return -EINVAL; if (frame_size > RTE_ETHER_MAX_LEN) - dev->data->dev_conf.rxmode.offloads &= + dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME; else dev->data->dev_conf.rxmode.offloads &=