* [PATCH 1/2] be2net: Fix Endian
@ 2012-07-05 2:05 roy.qing.li
2012-07-05 4:00 ` Somnath.Kotur
2012-07-09 7:14 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: roy.qing.li @ 2012-07-05 2:05 UTC (permalink / raw)
To: netdev; +Cc: somnath.kotur
From: Li RongQing <roy.qing.li@gmail.com>
ETH_P_IP is host Endian, skb->protocol is big Endian, when
compare them, we should change ETH_P_IP from host endian
to big endian, htons, not ntohs.
CC: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
---
drivers/net/ethernet/emulex/benet/be.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h
index 7a71fb6..0490a04 100644
--- a/drivers/net/ethernet/emulex/benet/be.h
+++ b/drivers/net/ethernet/emulex/benet/be.h
@@ -575,7 +575,7 @@ static inline u8 is_udp_pkt(struct sk_buff *skb)
static inline bool is_ipv4_pkt(struct sk_buff *skb)
{
- return skb->protocol == ntohs(ETH_P_IP) && ip_hdr(skb)->version == 4;
+ return skb->protocol == htons(ETH_P_IP) && ip_hdr(skb)->version == 4;
}
static inline void be_vf_eth_addr_generate(struct be_adapter *adapter, u8 *mac)
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH 1/2] be2net: Fix Endian
2012-07-05 2:05 [PATCH 1/2] be2net: Fix Endian roy.qing.li
@ 2012-07-05 4:00 ` Somnath.Kotur
2012-07-09 7:14 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Somnath.Kotur @ 2012-07-05 4:00 UTC (permalink / raw)
To: roy.qing.li, netdev
> -----Original Message-----
> From: roy.qing.li@gmail.com [mailto:roy.qing.li@gmail.com]
> Sent: Thursday, July 05, 2012 7:36 AM
> To: netdev@vger.kernel.org
> Cc: Kotur, Somnath
> Subject: [PATCH 1/2] be2net: Fix Endian
>
> From: Li RongQing <roy.qing.li@gmail.com>
>
> ETH_P_IP is host Endian, skb->protocol is big Endian, when compare them,
> we should change ETH_P_IP from host endian to big endian, htons, not
> ntohs.
>
> CC: Somnath Kotur <somnath.kotur@emulex.com>
> Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Oops! Unintended...Thanks!
Acked-by: Somnath Kotur <somnath.kotur@emulex.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] be2net: Fix Endian
2012-07-05 2:05 [PATCH 1/2] be2net: Fix Endian roy.qing.li
2012-07-05 4:00 ` Somnath.Kotur
@ 2012-07-09 7:14 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2012-07-09 7:14 UTC (permalink / raw)
To: roy.qing.li; +Cc: netdev, somnath.kotur
From: roy.qing.li@gmail.com
Date: Thu, 5 Jul 2012 10:05:42 +0800
> From: Li RongQing <roy.qing.li@gmail.com>
>
> ETH_P_IP is host Endian, skb->protocol is big Endian, when
> compare them, we should change ETH_P_IP from host endian
> to big endian, htons, not ntohs.
>
> CC: Somnath Kotur <somnath.kotur@emulex.com>
> Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Applied to net-next since this actually doesn't cause any real
problems winc htons() and ntohs() are implemented identically
and perform the same operation.
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-07-09 7:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-05 2:05 [PATCH 1/2] be2net: Fix Endian roy.qing.li
2012-07-05 4:00 ` Somnath.Kotur
2012-07-09 7:14 ` David Miller
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).