DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] net/dpaa2: fixes issue of accidentally resetting rx offloads flags
@ 2019-11-11 15:36 Sachin Saxena
  2019-11-11 15:57 ` Thomas Monjalon
  2019-11-11 16:08 ` [dpdk-dev] [PATCH v2] net/dpaa2: fix Rx offload flags on jumbo MTU set Sachin Saxena
  0 siblings, 2 replies; 5+ messages in thread
From: Sachin Saxena @ 2019-11-11 15:36 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: stable, thomas, Sachin Saxena

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH v1] net/dpaa2: fixes issue of accidentally resetting rx offloads flags
  2019-11-11 15:36 [dpdk-dev] [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 ` [dpdk-dev] [PATCH v2] net/dpaa2: fix Rx offload flags on jumbo MTU set Sachin Saxena
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Monjalon @ 2019-11-11 15:57 UTC (permalink / raw)
  To: Sachin Saxena; +Cc: dev, ferruh.yigit, stable

11/11/2019 16:36, Sachin Saxena:
> 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.

Hi,
About the title of this patch:
- "fixes" should be "fix" (infinitive verb)
- "issue" is not needed after "fix"
- we don't care whether it is "accidentally resetting"
You should just tell what is fixed and what is the case:
	fix Rx offload flags on jumbo MTU set



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH v1] net/dpaa2: fixes issue of accidentally resetting rx offloads flags
  2019-11-11 15:57 ` Thomas Monjalon
@ 2019-11-11 16:05   ` Sachin Saxena
  0 siblings, 0 replies; 5+ messages in thread
From: Sachin Saxena @ 2019-11-11 16:05 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, ferruh.yigit, stable


> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Monday, November 11, 2019 9:27 PM
> To: Sachin Saxena <sachin.saxena@nxp.com>
> Cc: dev@dpdk.org; ferruh.yigit@intel.com; stable@dpdk.org
> Subject: Re: [PATCH v1] net/dpaa2: fixes issue of accidentally resetting rx
> offloads flags
> 
> 11/11/2019 16:36, Sachin Saxena:
> > 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.
> 
> Hi,
> About the title of this patch:
> - "fixes" should be "fix" (infinitive verb)
> - "issue" is not needed after "fix"
> - we don't care whether it is "accidentally resetting"
> You should just tell what is fixed and what is the case:
> 	fix Rx offload flags on jumbo MTU set
> 
[Sachin Saxena] Thanks for information. I got your point.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-dev] [PATCH v2] net/dpaa2: fix Rx offload flags on jumbo MTU set
  2019-11-11 15:36 [dpdk-dev] [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:08 ` Sachin Saxena
  2019-11-11 16:33   ` Ferruh Yigit
  1 sibling, 1 reply; 5+ messages in thread
From: Sachin Saxena @ 2019-11-11 16:08 UTC (permalink / raw)
  To: dev, ferruh.yigit, thomas; +Cc: stable, Sachin Saxena

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/dpaa2: fix Rx offload flags on jumbo MTU set
  2019-11-11 16:08 ` [dpdk-dev] [PATCH v2] net/dpaa2: fix Rx offload flags on jumbo MTU set Sachin Saxena
@ 2019-11-11 16:33   ` Ferruh Yigit
  0 siblings, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2019-11-11 16:33 UTC (permalink / raw)
  To: Sachin Saxena, dev, thomas; +Cc: stable

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-11-11 16:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-11 15:36 [dpdk-dev] [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 ` [dpdk-dev] [PATCH v2] net/dpaa2: fix Rx offload flags on jumbo MTU set Sachin Saxena
2019-11-11 16:33   ` Ferruh Yigit

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