Skip to content

Commit

Permalink
tools/lguest: offer VIRTIO_F_ANY_LAYOUT for net device.
Browse files Browse the repository at this point in the history
We don't care about layout, so advertise that fact.

Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Jul 15, 2013
1 parent 504ce60 commit 927cfb9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/lguest/lguest.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
#include <pwd.h>
#include <grp.h>

#ifndef VIRTIO_F_ANY_LAYOUT
#define VIRTIO_F_ANY_LAYOUT 27
#endif

/*L:110
* We can ignore the 43 include files we need for this program, but I do want
* to draw attention to the use of kernel-style types.
Expand Down Expand Up @@ -1544,6 +1548,8 @@ static void setup_tun_net(char *arg)
add_feature(dev, VIRTIO_NET_F_HOST_ECN);
/* We handle indirect ring entries */
add_feature(dev, VIRTIO_RING_F_INDIRECT_DESC);
/* We're compliant with the damn spec. */
add_feature(dev, VIRTIO_F_ANY_LAYOUT);
set_config(dev, sizeof(conf), &conf);

/* We don't need the socket any more; setup is done. */
Expand Down

0 comments on commit 927cfb9

Please sign in to comment.