History

nfp: ensure skb network header is set for packet redirect

Packets received at the NFP driver may be redirected to egress of another netdev (e.g. in the case of OvS internal ports). On the egress path, some processes, like TC egress hooks, may expect the network header offset field in the skb to be correctly set. If this is not the case there is potential for abnormal behaviour and even the triggering of BUG() calls. Set the skb network header field before the mac header pull when doing a packet redirect.

John Hurley committed 7 years ago

Commit dce5ccc1 parent fcc22021 file · +1 −0Browse files

Unified · Split

drivers/net/ethernet/netronome/nfp/nfp_net_common.c+1−0
@@ -1867,6 +1867,7 @@ static int nfp_net_rx(struct nfp_net_rx_ring *rx_ring, int budget) · 1866 unmodified lines
18671867 napi_gro_receive(&rx_ring->r_vec->napi, skb);
18681868 } else {
18691869 skb->dev = netdev;
1870+ skb_reset_network_header(skb);
18701871 __skb_push(skb, ETH_HLEN);
18711872 dev_queue_xmit(skb);
18721873 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t