public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Vladislav Zolotarov <vladz@broadcom.com>
Cc: Dave Miller <davem@davemloft.net>,
	Eilon Greenstein <eilong@broadcom.com>,
	netdev list <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] bnx2x: Use skb_is_gso_v6(skb) instead of accessing the skb_shinfo(skb) directly
Date: Sat, 27 Nov 2010 10:53:45 +0100	[thread overview]
Message-ID: <1290851625.2794.17.camel@edumazet-laptop> (raw)
In-Reply-To: <1290678762.18389.1.camel@lb-tlvb-vladz>

Le jeudi 25 novembre 2010 à 11:52 +0200, Vladislav Zolotarov a écrit :
> Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
> ---
>  drivers/net/bnx2x/bnx2x_cmn.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/bnx2x/bnx2x_cmn.c b/drivers/net/bnx2x/bnx2x_cmn.c
> index 94d5f59..fa8e9ee 100644
> --- a/drivers/net/bnx2x/bnx2x_cmn.c
> +++ b/drivers/net/bnx2x/bnx2x_cmn.c
> @@ -1695,7 +1695,7 @@ static inline u32 bnx2x_xmit_type(struct bnx2x *bp, struct sk_buff *skb)
>  	if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV4)
>  		rc |= (XMIT_GSO_V4 | XMIT_CSUM_V4 | XMIT_CSUM_TCP);
>  
> -	else if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6)
> +	else if (skb_is_gso_v6(skb))
>  		rc |= (XMIT_GSO_V6 | XMIT_CSUM_TCP | XMIT_CSUM_V6);
>  
>  	return rc;

May I ask why ?

This seems not consistent with the previous block.

Either you also add a skb_is_gso_v4(skb) helper, or let the code as is,
maybe reordering the flags ?

diff --git a/drivers/net/bnx2x/bnx2x_cmn.c b/drivers/net/bnx2x/bnx2x_cmn.c
index 94d5f59..514aad6 100644
--- a/drivers/net/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/bnx2x/bnx2x_cmn.c
@@ -1693,10 +1693,9 @@ static inline u32 bnx2x_xmit_type(struct bnx2x *bp, struct sk_buff *skb)
 	}
 
 	if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV4)
-		rc |= (XMIT_GSO_V4 | XMIT_CSUM_V4 | XMIT_CSUM_TCP);
-
+		rc |= XMIT_GSO_V4 | XMIT_CSUM_V4 | XMIT_CSUM_TCP;
 	else if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6)
-		rc |= (XMIT_GSO_V6 | XMIT_CSUM_TCP | XMIT_CSUM_V6);
+		rc |= XMIT_GSO_V6 | XMIT_CSUM_V6 | XMIT_CSUM_TCP;
 
 	return rc;
 }



  reply	other threads:[~2010-11-27  9:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-24 15:21 [PATCH net-next] bnx2x: Do interrupt mode initialization and NAPIs adding before register_netdev() Vladislav Zolotarov
2010-11-24 19:10 ` David Miller
2010-11-25  9:52 ` [PATCH net-next] bnx2x: Use skb_is_gso_v6(skb) instead of accessing the skb_shinfo(skb) directly Vladislav Zolotarov
2010-11-27  9:53   ` Eric Dumazet [this message]
2010-11-28 10:22     ` Vladislav Zolotarov
2010-11-28 10:23     ` [PATCH net-next] bnx2x: Use helpers instead of direct access to the shinfo(skb) fields Vladislav Zolotarov
2010-11-28 19:08       ` David Miller

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=1290851625.2794.17.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=eilong@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=vladz@broadcom.com \
    /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