net: Add vnet_hdr_len arguments in NetClientState

Add vnet_hdr_len arguments in NetClientState
that make other module get real vnet_hdr_len easily.

Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
Zhang Chen 2017-07-04 14:53:45 +08:00 committed by Jason Wang
parent 6632f6ff96
commit d6b732e953
2 changed files with 2 additions and 0 deletions

View File

@ -100,6 +100,7 @@ struct NetClientState {
unsigned int queue_index;
unsigned rxfilter_notify_enabled:1;
int vring_enable;
int vnet_hdr_len;
QTAILQ_HEAD(NetFilterHead, NetFilterState) filters;
};

View File

@ -492,6 +492,7 @@ void qemu_set_vnet_hdr_len(NetClientState *nc, int len)
return;
}
nc->vnet_hdr_len = len;
nc->info->set_vnet_hdr_len(nc, len);
}