提交 e8efcec5 编写于 作者: L Li RongQing 提交者: David S. Miller

be2net: Fix Endian

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: NLi RongQing <roy.qing.li@gmail.com>
Acked-by: NSomnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 806a0fbe
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册