diff mbox

[net-next] bnx2x: Use skb_is_gso_v6(skb) instead of accessing the skb_shinfo(skb) directly

Message ID 1290851625.2794.17.camel@edumazet-laptop
State Superseded, archived
Delegated to: David Miller
Headers show

Commit Message

Eric Dumazet Nov. 27, 2010, 9:53 a.m. UTC
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 ?



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Vladislav Zolotarov Nov. 28, 2010, 10:22 a.m. UTC | #1
> 
> 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 ?
> 

U r right. I'm respinning a patch taking your remarks and a "brackets"
patch into an account.

thanks, Eric.


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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;
 }