aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhang Chen <zhangchen.fnst@cn.fujitsu.com>2017-07-04 14:53:45 +0800
committerJason Wang <jasowang@redhat.com>2017-07-17 20:02:09 +0800
commitd6b732e953673e4e1f4b36868c206a08213b6708 (patch)
tree939a4e03d76b3101514ff6ec84bc6484a68706d6
parent6632f6ff96f0537fc34cdc00c760656fc62e23c5 (diff)
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>
-rw-r--r--include/net/net.h1
-rw-r--r--net/net.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/net/net.h b/include/net/net.h
index 99b28d5b38..9a92c704ea 100644
--- a/include/net/net.h
+++ b/include/net/net.h
@@ -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;
};
diff --git a/net/net.c b/net/net.c
index 6235aabed8..b62ce105a2 100644
--- a/net/net.c
+++ b/net/net.c
@@ -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);
}