netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: dsa: Implement flow_dissect callback for tag_qca
@ 2019-03-27  1:32 xiaofeis
  2019-03-27  3:50 ` Bjorn Andersson
  0 siblings, 1 reply; 8+ messages in thread
From: xiaofeis @ 2019-03-27  1:32 UTC (permalink / raw)
  To: davem
  Cc: vkoul, netdev, andrew, linux-arm-msm, bjorn.andersson,
	vivien.didelot, f.fainelli, niklas.cassel, xiazha, xiaofeis

Add flow_dissect for qca tagged packet to get the right hash.

Signed-off-by: xiaofeis <xiaofeis@codeaurora.org>
---
 net/dsa/tag_qca.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/net/dsa/tag_qca.c b/net/dsa/tag_qca.c
index e886a3c..f4b4de3 100644
--- a/net/dsa/tag_qca.c
+++ b/net/dsa/tag_qca.c
@@ -113,8 +113,18 @@ static struct sk_buff *qca_tag_rcv(struct sk_buff *skb, struct net_device *dev,
 	return skb;
 }
 
+static int qca_tag_flow_dissect(const struct sk_buff *skb, __be16 *proto,
+                                int *offset)
+{
+	*offset = QCA_HDR_LEN;
+	*proto = ((__be16 *)skb->data)[0];
+
+	return 0;
+}
+
 const struct dsa_device_ops qca_netdev_ops = {
 	.xmit	= qca_tag_xmit,
 	.rcv	= qca_tag_rcv,
+	.flow_dissect = qca_tag_flow_dissect,
 	.overhead = QCA_HDR_LEN,
 };
-- 
1.9.1


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

* Re: [PATCH] net: dsa: Implement flow_dissect callback for tag_qca
  2019-03-27  1:32 xiaofeis
@ 2019-03-27  3:50 ` Bjorn Andersson
  0 siblings, 0 replies; 8+ messages in thread
From: Bjorn Andersson @ 2019-03-27  3:50 UTC (permalink / raw)
  To: xiaofeis
  Cc: davem, vkoul, netdev, andrew, linux-arm-msm, vivien.didelot,
	f.fainelli, niklas.cassel, xiazha

On Tue 26 Mar 18:32 PDT 2019, xiaofeis wrote:

> Add flow_dissect for qca tagged packet to get the right hash.
> 
> Signed-off-by: xiaofeis <xiaofeis@codeaurora.org>

Hi Xiaofei,

Please use your full name (first and last) both as author and in the
signed-off tag.

Regards,
Bjorn

> ---
>  net/dsa/tag_qca.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/net/dsa/tag_qca.c b/net/dsa/tag_qca.c
> index e886a3c..f4b4de3 100644
> --- a/net/dsa/tag_qca.c
> +++ b/net/dsa/tag_qca.c
> @@ -113,8 +113,18 @@ static struct sk_buff *qca_tag_rcv(struct sk_buff *skb, struct net_device *dev,
>  	return skb;
>  }
>  
> +static int qca_tag_flow_dissect(const struct sk_buff *skb, __be16 *proto,
> +                                int *offset)
> +{
> +	*offset = QCA_HDR_LEN;
> +	*proto = ((__be16 *)skb->data)[0];
> +
> +	return 0;
> +}
> +
>  const struct dsa_device_ops qca_netdev_ops = {
>  	.xmit	= qca_tag_xmit,
>  	.rcv	= qca_tag_rcv,
> +	.flow_dissect = qca_tag_flow_dissect,
>  	.overhead = QCA_HDR_LEN,
>  };
> -- 
> 1.9.1
> 

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

* [PATCH] net: dsa: Implement flow_dissect callback for tag_qca
@ 2019-03-27  3:59 xiaofeis
  2019-03-27  8:57 ` Andrew Lunn
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: xiaofeis @ 2019-03-27  3:59 UTC (permalink / raw)
  To: davem
  Cc: vkoul, netdev, andrew, linux-arm-msm, bjorn.andersson,
	vivien.didelot, f.fainelli, niklas.cassel, xiazha, xiaofeis

Add flow_dissect for qca tagged packet to get the right hash.

Signed-off-by: Xiaofei Shen <xiaofeis@codeaurora.org>
---
 net/dsa/tag_qca.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/net/dsa/tag_qca.c b/net/dsa/tag_qca.c
index e886a3c..f4b4de3 100644
--- a/net/dsa/tag_qca.c
+++ b/net/dsa/tag_qca.c
@@ -113,8 +113,18 @@ static struct sk_buff *qca_tag_rcv(struct sk_buff *skb, struct net_device *dev,
 	return skb;
 }
 
+static int qca_tag_flow_dissect(const struct sk_buff *skb, __be16 *proto,
+                                int *offset)
+{
+	*offset = QCA_HDR_LEN;
+	*proto = ((__be16 *)skb->data)[0];
+
+	return 0;
+}
+
 const struct dsa_device_ops qca_netdev_ops = {
 	.xmit	= qca_tag_xmit,
 	.rcv	= qca_tag_rcv,
+	.flow_dissect = qca_tag_flow_dissect,
 	.overhead = QCA_HDR_LEN,
 };
-- 
1.9.1


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

* Re: [PATCH] net: dsa: Implement flow_dissect callback for tag_qca
  2019-03-27  3:59 [PATCH] net: dsa: Implement flow_dissect callback for tag_qca xiaofeis
@ 2019-03-27  8:57 ` Andrew Lunn
  2019-03-27 10:15 ` Vinod Koul
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Andrew Lunn @ 2019-03-27  8:57 UTC (permalink / raw)
  To: xiaofeis
  Cc: davem, vkoul, netdev, linux-arm-msm, bjorn.andersson,
	vivien.didelot, f.fainelli, niklas.cassel, xiazha

On Wed, Mar 27, 2019 at 11:59:06AM +0800, xiaofeis wrote:
> Add flow_dissect for qca tagged packet to get the right hash.
> 
> Signed-off-by: Xiaofei Shen <xiaofeis@codeaurora.org>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

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

* Re: [PATCH] net: dsa: Implement flow_dissect callback for tag_qca
  2019-03-27  3:59 [PATCH] net: dsa: Implement flow_dissect callback for tag_qca xiaofeis
  2019-03-27  8:57 ` Andrew Lunn
@ 2019-03-27 10:15 ` Vinod Koul
  2019-03-28  4:37   ` xiaofeis
  2019-03-27 16:27 ` Florian Fainelli
  2019-03-28 23:57 ` David Miller
  3 siblings, 1 reply; 8+ messages in thread
From: Vinod Koul @ 2019-03-27 10:15 UTC (permalink / raw)
  To: xiaofeis
  Cc: davem, netdev, andrew, linux-arm-msm, bjorn.andersson,
	vivien.didelot, f.fainelli, niklas.cassel, xiazha

On 27-03-19, 11:59, xiaofeis wrote:
> Add flow_dissect for qca tagged packet to get the right hash.

Ideally this patch should have been tagged as V2. Anyhow the change
looks fine so:

Reviewed-by: Vinod Koul <vkoul@kernel.org>

> Signed-off-by: Xiaofei Shen <xiaofeis@codeaurora.org>
> ---
>  net/dsa/tag_qca.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/net/dsa/tag_qca.c b/net/dsa/tag_qca.c
> index e886a3c..f4b4de3 100644
> --- a/net/dsa/tag_qca.c
> +++ b/net/dsa/tag_qca.c
> @@ -113,8 +113,18 @@ static struct sk_buff *qca_tag_rcv(struct sk_buff *skb, struct net_device *dev,
>  	return skb;
>  }
>  
> +static int qca_tag_flow_dissect(const struct sk_buff *skb, __be16 *proto,
> +                                int *offset)
> +{
> +	*offset = QCA_HDR_LEN;
> +	*proto = ((__be16 *)skb->data)[0];
> +
> +	return 0;
> +}
> +
>  const struct dsa_device_ops qca_netdev_ops = {
>  	.xmit	= qca_tag_xmit,
>  	.rcv	= qca_tag_rcv,
> +	.flow_dissect = qca_tag_flow_dissect,
>  	.overhead = QCA_HDR_LEN,
>  };
> -- 
> 1.9.1

-- 
~Vinod

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

* Re: [PATCH] net: dsa: Implement flow_dissect callback for tag_qca
  2019-03-27  3:59 [PATCH] net: dsa: Implement flow_dissect callback for tag_qca xiaofeis
  2019-03-27  8:57 ` Andrew Lunn
  2019-03-27 10:15 ` Vinod Koul
@ 2019-03-27 16:27 ` Florian Fainelli
  2019-03-28 23:57 ` David Miller
  3 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2019-03-27 16:27 UTC (permalink / raw)
  To: xiaofeis, davem
  Cc: vkoul, netdev, andrew, linux-arm-msm, bjorn.andersson,
	vivien.didelot, niklas.cassel, xiazha

On 3/26/19 8:59 PM, xiaofeis wrote:
> Add flow_dissect for qca tagged packet to get the right hash.
> 
> Signed-off-by: Xiaofei Shen <xiaofeis@codeaurora.org>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

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

* Re: [PATCH] net: dsa: Implement flow_dissect callback for tag_qca
  2019-03-27 10:15 ` Vinod Koul
@ 2019-03-28  4:37   ` xiaofeis
  0 siblings, 0 replies; 8+ messages in thread
From: xiaofeis @ 2019-03-28  4:37 UTC (permalink / raw)
  To: Vinod Koul
  Cc: davem, netdev, andrew, linux-arm-msm, bjorn.andersson,
	vivien.didelot, f.fainelli, niklas.cassel, xiazha

On 2019-03-27 18:15, Vinod Koul wrote:
> On 27-03-19, 11:59, xiaofeis wrote:
>> Add flow_dissect for qca tagged packet to get the right hash.
> 
> Ideally this patch should have been tagged as V2. Anyhow the change
> looks fine so:
> 
> Reviewed-by: Vinod Koul <vkoul@kernel.org>
> 
>> Signed-off-by: Xiaofei Shen <xiaofeis@codeaurora.org>
>> ---
>>  net/dsa/tag_qca.c | 10 ++++++++++
>>  1 file changed, 10 insertions(+)
>> 
>> diff --git a/net/dsa/tag_qca.c b/net/dsa/tag_qca.c
>> index e886a3c..f4b4de3 100644
>> --- a/net/dsa/tag_qca.c
>> +++ b/net/dsa/tag_qca.c
>> @@ -113,8 +113,18 @@ static struct sk_buff *qca_tag_rcv(struct sk_buff 
>> *skb, struct net_device *dev,
>>  	return skb;
>>  }
>> 
>> +static int qca_tag_flow_dissect(const struct sk_buff *skb, __be16 
>> *proto,
>> +                                int *offset)
>> +{
>> +	*offset = QCA_HDR_LEN;
>> +	*proto = ((__be16 *)skb->data)[0];
>> +
>> +	return 0;
>> +}
>> +
>>  const struct dsa_device_ops qca_netdev_ops = {
>>  	.xmit	= qca_tag_xmit,
>>  	.rcv	= qca_tag_rcv,
>> +	.flow_dissect = qca_tag_flow_dissect,
>>  	.overhead = QCA_HDR_LEN,
>>  };
>> --
>> 1.9.1
Thanks Vinod, will take care next time.

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

* Re: [PATCH] net: dsa: Implement flow_dissect callback for tag_qca
  2019-03-27  3:59 [PATCH] net: dsa: Implement flow_dissect callback for tag_qca xiaofeis
                   ` (2 preceding siblings ...)
  2019-03-27 16:27 ` Florian Fainelli
@ 2019-03-28 23:57 ` David Miller
  3 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2019-03-28 23:57 UTC (permalink / raw)
  To: xiaofeis
  Cc: vkoul, netdev, andrew, linux-arm-msm, bjorn.andersson,
	vivien.didelot, f.fainelli, niklas.cassel, xiazha

From: xiaofeis <xiaofeis@codeaurora.org>
Date: Wed, 27 Mar 2019 11:59:06 +0800

> Add flow_dissect for qca tagged packet to get the right hash.
> 
> Signed-off-by: Xiaofei Shen <xiaofeis@codeaurora.org>

Applied.

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

end of thread, other threads:[~2019-03-28 23:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-27  3:59 [PATCH] net: dsa: Implement flow_dissect callback for tag_qca xiaofeis
2019-03-27  8:57 ` Andrew Lunn
2019-03-27 10:15 ` Vinod Koul
2019-03-28  4:37   ` xiaofeis
2019-03-27 16:27 ` Florian Fainelli
2019-03-28 23:57 ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2019-03-27  1:32 xiaofeis
2019-03-27  3:50 ` Bjorn Andersson

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