Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9294fb3

Browse files
authored
Merge pull request torvalds#318 from libos-nuse/feature-tso6-tap
lkl: add TSO6 for tap device
2 parents 419f37c + b80b53a commit 9294fb3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/lkl/lib/virtio_net_tap.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,16 @@ struct lkl_netdev *lkl_netdev_tap_init(const char *path, int offload,
3434
if (offload & (BIT(LKL_VIRTIO_NET_F_GUEST_TSO4) |
3535
BIT(LKL_VIRTIO_NET_F_MRG_RXBUF)))
3636
tap_arg |= TUN_F_TSO4 | TUN_F_CSUM;
37+
if (offload & (BIT(LKL_VIRTIO_NET_F_GUEST_TSO6)))
38+
tap_arg |= TUN_F_TSO6 | TUN_F_CSUM;
3739

3840
if (tap_arg || (offload & (BIT(LKL_VIRTIO_NET_F_CSUM) |
39-
BIT(LKL_VIRTIO_NET_F_HOST_TSO4)))) {
41+
BIT(LKL_VIRTIO_NET_F_HOST_TSO4) |
42+
BIT(LKL_VIRTIO_NET_F_HOST_TSO6)))) {
4043
ifr->ifr_flags |= IFF_VNET_HDR;
4144
vnet_hdr_sz = sizeof(struct lkl_virtio_net_hdr_v1);
4245
}
4346

44-
4547
fd = open(path, O_RDWR|O_NONBLOCK);
4648
if (fd < 0) {
4749
perror("open");

0 commit comments

Comments
 (0)