Commit 38ec410
virtio-net: correct hdr_len handling for VIRTIO_NET_F_GUEST_HDRLEN
The commit be50da3 ("net: virtio_net: implement exact header length
guest feature") introduces support for the VIRTIO_NET_F_GUEST_HDRLEN
feature in virtio-net.
This feature requires virtio-net to set hdr_len to the actual header
length of the packet when transmitting, the number of
bytes from the start of the packet to the beginning of the
transport-layer payload.
However, in practice, hdr_len was being set using skb_headlen(skb),
which is clearly incorrect. This commit fixes that issue.
Fixes: be50da3 ("net: virtio_net: implement exact header length guest feature")
Signed-off-by: Xuan Zhuo <[email protected]>
Link: https://patch.msgid.link/[email protected]
Acked-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Paolo Abeni <[email protected]>1 parent 70b439b commit 38ec410
3 files changed
Lines changed: 36 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | | - | |
| 247 | + | |
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3267 | 3267 | | |
3268 | 3268 | | |
3269 | 3269 | | |
| 3270 | + | |
3270 | 3271 | | |
3271 | 3272 | | |
| 3273 | + | |
| 3274 | + | |
| 3275 | + | |
3272 | 3276 | | |
3273 | 3277 | | |
3274 | 3278 | | |
| |||
3288 | 3292 | | |
3289 | 3293 | | |
3290 | 3294 | | |
3291 | | - | |
| 3295 | + | |
3292 | 3296 | | |
3293 | 3297 | | |
3294 | 3298 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
210 | 227 | | |
211 | 228 | | |
212 | 229 | | |
| |||
385 | 402 | | |
386 | 403 | | |
387 | 404 | | |
388 | | - | |
| 405 | + | |
| 406 | + | |
389 | 407 | | |
390 | 408 | | |
391 | 409 | | |
| |||
394 | 412 | | |
395 | 413 | | |
396 | 414 | | |
397 | | - | |
398 | | - | |
399 | | - | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
400 | 426 | | |
401 | 427 | | |
402 | 428 | | |
| |||
0 commit comments