d97f1159 | 11-Dec-2020 |
Guishan Qin <guishan.qin@windriver.com> |
net: checksum: Add IP header checksum calculation
At present net_checksum_calculate() only calculates TCP/UDP checksum in an IP packet, but assumes the IP header checksum to be provided by the softw
net: checksum: Add IP header checksum calculation
At present net_checksum_calculate() only calculates TCP/UDP checksum in an IP packet, but assumes the IP header checksum to be provided by the software, e.g.: Linux kernel always calculates the IP header checksum. However this might not always be the case, e.g.: for an IP checksum offload enabled stack like VxWorks, the IP header checksum can be zero.
This adds the checksum calculation of the IP header.
Signed-off-by: Guishan Qin <guishan.qin@windriver.com> Signed-off-by: Yabing Liu <yabing.liu@windriver.com> Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
0dcf0c0a | 11-Dec-2020 |
Markus Carlstedt <markus.carlstedt@windriver.com> |
net: checksum: Skip fragmented IP packets
To calculate the TCP/UDP checksum we need the whole datagram. Unless the hardware has some logic to collect all fragments before sending the whole datagram
net: checksum: Skip fragmented IP packets
To calculate the TCP/UDP checksum we need the whole datagram. Unless the hardware has some logic to collect all fragments before sending the whole datagram first, it can only be done by the network stack, which is normally the case for the NICs we have seen so far.
Skip these fragmented IP packets to avoid checksum corruption.
Signed-off-by: Markus Carlstedt <markus.carlstedt@windriver.com> Signed-off-by: Bin Meng <bin.meng@windriver.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
f0e34a06 | 11-Nov-2020 |
Eduardo Habkost <ehabkost@redhat.com> |
netfilter: Use class properties
Instance properties make introspection hard and are not shown by "-object ...,help". Convert them to class properties.
Signed-off-by: Eduardo Habkost <ehabkost@redh
netfilter: Use class properties
Instance properties make introspection hard and are not shown by "-object ...,help". Convert them to class properties.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20201111183823.283752-12-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
show more ...
|
6d11ea6d | 11-Nov-2020 |
Eduardo Habkost <ehabkost@redhat.com> |
netfilter: Reorder functions
Trivial code reordering in some filter backends, to make the next changes easier to review.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <2020111118
netfilter: Reorder functions
Trivial code reordering in some filter backends, to make the next changes easier to review.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20201111183823.283752-11-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
show more ...
|
9925990d | 23-Nov-2020 |
Keqian Zhu <zhukeqian1@huawei.com> |
net: Use correct default-path macro for downscript
Fixes: 63c4db4c2e6d (net: relocate paths to helpers and scripts) Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com> Signed-off-by: Jason Wang <jasow
net: Use correct default-path macro for downscript
Fixes: 63c4db4c2e6d (net: relocate paths to helpers and scripts) Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
f012bec8 | 19-Nov-2020 |
yuanjungong <ruc_gongyuanjun@163.com> |
tap: fix a memory leak
Close fd before returning.
Buglink: https://bugs.launchpad.net/qemu/+bug/1904486
Signed-off-by: yuanjungong <ruc_gongyuanjun@163.com> Reviewed-by: Peter Maydell <peter.mayde
tap: fix a memory leak
Close fd before returning.
Buglink: https://bugs.launchpad.net/qemu/+bug/1904486
Signed-off-by: yuanjungong <ruc_gongyuanjun@163.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
d2abc563 | 12-Nov-2020 |
Yuri Benditovich <yuri.benditovich@daynix.com> |
net: purge queued rx packets on queue deletion
https://bugzilla.redhat.com/show_bug.cgi?id=1829272 When deleting queue pair, purge pending RX packets if any. Example of problematic flow: 1. Bring up
net: purge queued rx packets on queue deletion
https://bugzilla.redhat.com/show_bug.cgi?id=1829272 When deleting queue pair, purge pending RX packets if any. Example of problematic flow: 1. Bring up q35 VM with tap (vhost off) and virtio-net or e1000e 2. Run ping flood to the VM NIC ( 1 ms interval) 3. Hot unplug the NIC device (device_del) During unplug process one or more packets come, the NIC can't receive, tap disables read_poll 4. Hot plug the device (device_add) with the same netdev The tap stays with read_poll disabled and does not receive any packets anymore (tap_send never triggered)
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
d949fe64 | 29-Oct-2020 |
AlexChen <alex.chen@huawei.com> |
net/l2tpv3: Remove redundant check in net_init_l2tpv3()
The result has been checked to be NULL before, it cannot be NULL here, so the check is redundant. Remove it.
Reported-by: Euler Robot <euler.
net/l2tpv3: Remove redundant check in net_init_l2tpv3()
The result has been checked to be NULL before, it cannot be NULL here, so the check is redundant. Remove it.
Reported-by: Euler Robot <euler.robot@huawei.com> Signed-off-by: AlexChen <alex.chen@huawei.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
7564bf77 | 21-Oct-2020 |
Prasad J Pandit <pjp@fedoraproject.org> |
net: remove an assert call in eth_get_gso_type
eth_get_gso_type() routine returns segmentation offload type based on L3 protocol type. It calls g_assert_not_reached if L3 protocol is unknown, making
net: remove an assert call in eth_get_gso_type
eth_get_gso_type() routine returns segmentation offload type based on L3 protocol type. It calls g_assert_not_reached if L3 protocol is unknown, making the following return statement unreachable. Remove the g_assert call, it maybe triggered by a guest user.
Reported-by: Gaoning Pan <pgn@zju.edu.cn> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
2f2fcff3 | 16-Oct-2020 |
Zhang Chen <chen.zhang@intel.com> |
net/colo-compare.c: Increase default queued packet scan frequency
In my test, use this default parameter looks better.
Signed-off-by: Zhang Chen <chen.zhang@intel.com> Signed-off-by: Jason Wang <ja
net/colo-compare.c: Increase default queued packet scan frequency
In my test, use this default parameter looks better.
Signed-off-by: Zhang Chen <chen.zhang@intel.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
17475df2 | 16-Oct-2020 |
Zhang Chen <chen.zhang@intel.com> |
net/colo-compare.c: Add secondary old packet detection
Detect queued secondary packet to sync VM state in time.
Signed-off-by: Zhang Chen <chen.zhang@intel.com> Reviewed-by: Li Zhijian <lizhijian@c
net/colo-compare.c: Add secondary old packet detection
Detect queued secondary packet to sync VM state in time.
Signed-off-by: Zhang Chen <chen.zhang@intel.com> Reviewed-by: Li Zhijian <lizhijian@cn.fujitsu.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
ec081984 | 16-Oct-2020 |
Zhang Chen <chen.zhang@intel.com> |
net/colo-compare.c: Change the timer clock type
The virtual clock only runs during the emulation. It stops when the virtual machine is stopped. The host clock should be used for device models that e
net/colo-compare.c: Change the timer clock type
The virtual clock only runs during the emulation. It stops when the virtual machine is stopped. The host clock should be used for device models that emulate accurate real time sources. It will continue to run when the virtual machine is suspended. COLO need to know the host time here.
Fixes: dd321ecfc2e ("colo-compare: Use IOThread to Check old packet regularly and Process packets of the primary")
Reported-by: Derek Su <dereksu@qnap.com> Signed-off-by: Zhang Chen <chen.zhang@intel.com> Reviewed-by: Li Zhijian <lizhijian@cn.fujitsu.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
0c4266ef | 16-Oct-2020 |
Zhang Chen <chen.zhang@intel.com> |
net/colo-compare.c: Fix compare_timeout format issue
This parameter need compare with the return of qemu_clock_get_ms(), it is uint64_t. So we need fix this issue here.
Fixes: 9cc43c94b31 ("net/col
net/colo-compare.c: Fix compare_timeout format issue
This parameter need compare with the return of qemu_clock_get_ms(), it is uint64_t. So we need fix this issue here.
Fixes: 9cc43c94b31 ("net/colo-compare.c: Expose "compare_timeout" to users")
Reported-by: Derek Su <dereksu@qnap.com> Signed-off-by: Zhang Chen <chen.zhang@intel.com> Reviewed-by: Li Zhijian <lizhijian@cn.fujitsu.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
45b9e8c3 | 16-Oct-2020 |
Li Zhijian <lizhijian@cn.fujitsu.com> |
colo-compare: check mark in mutual exclusion
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com> Signed-off-by: Zhang Chen <chen.zhang@intel.com> Reviewed-by: Zhang Chen <chen.zhang@intel.com> Sign
colo-compare: check mark in mutual exclusion
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com> Signed-off-by: Zhang Chen <chen.zhang@intel.com> Reviewed-by: Zhang Chen <chen.zhang@intel.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
862ee1e0 | 16-Oct-2020 |
Li Zhijian <lizhijian@cn.fujitsu.com> |
colo-compare: fix missing compare_seq initialization
Fixes: f449c9e549c ("colo: compare the packet based on the tcp sequence number")
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com> Signed-off
colo-compare: fix missing compare_seq initialization
Fixes: f449c9e549c ("colo: compare the packet based on the tcp sequence number")
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com> Signed-off-by: Zhang Chen <chen.zhang@intel.com> Reviewed-by: Zhang Chen <chen.zhang@intel.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
33609e95 | 16-Oct-2020 |
Rao, Lei <lei.rao@intel.com> |
Optimize seq_sorter function for colo-compare
The seq of tcp has been filled in fill_pkt_tcp_info, it can be used directly here.
Signed-off-by: Lei Rao <lei.rao@intel.com> Signed-off-by: Zhang Chen
Optimize seq_sorter function for colo-compare
The seq of tcp has been filled in fill_pkt_tcp_info, it can be used directly here.
Signed-off-by: Lei Rao <lei.rao@intel.com> Signed-off-by: Zhang Chen <chen.zhang@intel.com> Reviewed-by: Li Zhijian <lizhijian@cn.fujitsu.com> Reviewed-by: Zhang Chen <chen.zhang@intel.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
1bc211a1 | 15-Oct-2020 |
Cindy Lu <lulu@redhat.com> |
net: Add vhost-vdpa in show_netdevs()
Fix the bug that while Check qemu supported netdev, there is no vhost-vdpa
Signed-off-by: Cindy Lu <lulu@redhat.com> Message-Id: <20201016030909.9522-2-lulu@re
net: Add vhost-vdpa in show_netdevs()
Fix the bug that while Check qemu supported netdev, there is no vhost-vdpa
Signed-off-by: Cindy Lu <lulu@redhat.com> Message-Id: <20201016030909.9522-2-lulu@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|