diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2017-07-18 09:16:43 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-07-18 09:16:43 +0100 |
commit | a778cd5610b40eec037417565671d2717bc49def (patch) | |
tree | fe1a06a08038393d5418afad7653edd2f673fc80 /include | |
parent | 5a477a78060638b8433e9fb96a3ada100b1ab8e9 (diff) | |
parent | 189ae6bb5ce1f5a322f8691d00fe942ba43dd601 (diff) |
Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging
# gpg: Signature made Mon 17 Jul 2017 13:17:17 BST
# gpg: using RSA key 0xEF04965B398D6211
# gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg: There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 215D 46F4 8246 689E C77F 3562 EF04 965B 398D 6211
* remotes/jasowang/tags/net-pull-request:
virtio-net: fix offload ctrl endian
virtion-net: Prefer is_power_of_2()
docs/colo-proxy.txt: Update colo-proxy usage of net driver with vnet_header
net/filter-rewriter.c: Make filter-rewriter support vnet_hdr_len
net/colo-compare.c: Add vnet packet's tcp/udp/icmp compare
net/colo.c: Add vnet packet parse feature in colo-proxy
net/colo-compare.c: Make colo-compare support vnet_hdr_len
net/colo-compare.c: Introduce parameter for compare_chr_send()
net/colo.c: Make vnet_hdr_len as packet property
net/filter-mirror.c: Add new option to enable vnet support for filter-redirector
net/filter-mirror.c: Make filter mirror support vnet support.
net/filter-mirror.c: Introduce parameter for filter_send()
net/net.c: Add vnet_hdr support in SocketReadState
net: Add vnet_hdr_len arguments in NetClientState
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/net.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/net/net.h b/include/net/net.h index 99b28d5b38..1c55a93588 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; }; @@ -111,9 +112,13 @@ typedef struct NICState { } NICState; struct SocketReadState { - int state; /* 0 = getting length, 1 = getting data */ + /* 0 = getting length, 1 = getting vnet header length, 2 = getting data */ + int state; + /* This flag decide whether to read the vnet_hdr_len field */ + bool vnet_hdr; uint32_t index; uint32_t packet_len; + uint32_t vnet_hdr_len; uint8_t buf[NET_BUFSIZE]; SocketReadStateFinalize *finalize; }; @@ -176,7 +181,8 @@ ssize_t qemu_deliver_packet_iov(NetClientState *sender, void print_net_client(Monitor *mon, NetClientState *nc); void hmp_info_network(Monitor *mon, const QDict *qdict); void net_socket_rs_init(SocketReadState *rs, - SocketReadStateFinalize *finalize); + SocketReadStateFinalize *finalize, + bool vnet_hdr); /* NIC info */ |