DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] net/enic: fix hardcoding of some flow director masks
@ 2017-02-03  9:54 John Daley
  2017-02-03  9:54 ` [dpdk-dev] [PATCH 2/2] net/enic: fix flow director IPv6 traffic class specification John Daley
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: John Daley @ 2017-02-03  9:54 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, John Daley, stable

Hard coded mask values were being used for several of the IPv4 and IPv6
fields. Use the values in the rte_eth_fdir_masks structure provided by the
caller.

Fixes: dfbd6a9cb504 ("net/enic: extend flow director support for 1300 series")

Cc: stable@dpdk.org
Signed-off-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/enic_clsf.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/enic/enic_clsf.c b/drivers/net/enic/enic_clsf.c
index bcf479a..c2218fe 100644
--- a/drivers/net/enic/enic_clsf.c
+++ b/drivers/net/enic/enic_clsf.c
@@ -211,15 +211,15 @@ copy_fltr_v2(struct filter_v2 *fltr, struct rte_eth_fdir_input *input,
 		memset(&ip4_val, 0, sizeof(struct ipv4_hdr));
 
 		if (input->flow.ip4_flow.tos) {
-			ip4_mask.type_of_service = 0xff;
+			ip4_mask.type_of_service = masks->ipv4_mask.tos;
 			ip4_val.type_of_service = input->flow.ip4_flow.tos;
 		}
 		if (input->flow.ip4_flow.ttl) {
-			ip4_mask.time_to_live = 0xff;
+			ip4_mask.time_to_live = masks->ipv4_mask.ttl;
 			ip4_val.time_to_live = input->flow.ip4_flow.ttl;
 		}
 		if (input->flow.ip4_flow.proto) {
-			ip4_mask.next_proto_id = 0xff;
+			ip4_mask.next_proto_id = masks->ipv4_mask.proto;
 			ip4_val.next_proto_id = input->flow.ip4_flow.proto;
 		}
 		if (input->flow.ip4_flow.src_ip) {
@@ -299,7 +299,7 @@ copy_fltr_v2(struct filter_v2 *fltr, struct rte_eth_fdir_input *input,
 		memset(&ipv6_val, 0, sizeof(struct ipv6_hdr));
 
 		if (input->flow.ipv6_flow.proto) {
-			ipv6_mask.proto = 0xff;
+			ipv6_mask.proto = masks->ipv6_mask.proto;
 			ipv6_val.proto = input->flow.ipv6_flow.proto;
 		}
 		for (i = 0; i < 4; i++) {
@@ -315,11 +315,11 @@ copy_fltr_v2(struct filter_v2 *fltr, struct rte_eth_fdir_input *input,
 					input->flow.ipv6_flow.dst_ip[i];
 		}
 		if (input->flow.ipv6_flow.tc) {
-			ipv6_mask.vtc_flow = 0x00ff0000;
+			ipv6_mask.vtc_flow = masks->ipv6_mask.tc << 16);
 			ipv6_val.vtc_flow = input->flow.ipv6_flow.tc << 16;
 		}
 		if (input->flow.ipv6_flow.hop_limits) {
-			ipv6_mask.hop_limits = 0xff;
+			ipv6_mask.hop_limits = masks->ipv6_mask.hop_limits;
 			ipv6_val.hop_limits = input->flow.ipv6_flow.hop_limits;
 		}
 
-- 
2.10.0

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

* [dpdk-dev] [PATCH 2/2] net/enic: fix flow director IPv6 traffic class specification
  2017-02-03  9:54 [dpdk-dev] [PATCH 1/2] net/enic: fix hardcoding of some flow director masks John Daley
@ 2017-02-03  9:54 ` John Daley
  2017-02-03 22:54 ` [dpdk-dev] [PATCH 1/2] net/enic: fix hardcoding of some flow director masks Ferruh Yigit
  2017-02-09  0:40 ` [dpdk-dev] [PATCH v2] enic flow director fixes John Daley
  2 siblings, 0 replies; 11+ messages in thread
From: John Daley @ 2017-02-03  9:54 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, John Daley, stable

The wrong offset was being used to specify the mask and value for the IPv6
traffic class field for fdir. Also, since the 1 byte field is not byte
aligned in the header, do the shifting in big endian and then convert the
32-bit vtc_flow to little endian as expected by the adapter.

Fixes: dfbd6a9cb504 ("net/enic: extend flow director support for 1300 series")

Cc: stable@dpdk.org
Signed-off-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/enic_clsf.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/enic/enic_clsf.c b/drivers/net/enic/enic_clsf.c
index c2218fe..2665b6e 100644
--- a/drivers/net/enic/enic_clsf.c
+++ b/drivers/net/enic/enic_clsf.c
@@ -315,8 +315,10 @@ copy_fltr_v2(struct filter_v2 *fltr, struct rte_eth_fdir_input *input,
 					input->flow.ipv6_flow.dst_ip[i];
 		}
 		if (input->flow.ipv6_flow.tc) {
-			ipv6_mask.vtc_flow = masks->ipv6_mask.tc << 16);
-			ipv6_val.vtc_flow = input->flow.ipv6_flow.tc << 16;
+			ipv6_mask.vtc_flow = rte_be_to_cpu_32((uint32_t)
+					     masks->ipv6_mask.tc << 20);
+			ipv6_val.vtc_flow = rte_be_to_cpu_32((uint32_t)
+					    input->flow.ipv6_flow.tc << 20);
 		}
 		if (input->flow.ipv6_flow.hop_limits) {
 			ipv6_mask.hop_limits = masks->ipv6_mask.hop_limits;
-- 
2.10.0

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

* Re: [dpdk-dev] [PATCH 1/2] net/enic: fix hardcoding of some flow director masks
  2017-02-03  9:54 [dpdk-dev] [PATCH 1/2] net/enic: fix hardcoding of some flow director masks John Daley
  2017-02-03  9:54 ` [dpdk-dev] [PATCH 2/2] net/enic: fix flow director IPv6 traffic class specification John Daley
@ 2017-02-03 22:54 ` Ferruh Yigit
  2017-02-09  0:40 ` [dpdk-dev] [PATCH v2] enic flow director fixes John Daley
  2 siblings, 0 replies; 11+ messages in thread
From: Ferruh Yigit @ 2017-02-03 22:54 UTC (permalink / raw)
  To: John Daley; +Cc: dev, stable

On 2/3/2017 9:54 AM, John Daley wrote:
> Hard coded mask values were being used for several of the IPv4 and IPv6
> fields. Use the values in the rte_eth_fdir_masks structure provided by the
> caller.
> 
> Fixes: dfbd6a9cb504 ("net/enic: extend flow director support for 1300 series") 
> Cc: stable@dpdk.org

> Signed-off-by: John Daley <johndale@cisco.com>

Series applied to dpdk-next-net/master, thanks.

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

* [dpdk-dev] [PATCH v2] enic flow director fixes
  2017-02-03  9:54 [dpdk-dev] [PATCH 1/2] net/enic: fix hardcoding of some flow director masks John Daley
  2017-02-03  9:54 ` [dpdk-dev] [PATCH 2/2] net/enic: fix flow director IPv6 traffic class specification John Daley
  2017-02-03 22:54 ` [dpdk-dev] [PATCH 1/2] net/enic: fix hardcoding of some flow director masks Ferruh Yigit
@ 2017-02-09  0:40 ` John Daley
  2017-02-09  0:40   ` [dpdk-dev] [PATCH v2] net/enic: fix hardcoding of some flow director masks John Daley
  2017-02-09 12:15   ` [dpdk-dev] [PATCH v2] enic flow director fixes Ferruh Yigit
  2 siblings, 2 replies; 11+ messages in thread
From: John Daley @ 2017-02-09  0:40 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, John Daley

This should replace
http://www.dpdk.org/dev/patchwork/patch/20147/ which was an intermediate patch
in a small patchset and had a compile error. Also, please reject the 2nd patch
in the patchset http://www.dpdk.org/dev/patchwork/patch/20148/ which is
incomplete. I will change the state of these patches in patchworks.
thank you, john

John Daley (1):
  net/enic: fix hardcoding of some flow director masks

 drivers/net/enic/enic_clsf.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

-- 
2.10.0

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

* [dpdk-dev] [PATCH v2] net/enic: fix hardcoding of some flow director masks
  2017-02-09  0:40 ` [dpdk-dev] [PATCH v2] enic flow director fixes John Daley
@ 2017-02-09  0:40   ` John Daley
  2017-02-09 10:16     ` Ferruh Yigit
  2017-02-09 12:21     ` Ferruh Yigit
  2017-02-09 12:15   ` [dpdk-dev] [PATCH v2] enic flow director fixes Ferruh Yigit
  1 sibling, 2 replies; 11+ messages in thread
From: John Daley @ 2017-02-09  0:40 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, John Daley, stable

Hard coded mask values were being used for several of the IPv4 and IPv6
fields. Use the values in the rte_eth_fdir_masks structure provided by the
caller.

Fixes: dfbd6a9cb504 ("net/enic: extend flow director support for 1300 series")

Cc: stable@dpdk.org
Signed-off-by: John Daley <johndale@cisco.com>
---

 v2: fix compile error

 drivers/net/enic/enic_clsf.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/enic/enic_clsf.c b/drivers/net/enic/enic_clsf.c
index bcf479a..487f804 100644
--- a/drivers/net/enic/enic_clsf.c
+++ b/drivers/net/enic/enic_clsf.c
@@ -211,15 +211,15 @@ copy_fltr_v2(struct filter_v2 *fltr, struct rte_eth_fdir_input *input,
 		memset(&ip4_val, 0, sizeof(struct ipv4_hdr));
 
 		if (input->flow.ip4_flow.tos) {
-			ip4_mask.type_of_service = 0xff;
+			ip4_mask.type_of_service = masks->ipv4_mask.tos;
 			ip4_val.type_of_service = input->flow.ip4_flow.tos;
 		}
 		if (input->flow.ip4_flow.ttl) {
-			ip4_mask.time_to_live = 0xff;
+			ip4_mask.time_to_live = masks->ipv4_mask.ttl;
 			ip4_val.time_to_live = input->flow.ip4_flow.ttl;
 		}
 		if (input->flow.ip4_flow.proto) {
-			ip4_mask.next_proto_id = 0xff;
+			ip4_mask.next_proto_id = masks->ipv4_mask.proto;
 			ip4_val.next_proto_id = input->flow.ip4_flow.proto;
 		}
 		if (input->flow.ip4_flow.src_ip) {
@@ -299,7 +299,7 @@ copy_fltr_v2(struct filter_v2 *fltr, struct rte_eth_fdir_input *input,
 		memset(&ipv6_val, 0, sizeof(struct ipv6_hdr));
 
 		if (input->flow.ipv6_flow.proto) {
-			ipv6_mask.proto = 0xff;
+			ipv6_mask.proto = masks->ipv6_mask.proto;
 			ipv6_val.proto = input->flow.ipv6_flow.proto;
 		}
 		for (i = 0; i < 4; i++) {
@@ -315,11 +315,11 @@ copy_fltr_v2(struct filter_v2 *fltr, struct rte_eth_fdir_input *input,
 					input->flow.ipv6_flow.dst_ip[i];
 		}
 		if (input->flow.ipv6_flow.tc) {
-			ipv6_mask.vtc_flow = 0x00ff0000;
-			ipv6_val.vtc_flow = input->flow.ipv6_flow.tc << 16;
+			ipv6_mask.vtc_flow = masks->ipv6_mask.tc << 12;
+			ipv6_val.vtc_flow = input->flow.ipv6_flow.tc << 12;
 		}
 		if (input->flow.ipv6_flow.hop_limits) {
-			ipv6_mask.hop_limits = 0xff;
+			ipv6_mask.hop_limits = masks->ipv6_mask.hop_limits;
 			ipv6_val.hop_limits = input->flow.ipv6_flow.hop_limits;
 		}
 
-- 
2.10.0

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

* Re: [dpdk-dev] [PATCH v2] net/enic: fix hardcoding of some flow director masks
  2017-02-09  0:40   ` [dpdk-dev] [PATCH v2] net/enic: fix hardcoding of some flow director masks John Daley
@ 2017-02-09 10:16     ` Ferruh Yigit
  2017-02-09 17:43       ` John Daley (johndale)
  2017-02-09 12:21     ` Ferruh Yigit
  1 sibling, 1 reply; 11+ messages in thread
From: Ferruh Yigit @ 2017-02-09 10:16 UTC (permalink / raw)
  To: John Daley; +Cc: dev, stable

On 2/9/2017 12:40 AM, John Daley wrote:
> Hard coded mask values were being used for several of the IPv4 and IPv6
> fields. Use the values in the rte_eth_fdir_masks structure provided by the
> caller.
> 
> Fixes: dfbd6a9cb504 ("net/enic: extend flow director support for 1300 series")
> 
> Cc: stable@dpdk.org
> Signed-off-by: John Daley <johndale@cisco.com>
> ---
> 
>  v2: fix compile error

I wasn't getting an error for this.

V2 adds:

-	ipv6_val.vtc_flow = input->flow.ipv6_flow.tc << 16;
+	ipv6_val.vtc_flow = input->flow.ipv6_flow.tc << 12;

What is the compile error this fixes?

Thanks,
ferruh

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

* Re: [dpdk-dev] [PATCH v2] enic flow director fixes
  2017-02-09  0:40 ` [dpdk-dev] [PATCH v2] enic flow director fixes John Daley
  2017-02-09  0:40   ` [dpdk-dev] [PATCH v2] net/enic: fix hardcoding of some flow director masks John Daley
@ 2017-02-09 12:15   ` Ferruh Yigit
  2017-02-09 17:44     ` John Daley (johndale)
  1 sibling, 1 reply; 11+ messages in thread
From: Ferruh Yigit @ 2017-02-09 12:15 UTC (permalink / raw)
  To: John Daley; +Cc: dev

On 2/9/2017 12:40 AM, John Daley wrote:
> This should replace
> http://www.dpdk.org/dev/patchwork/patch/20147/ which was an intermediate patch
> in a small patchset and had a compile error. Also, please reject the 2nd patch
> in the patchset http://www.dpdk.org/dev/patchwork/patch/20148/ which is
> incomplete. I will change the state of these patches in patchworks.
> thank you, john

Hi John,

I dropped the previous two and will get this one. And this looks like
the squashed version of the previous two with some updates in ipv6 shift
number.

Although next-net can re-write the git history, this is mainly to
provide ability to rebasing on master tree. Not for amending patches on
fly, that is confusing.

Please next time do not rely on git history re-writing while sending
patches.

Thanks,
ferruh

> 
> John Daley (1):
>   net/enic: fix hardcoding of some flow director masks
> 
>  drivers/net/enic/enic_clsf.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 

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

* Re: [dpdk-dev] [PATCH v2] net/enic: fix hardcoding of some flow director masks
  2017-02-09  0:40   ` [dpdk-dev] [PATCH v2] net/enic: fix hardcoding of some flow director masks John Daley
  2017-02-09 10:16     ` Ferruh Yigit
@ 2017-02-09 12:21     ` Ferruh Yigit
  1 sibling, 0 replies; 11+ messages in thread
From: Ferruh Yigit @ 2017-02-09 12:21 UTC (permalink / raw)
  To: John Daley; +Cc: dev, stable

On 2/9/2017 12:40 AM, John Daley wrote:
> Hard coded mask values were being used for several of the IPv4 and IPv6
> fields. Use the values in the rte_eth_fdir_masks structure provided by the
> caller.
> 
> Fixes: dfbd6a9cb504 ("net/enic: extend flow director support for 1300 series") 
> Cc: stable@dpdk.org

> Signed-off-by: John Daley <johndale@cisco.com>

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

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

* Re: [dpdk-dev] [PATCH v2] net/enic: fix hardcoding of some flow director masks
  2017-02-09 10:16     ` Ferruh Yigit
@ 2017-02-09 17:43       ` John Daley (johndale)
  2017-02-09 17:58         ` Ferruh Yigit
  0 siblings, 1 reply; 11+ messages in thread
From: John Daley (johndale) @ 2017-02-09 17:43 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, stable



> -----Original Message-----
> From: Ferruh Yigit [mailto:ferruh.yigit@intel.com]
> Sent: Thursday, February 09, 2017 2:16 AM
> To: John Daley (johndale) <johndale@cisco.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: Re: [PATCH v2] net/enic: fix hardcoding of some flow director masks
> 
> On 2/9/2017 12:40 AM, John Daley wrote:
> > Hard coded mask values were being used for several of the IPv4 and
> > IPv6 fields. Use the values in the rte_eth_fdir_masks structure
> > provided by the caller.
> >
> > Fixes: dfbd6a9cb504 ("net/enic: extend flow director support for 1300
> > series")
> >
> > Cc: stable@dpdk.org
> > Signed-off-by: John Daley <johndale@cisco.com>
> > ---
> >
> >  v2: fix compile error
> 
> I wasn't getting an error for this.
> 
> V2 adds:
> 
> -	ipv6_val.vtc_flow = input->flow.ipv6_flow.tc << 16;
> +	ipv6_val.vtc_flow = input->flow.ipv6_flow.tc << 12;
> 
> What is the compile error this fixes?

This patch had the compile error:
http://www.dpdk.org/dev/patchwork/patch/20147/
+			ipv6_mask.vtc_flow = masks->ipv6_mask.tc << 16);

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

* Re: [dpdk-dev] [PATCH v2] enic flow director fixes
  2017-02-09 12:15   ` [dpdk-dev] [PATCH v2] enic flow director fixes Ferruh Yigit
@ 2017-02-09 17:44     ` John Daley (johndale)
  0 siblings, 0 replies; 11+ messages in thread
From: John Daley (johndale) @ 2017-02-09 17:44 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev



> -----Original Message-----
> From: Ferruh Yigit [mailto:ferruh.yigit@intel.com]
> Sent: Thursday, February 09, 2017 4:15 AM
> To: John Daley (johndale) <johndale@cisco.com>
> Cc: dev@dpdk.org
> Subject: Re: [PATCH v2] enic flow director fixes
> 
> On 2/9/2017 12:40 AM, John Daley wrote:
> > This should replace
> > http://www.dpdk.org/dev/patchwork/patch/20147/ which was an
> > intermediate patch in a small patchset and had a compile error. Also,
> > please reject the 2nd patch in the patchset
> > http://www.dpdk.org/dev/patchwork/patch/20148/ which is incomplete. I
> will change the state of these patches in patchworks.
> > thank you, john
> 
> Hi John,
> 
> I dropped the previous two and will get this one. And this looks like the
> squashed version of the previous two with some updates in ipv6 shift
> number.
> 
> Although next-net can re-write the git history, this is mainly to provide ability
> to rebasing on master tree. Not for amending patches on fly, that is
> confusing.
> 
> Please next time do not rely on git history re-writing while sending patches.

Oops I was stupidly looking at master and assumed the patches were rejected because of the compile error. I obviously should have been looking at next-net.

Thanks,
John
> 
> Thanks,
> ferruh
> 
> >
> > John Daley (1):
> >   net/enic: fix hardcoding of some flow director masks
> >
> >  drivers/net/enic/enic_clsf.c | 14 +++++++-------
> >  1 file changed, 7 insertions(+), 7 deletions(-)
> >

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

* Re: [dpdk-dev] [PATCH v2] net/enic: fix hardcoding of some flow director masks
  2017-02-09 17:43       ` John Daley (johndale)
@ 2017-02-09 17:58         ` Ferruh Yigit
  0 siblings, 0 replies; 11+ messages in thread
From: Ferruh Yigit @ 2017-02-09 17:58 UTC (permalink / raw)
  To: John Daley (johndale); +Cc: dev, stable

On 2/9/2017 5:43 PM, John Daley (johndale) wrote:
> 
> 
>> -----Original Message-----
>> From: Ferruh Yigit [mailto:ferruh.yigit@intel.com]
>> Sent: Thursday, February 09, 2017 2:16 AM
>> To: John Daley (johndale) <johndale@cisco.com>
>> Cc: dev@dpdk.org; stable@dpdk.org
>> Subject: Re: [PATCH v2] net/enic: fix hardcoding of some flow director masks
>>
>> On 2/9/2017 12:40 AM, John Daley wrote:
>>> Hard coded mask values were being used for several of the IPv4 and
>>> IPv6 fields. Use the values in the rte_eth_fdir_masks structure
>>> provided by the caller.
>>>
>>> Fixes: dfbd6a9cb504 ("net/enic: extend flow director support for 1300
>>> series")
>>>
>>> Cc: stable@dpdk.org
>>> Signed-off-by: John Daley <johndale@cisco.com>
>>> ---
>>>
>>>  v2: fix compile error
>>
>> I wasn't getting an error for this.
>>
>> V2 adds:
>>
>> -	ipv6_val.vtc_flow = input->flow.ipv6_flow.tc << 16;
>> +	ipv6_val.vtc_flow = input->flow.ipv6_flow.tc << 12;
>>
>> What is the compile error this fixes?
> 
> This patch had the compile error:
> http://www.dpdk.org/dev/patchwork/patch/20147/
> +			ipv6_mask.vtc_flow = masks->ipv6_mask.tc << 16);

I see, perhaps (don't remember) I fixed this while applying, because
next-net was compiling fine.

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

end of thread, other threads:[~2017-02-09 17:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-03  9:54 [dpdk-dev] [PATCH 1/2] net/enic: fix hardcoding of some flow director masks John Daley
2017-02-03  9:54 ` [dpdk-dev] [PATCH 2/2] net/enic: fix flow director IPv6 traffic class specification John Daley
2017-02-03 22:54 ` [dpdk-dev] [PATCH 1/2] net/enic: fix hardcoding of some flow director masks Ferruh Yigit
2017-02-09  0:40 ` [dpdk-dev] [PATCH v2] enic flow director fixes John Daley
2017-02-09  0:40   ` [dpdk-dev] [PATCH v2] net/enic: fix hardcoding of some flow director masks John Daley
2017-02-09 10:16     ` Ferruh Yigit
2017-02-09 17:43       ` John Daley (johndale)
2017-02-09 17:58         ` Ferruh Yigit
2017-02-09 12:21     ` Ferruh Yigit
2017-02-09 12:15   ` [dpdk-dev] [PATCH v2] enic flow director fixes Ferruh Yigit
2017-02-09 17:44     ` John Daley (johndale)

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