提交 aad94c04 编写于 作者: M Manish Chopra 提交者: David S. Miller

qede: Fix setting Skb network header

Skb's network header needs to be set before extracting IPv4/IPv6
headers from it.
Signed-off-by: NManish Chopra <manish.chopra@qlogic.com>
Signed-off-by: NYuval Mintz <yuval.mintz@qlogic.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f86af2df
...@@ -1041,7 +1041,6 @@ static void qede_gro_ip_csum(struct sk_buff *skb) ...@@ -1041,7 +1041,6 @@ static void qede_gro_ip_csum(struct sk_buff *skb)
const struct iphdr *iph = ip_hdr(skb); const struct iphdr *iph = ip_hdr(skb);
struct tcphdr *th; struct tcphdr *th;
skb_set_network_header(skb, 0);
skb_set_transport_header(skb, sizeof(struct iphdr)); skb_set_transport_header(skb, sizeof(struct iphdr));
th = tcp_hdr(skb); th = tcp_hdr(skb);
...@@ -1056,7 +1055,6 @@ static void qede_gro_ipv6_csum(struct sk_buff *skb) ...@@ -1056,7 +1055,6 @@ static void qede_gro_ipv6_csum(struct sk_buff *skb)
struct ipv6hdr *iph = ipv6_hdr(skb); struct ipv6hdr *iph = ipv6_hdr(skb);
struct tcphdr *th; struct tcphdr *th;
skb_set_network_header(skb, 0);
skb_set_transport_header(skb, sizeof(struct ipv6hdr)); skb_set_transport_header(skb, sizeof(struct ipv6hdr));
th = tcp_hdr(skb); th = tcp_hdr(skb);
...@@ -1073,6 +1071,8 @@ static void qede_gro_receive(struct qede_dev *edev, ...@@ -1073,6 +1071,8 @@ static void qede_gro_receive(struct qede_dev *edev,
{ {
#ifdef CONFIG_INET #ifdef CONFIG_INET
if (skb_shinfo(skb)->gso_size) { if (skb_shinfo(skb)->gso_size) {
skb_set_network_header(skb, 0);
switch (skb->protocol) { switch (skb->protocol) {
case htons(ETH_P_IP): case htons(ETH_P_IP):
qede_gro_ip_csum(skb); qede_gro_ip_csum(skb);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册