Commit 58d19b1
packet: vnet_hdr support for tpacket_rcv
Support socket option PACKET_VNET_HDR together with PACKET_RX_RING.
When enabled, a struct virtio_net_hdr will precede the data in the
packet ring slots.
Verified with test program at
github.com/wdebruij/kerneltools/blob/master/tests/psock_rxring_vnet.c
pkt: 1454269209.798420 len=5066
vnet: gso_type=tcpv4 gso_size=1448 hlen=66 ecn=off
csum: start=34 off=16
eth: proto=0x800
ip: src=<masked> dst=<masked> proto=6 len=5052
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 16cc140 commit 58d19b1
1 file changed
Lines changed: 15 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2206 | 2206 | | |
2207 | 2207 | | |
2208 | 2208 | | |
2209 | | - | |
| 2209 | + | |
| 2210 | + | |
| 2211 | + | |
2210 | 2212 | | |
2211 | 2213 | | |
2212 | 2214 | | |
| |||
2243 | 2245 | | |
2244 | 2246 | | |
2245 | 2247 | | |
2246 | | - | |
| 2248 | + | |
2247 | 2249 | | |
2248 | 2250 | | |
2249 | 2251 | | |
| |||
2262 | 2264 | | |
2263 | 2265 | | |
2264 | 2266 | | |
| 2267 | + | |
| 2268 | + | |
| 2269 | + | |
| 2270 | + | |
| 2271 | + | |
| 2272 | + | |
| 2273 | + | |
| 2274 | + | |
2265 | 2275 | | |
2266 | 2276 | | |
2267 | 2277 | | |
| |||
2357 | 2367 | | |
2358 | 2368 | | |
2359 | 2369 | | |
2360 | | - | |
| 2370 | + | |
2361 | 2371 | | |
2362 | 2372 | | |
2363 | 2373 | | |
| |||
3587 | 3597 | | |
3588 | 3598 | | |
3589 | 3599 | | |
3590 | | - | |
| 3600 | + | |
| 3601 | + | |
3591 | 3602 | | |
3592 | 3603 | | |
3593 | 3604 | | |
| |||
0 commit comments