Re: [PATCH] app/flow-perf: replace RTE_BE32/16 with rte_cpu_to_be_32/16 for variables

2023-03-27 Thread Harold Huang
(RTE_ETHER_TYPE_TEB); item_udp.hdr.dst_port = RTE_BE16(RTE_VXLAN_DEFAULT_PORT); On Mon, Mar 27, 2023 at 6:29 PM Wisam Monther wrote: > > Hi, > > > -Original Message- > > From: Harold Huang > > Sent: Sunday, March 12, 2023 4:00 AM > > To: dev@dpdk.org > > Cc: Harold

[PATCH] app/flow-perf: replace RTE_BE32/16 with rte_cpu_to_be_32/16 for variables

2023-03-11 Thread Harold Huang
In DPDK, the macros RTE_BE32 or RTE_BE16 are usually used for constant values. And functions such as rte_cpu_to_be_32 or rte_cpu_to_be_16 are optimized for variables. Signed-off-by: Harold Huang --- app/test-flow-perf/actions_gen.c | 28 ++-- app/test-flow-perf

Re: [PATCH] kni: update kernel API to receive packets

2022-04-14 Thread Harold Huang
On Thu, Apr 14, 2022 at 8:23 PM Gagandeep Singh wrote: > > API 'netif_rx_ni()' has been removed in kernel with commit: > baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any > context.") > > The API netif_rx() can be used for any context to receive packets > from device drivers.

Re: [PATCH 2/6] net/hns3: fix inconsistent enabled RSS behavior

2022-03-24 Thread Harold Huang
Hi, all, On Thu, Mar 3, 2022 at 12:59 AM Stephen Hemminger wrote: > > On Wed, 02 Mar 2022 15:46:37 +0100 > Thomas Monjalon wrote: > > > 02/03/2022 15:07, Ori Kam: > > > From: lihuisong (C) > > > > 在 2022/3/1 0:42, Ferruh Yigit 写道: > > > > > On 2/28/2022 3:21 AM, Min Hu (Connor) wrote: > > > > >

Re: [PATCH] net/tap: do not include l2 header in gso size when compared with mtu

2022-03-08 Thread Harold Huang
On Mon, Feb 28, 2022 at 4:27 PM Harold Huang wrote: > > The gso size is calculated with all of the headers and payload. As a > result, the l2 header should not be included when comparing gso size > with mtu. > > Fixes: 050316a88313 ("net/tap: support TSO (TCP Segme

[PATCH] net/kni: initialize rte_kni_conf to 0 before using it

2022-03-02 Thread Harold Huang
with ip link command. Fixes: ff1e35fb5f83 ("kni: calculate MTU from mbuf size") Cc: sta...@dpdk.org Signed-off-by: Harold Huang --- drivers/net/kni/rte_eth_kni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_k

Re: [PATCH] net/kni: initialize rte_kni_conf to 0 before using it

2022-03-02 Thread Harold Huang
On Thu, Mar 3, 2022 at 2:16 AM Ferruh Yigit wrote: > > On 3/2/2022 12:33 PM, Harold Huang wrote: > > When kni driver calls eth_kni_start to start device, some fields such as > > min_mtu and max_mtu of rte_kni_conf are not initialized. It will cause > > kni_ioctl_create cre

[PATCH] net/kni: initialize rte_kni_conf to 0 before using it

2022-03-02 Thread Harold Huang
mtu with ip link command. Fixes: ff1e35fb5f8 ("kni: calculate MTU from mbuf size") Signed-off-by: Harold Huang --- drivers/net/kni/rte_eth_kni.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c index c428caf441..23b15ed

[PATCH] net/virtio: support NAPI when using vhost_net backend

2022-03-02 Thread Harold Huang
=fb3f903769e8 Signed-off-by: Harold Huang --- drivers/net/virtio/virtio_user/vhost_kernel.c | 9 +++-- drivers/net/virtio/virtio_user/vhost_kernel_tap.c | 4 ++-- drivers/net/virtio/virtio_user/vhost_kernel_tap.h | 3 ++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/net

[PATCH] net/tap: do not include l2 header in gso size when compared with mtu

2022-02-28 Thread Harold Huang
The gso size is calculated with all of the headers and payload. As a result, the l2 header should not be included when comparing gso size with mtu. Fixes: 050316a88313 ("net/tap: support TSO (TCP Segment Offload)") Cc: sta...@dpdk.org Signed-off-by: Harold Huang --- drive

Re: [PATCH] net/virtio: include ipv4 cksum to support cksum offload capability

2022-02-06 Thread Harold Huang
Hi, Maxime, Maxime Coquelin 于2022年1月31日周一 18:04写道: > > Hi Harold, > > On 1/7/22 12:53, Harold Huang wrote: > > Device cksum offload capability usually include ipv4 cksum, tcp and udp > > cksum offload capability. The application such as OVS usually negotiate > &g

[PATCH] net/virtio: include ipv4 cksum to support cksum offload capability

2022-01-07 Thread Harold Huang
Device cksum offload capability usually include ipv4 cksum, tcp and udp cksum offload capability. The application such as OVS usually negotiate with the drive like this to enable cksum offload. Signed-off-by: Harold Huang --- drivers/net/virtio/virtio_ethdev.c | 2 ++ 1 file changed, 2

[PATCH] net/virtio: fix unreleased resource when creating virtio user dev is failed

2021-12-22 Thread Harold Huang
address pointer and register memory event cb to the same address is not allowed. Signed-off-by: Harold Huang --- Compared to patch v3, commit log is changed because this bug could cause residual tap device in the host. drivers/net/virtio/virtio_user_ethdev.c | 1 + 1 file changed, 1 insertion

Re: [PATCH v4] net/kni: reset rte_kni_conf struct before initialization

2021-12-22 Thread Harold Huang
The problem this patch wants to solve can be reproduced by ovs-dpdk: 1. create a kni port in ovs: ovs-vsctl add-port ovs-br0 kni0 -- set Interface kni0 type=dpdk options:dpdk-devargs=net_kni0 2. change the mtu of the kni device in kernel: ip link set kni0 mtu 1500 If we do not set rte_kni_conf

[PATCH v3] net/virtio: fix unregister virtio user memory event cb problem

2021-12-22 Thread Harold Huang
When eth_virtio_dev_init is failed, the registered virtio user memory event cb is not released and creating a new vdev could be failed because the new virtio_user_dev could use the same address pointer and register memory event cb to the same address is not allowed. Signed-off-by: Harold Huang

Fwd: [PATCH v2] net/virtio: unregister virtio user memory event to fix memory leak problem

2021-12-20 Thread Harold Huang
The problem which this patch wants to solve can be reproduced via ovs 2.16: 1. add a port with an invalid speed parameter: ovs-vsctl add-port ovs-br0 virtiouser0 -- set Interface virtiouser0 type=dpdk options:dpdk-devargs=virtio_user0,path=/dev/vhost-net,queue_size=1024,queues=1,speed=1000 2. de

[PATCH v2] net/virtio: unregister virtio user memory event to fix memory leak problem

2021-12-20 Thread Harold Huang
When eth_virtio_dev_init is failed, the registered virtio user memory is not released and creating a new virtio user dev could be failed because the new dev could use the same address pointer and the register virtio user memory to the same address is not allowed. Signed-off-by: Harold Huang

[PATCH] net/virtio: unregister virtio user memery event to fix memory leak problem

2021-12-20 Thread Harold Huang
When eth_virtio_dev_init is failed, the registered virtio user memery is not released and creating a new virtio user dev could be failed becase the new dev could use the same address pointer and the register virtio user memory to the same address is not allowed. Signed-off-by: Harold Huang

[PATCH v4] net/kni: reset rte_kni_conf struct before initialization

2021-12-04 Thread Harold Huang
with ip link command. Fixes: ff1e35fb5f8 ("kni: calculate MTU from mbuf size") Signed-off-by: Harold Huang --- drivers/net/kni/rte_eth_kni.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c index c428caf441..23b15edfac 10

[PATCH v3] net/kni: reset rte_kni_conf struct before initialization

2021-12-04 Thread Harold Huang
with ip link command. Fixes: ff1e35fb5f8 ("kni: calculate MTU from mbuf size") Signed-off-by: Harold Huang --- drivers/net/kni/rte_eth_kni.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c index c428caf441..23b15edfac 10

[PATCH v2] net/kni: reset rte_kni_conf struct before initialization

2021-12-04 Thread Harold Huang
mtu with ip link command. Fixes: ff1e35fb5f8 ("kni: calculate MTU from mbuf size") Signed-off-by: Harold Huang --- drivers/net/kni/rte_eth_kni.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c index c428caf441..23b15ed

[PATCH] net/kni: reset rte_kni_conf struct before initialization

2021-12-02 Thread Harold Huang
mtu with ip link command. Fixes: ff1e35fb5f8 ("kni: calculate MTU from mbuf size") Signed-off-by: Harold Huang --- drivers/net/kni/rte_eth_kni.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c index c428caf441..23b15ed