[dpdk-dev] [PATCH v4] net/pcap: support snaplen option to truncate packet

2020-07-14 Thread Zhike Wang
Introduced "snaplen=" option. It is convenient to truncate large packets to only capture necessary headers. Signed-off-by: Zhike Wang --- app/pdump/main.c | 32 ++- doc/guides/rel_notes/release_20_08.rst | 4 doc/guides/tools

[dpdk-dev] [PATCH v2] mempool: fix memory allocation in memzones during retry.

2020-07-14 Thread Zhike Wang
allocated, and leads to population failure, then errno other than ENOMEM may be returned. Fixes: 3a3d0c75b43e ("mempool: fix slow allocation of large pools") Signed-off-by: Andrew Rybchenko Signed-off-by: Zhike Wang --- lib/librte_mempool/rte_mempool.c | 2 +- 1 file changed, 1 inse

[dpdk-dev] [PATCH v3] net/pcap: support snaplen option to truncate packet

2020-07-13 Thread Zhike Wang
Introduced "snaplen=" option. It is convenient to truncate large packets to only capture necessary headers. Signed-off-by: Zhike Wang --- app/pdump/main.c| 32 +++- drivers/net/pcap/rte_eth_pcap.c | 40 ++-

[dpdk-dev] [PATCH] mempool: fix memory allocation in memzones during retry.

2020-07-13 Thread Zhike Wang
allocated, and leads to population failure, then errno other than ENOMEM may be returned. Signed-off-by: Andrew Rybchenko Signed-off-by: Zhike Wang --- lib/librte_mempool/rte_mempool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_mempool/rte_mempool.c b/lib/libr

[dpdk-dev] [PATCH] mempool: return ENOMEM if initial alloc size can not be satisfied

2020-07-03 Thread Zhike Wang
Signed-off-by: Zhike Wang --- lib/librte_mempool/rte_mempool.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c index 0bde995..b24feb6 100644 --- a/lib/librte_mempool/rte_mempool.c +++ b/lib/librte_mempool/rte_mempool.c

[dpdk-dev] [PATCH v2] net/pcap: support snaplen option to truncate packet

2020-07-03 Thread Zhike Wang
Introduced "snaplen=" option. It is convenient to truncate large packets to only capture necessary headers. Signed-off-by: Zhike Wang --- app/pdump/main.c| 32 +++- drivers/net/pcap/rte_eth_pcap.c | 35 ++

[dpdk-dev] [PATCH] net/pcap: support snaplen option to truncate packet

2020-07-03 Thread Zhike Wang
Introduced "snaplen=" option. It is convinient to truncate large packets to only capture necessary headers. Signed-off-by: Zhike Wang --- app/pdump/main.c| 28 +++- drivers/net/pcap/rte_eth_pcap.c | 34 +- 2 fil

[dpdk-dev] [PATCH] vhost: return -EAGAIN during unregistering vhost if it is busy.

2020-03-12 Thread Zhike Wang
use of the vhost fd, then leads to deadlock. It is better to return -EAGAIN to application, who will decide how to handle (eg OVS can call ovsrcu_quiesce() and then retry). Signed-off-by: Zhike Wang --- lib/librte_vhost/rte_vhost.h | 4 +++- lib/librte_vhost/socket.c| 8 2 files c

[dpdk-dev] [PATCH] vhost:fix crash on port deletion and VM shutdown at same time

2020-01-15 Thread Zhike Wang
will access invalid memory when trying to reconnect. The fix is to move the "removing of vsocket from conn_list" to end of the vhost_user_read_cb(), then avoid the race condition. The core trace is Program terminated with signal 11, Segmentation fault. Signed-off-by: Zhike Wang

[dpdk-dev] [PATCH] net/i40e: fix X722 judgement when disable adminq operation

2020-01-15 Thread Zhike Wang
X722 SFPs have different flavors, eg I40E_DEV_ID_SFP_X722 /I40E_DEV_ID_SFP_I_X722. So instead we use mac.type to judge whether it is X722 or not. Fixes: 9efa8d28b ("net/i40e: fix SFP X722 with FW4.16") Signed-off-by: Zhike Wang --- drivers/net/i40e/i40e_ethdev.c | 2 +- 1 file

[dpdk-dev] [PATCH v2] net/pcap: truncate packet if it is too large

2019-12-08 Thread Zhike Wang
From: Zhike Wang Previously large packet would be dropped, instead now it is better to keep it via truncating it. Signed-off-by: Zhike Wang --- drivers/net/pcap/rte_eth_pcap.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/net/pcap

[dpdk-dev] [PATCH v2] vhost: fix vring message handling broken in some case

2019-11-13 Thread Zhike Wang
, which locates at host with ovs+dpdk. 2.Notice that inside ovs there are endless logs regarding failure to handle VHOST_USER_SET_VRING_CALL, and link of vm could NOT be up. Fixes: bf47225 ("vhost: fix possible denial of service by leaking FDs") Signed-off-by: Zhike Wang --- lib/li

[dpdk-dev] [PATCH] vhost: fix validate_msg_fds if VHOST_USER_VRING_NOFD_MASK set.

2019-11-12 Thread Zhike Wang
When VHOST_USER_VRING_NOFD_MASK is set, the fd_num is 0. Fixes: bf47225 ("vhost: fix possible denial of service by leaking FDs") Signed-off-by: Zhike Wang --- lib/librte_vhost/vhost_user.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/li

[dpdk-dev] [PATCH] net/pcap: truncate packet if it is too large

2019-11-07 Thread Zhike Wang
From: Zhike Wang Previously large packet would be dropped, instead now it is better to keep it via truncating it. Signed-off-by: Zhike Wang --- drivers/net/pcap/rte_eth_pcap.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/net/pcap/rte_eth_pcap.c

[dpdk-dev] [PATCH] net/virtio: init MTU in case no control channel

2018-01-05 Thread Zhike Wang
From: zhike wang The max_mtu is kept as zero in case no CRTL channel, which leads to failure when calling virtio_mtu_set(). Signed-off-by: Zhike Wang --- drivers/net/virtio/virtio_ethdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net

[dpdk-dev] [PATCH] net/virtio: init MTU in case no control channel

2018-01-04 Thread zhike wang
The max_mtu is kept as zero in case no CRTL channel, which leads to failure when calling virtio_mtu_set(). Signed-off-by: zhike wang --- drivers/net/virtio/virtio_ethdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio

[dpdk-dev] [PATCH v3] lib/librte_vhost: move fdset_del out of conn_mutex

2018-01-02 Thread zhike wang
while the 2nd thread would be blocked by mutex and can not change the flag. Then dead lock is observed. Signed-off-by: zhike wang --- lib/librte_vhost/socket.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socke

[dpdk-dev] [PATCH v2] lib/librte_vhost: move fdset_del out of conn_mutex

2017-12-27 Thread zhike wang
Then dead lock is observed. Signed-off-by: zhike wang --- lib/librte_vhost/socket.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c index 422da00..017f824 100644 --- a/lib/librte_vhost/socket.c

[dpdk-dev] [PATCH] lib/librte_vhost: move fdset_del out of conn_mutex

2017-12-27 Thread zhike wang
, the rcb, such as vhost_user_read_cb() would try to retrieve the conn_mutex. So issue is that the 1st thread will loop check the flag while holding the mutex, while the 2nd thread would be blocked by mutex and can not change the flag. Then dead lock is observed. Signed-off-by: zhike wang