Skip to content

Commit

Permalink
Merge pull request torvalds#318 from libos-nuse/feature-tso6-tap
Browse files Browse the repository at this point in the history
lkl: add TSO6 for tap device
  • Loading branch information
tavip authored Feb 9, 2017
2 parents 419f37c + b80b53a commit 9294fb3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/lkl/lib/virtio_net_tap.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,16 @@ struct lkl_netdev *lkl_netdev_tap_init(const char *path, int offload,
if (offload & (BIT(LKL_VIRTIO_NET_F_GUEST_TSO4) |
BIT(LKL_VIRTIO_NET_F_MRG_RXBUF)))
tap_arg |= TUN_F_TSO4 | TUN_F_CSUM;
if (offload & (BIT(LKL_VIRTIO_NET_F_GUEST_TSO6)))
tap_arg |= TUN_F_TSO6 | TUN_F_CSUM;

if (tap_arg || (offload & (BIT(LKL_VIRTIO_NET_F_CSUM) |
BIT(LKL_VIRTIO_NET_F_HOST_TSO4)))) {
BIT(LKL_VIRTIO_NET_F_HOST_TSO4) |
BIT(LKL_VIRTIO_NET_F_HOST_TSO6)))) {
ifr->ifr_flags |= IFF_VNET_HDR;
vnet_hdr_sz = sizeof(struct lkl_virtio_net_hdr_v1);
}


fd = open(path, O_RDWR|O_NONBLOCK);
if (fd < 0) {
perror("open");
Expand Down

0 comments on commit 9294fb3

Please sign in to comment.