[v2] net/dpaa2: fix Rx offload flags on jumbo MTU set

Message ID 20191111160857.12271-1-sachin.saxena@nxp.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series [v2] net/dpaa2: fix Rx offload flags on jumbo MTU set |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-compilation success Compile Testing PASS
ci/travis-robot success Travis build: passed
ci/iol-mellanox-Performance success Performance Testing PASS

Commit Message

Sachin Saxena Nov. 11, 2019, 4:08 p.m. UTC
  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 <sachin.saxena@nxp.com>
Reviewed-by: Gagandeep Singh <g.singh@nxp.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Ferruh Yigit Nov. 11, 2019, 4:33 p.m. UTC | #1
On 11/11/2019 4:08 PM, Sachin Saxena wrote:
> 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 <sachin.saxena@nxp.com>
> Reviewed-by: Gagandeep Singh <g.singh@nxp.com>

Applied to dpdk-next-net/master, thanks.
  

Patch

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 03131b903..6434a223b 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -1288,7 +1288,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 &=