patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Sachin Saxena <sachin.saxena@nxp.com>
To: dev@dpdk.org, ferruh.yigit@intel.com, thomas@monjalon.net
Cc: stable@dpdk.org, Sachin Saxena <sachin.saxena@nxp.com>
Subject: [dpdk-stable] [PATCH v2] net/dpaa2: fix Rx offload flags on jumbo MTU set
Date: Mon, 11 Nov 2019 21:38:57 +0530	[thread overview]
Message-ID: <20191111160857.12271-1-sachin.saxena@nxp.com> (raw)
In-Reply-To: <20191111153614.12079-1-sachin.saxena@nxp.com>

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(-)

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 &=
-- 
2.17.1


  parent reply	other threads:[~2019-11-11 16:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11 15:36 [dpdk-stable] [PATCH v1] net/dpaa2: fixes issue of accidentally resetting rx offloads flags Sachin Saxena
2019-11-11 15:57 ` Thomas Monjalon
2019-11-11 16:05   ` Sachin Saxena
2019-11-11 16:08 ` Sachin Saxena [this message]
2019-11-11 16:33   ` [dpdk-stable] [PATCH v2] net/dpaa2: fix Rx offload flags on jumbo MTU set Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191111160857.12271-1-sachin.saxena@nxp.com \
    --to=sachin.saxena@nxp.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).