Re: [PATCH 1/1] virtio_net: Add timeout handler to avoid kernel hang

2024-01-25 Thread Zhu Yanjun
在 2024/1/26 11:11, Zhu Yanjun 写道: 在 2024/1/22 15:02, Xuan Zhuo 写道: On Mon, 22 Jan 2024 14:58:09 +0800, Jason Wang wrote: On Mon, Jan 22, 2024 at 2:55 PM Jason Wang wrote: On Mon, Jan 22, 2024 at 2:20 PM Xuan Zhuo wrote: On Mon, 22 Jan 2024 12:16:27 +0800, Jason Wang wrote: On Mon

Re: [PATCH 1/1] virtio_net: Add timeout handler to avoid kernel hang

2024-01-21 Thread Zhu Yanjun
ill read this timeout value at initialization? Zhu Yanjun Andrew

Re: [PATCH 1/1] virtio_net: Add timeout handler to avoid kernel hang

2024-01-19 Thread Zhu Yanjun
anks. The 2 functions read_poll_timeout() and read_poll_timeout_atomic() are interesting. Zhu Yanjun Andrew

Re: [PATCH 1/1] virtio_net: Add timeout handler to avoid kernel hang

2024-01-18 Thread Zhu Yanjun
在 2024/1/16 20:04, Paolo Abeni 写道: On Mon, 2024-01-15 at 09:29 +0800, Zhu Yanjun wrote: From: Zhu Yanjun Some devices emulate the virtio_net hardwares. When virtio_net driver sends commands to the emulated hardware, normally the hardware needs time to response. Sometimes the time is very

Re: [PATCH 1/1] virtio_net: Add timeout handler to avoid kernel hang

2024-01-15 Thread Zhu Yanjun
在 2024/1/15 10:20, Jason Wang 写道: On Mon, Jan 15, 2024 at 9:35 AM Zhu Yanjun wrote: From: Zhu Yanjun Some devices emulate the virtio_net hardwares. When virtio_net driver sends commands to the emulated hardware, normally the hardware needs time to response. Sometimes the time is very long

[PATCH 1/1] virtio_net: Add timeout handler to avoid kernel hang

2024-01-14 Thread Zhu Yanjun
From: Zhu Yanjun Some devices emulate the virtio_net hardwares. When virtio_net driver sends commands to the emulated hardware, normally the hardware needs time to response. Sometimes the time is very long. Thus, the following will appear. Then the whole system will hang. The similar problems

[PATCH v3 1/1] virtio_net: Fix "‘%d’ directive writing between 1 and 11 bytes into a region of size 10" warnings

2024-01-03 Thread Zhu Yanjun
From: Zhu Yanjun Fix the warnings when building virtio_net driver. " drivers/net/virtio_net.c: In function ‘init_vqs’: drivers/net/virtio_net.c:4551:48: warning: ‘%d’ directive writing between 1 and 11 bytes into a region of size 10 [-Wformat-overflow=] 4551 | sprintf(vi-

Re: [PATCH v2 1/1] virtio_net: Fix "‘%d’ directive writing between 1 and 11 bytes into a region of size 10" warnings

2024-01-03 Thread Zhu Yanjun
在 2024/1/4 8:55, Jakub Kicinski 写道: On Wed, 27 Dec 2023 22:26:37 +0800 Zhu Yanjun wrote: From: Zhu Yanjun Fix the warnings when building virtio_net driver. This got marked as Not Applicable in patchwork, not sure why. Could you repost? Got it. I will resend this commit very soon. Best

Re: [PATCH net-next v1 3/6] virtio_net: support device stats

2024-01-02 Thread Zhu Yanjun
_cap = virtio64_to_cpu(vi->vdev, v); +   vi->device_stats_cap = virtio64_to_cpu(vi->vdev, (__virtio64 __force)v);         }     } " Not sure whether the above diff are good to the whole commit or not. Zhu Yanjun vim +3432 dri

Re: [PATCH v2 1/1] virtio_net: Fix "‘%d’ directive writing between 1 and 11 bytes into a region of size 10" warnings

2023-12-27 Thread Zhu Yanjun
在 2023/12/27 22:26, Zhu Yanjun 写道: From: Zhu Yanjun Fix the warnings when building virtio_net driver. " drivers/net/virtio_net.c: In function ‘init_vqs’: drivers/net/virtio_net.c:4551:48: warning: ‘%d’ directive writing between 1 and 11 bytes into a region of size 10 [-Wformat-ove

[PATCH v2 1/1] virtio_net: Fix "‘%d’ directive writing between 1 and 11 bytes into a region of size 10" warnings

2023-12-27 Thread Zhu Yanjun
From: Zhu Yanjun Fix the warnings when building virtio_net driver. " drivers/net/virtio_net.c: In function ‘init_vqs’: drivers/net/virtio_net.c:4551:48: warning: ‘%d’ directive writing between 1 and 11 bytes into a region of size 10 [-Wformat-overflow=] 4551 | sprintf(vi-

Re: [PATCH 1/1] virtio_net: Fix "‘%d’ directive writing between 1 and 11 bytes into a region of size 10" warnings

2023-12-26 Thread Zhu Yanjun
| sprintf(vi->sq[i].name, "output.%d", i);   | ^~~ drivers/net/virtio_net.c:4552:17: note: ‘sprintf’ output between 9 and 19 bytes into a destination of size 16  4552 | sprintf(vi->sq[i].name, "output.%d", i); " Please

[PATCH 1/1] virtio_net: Fix "‘%d’ directive writing between 1 and 11 bytes into a region of size 10" warnings

2023-12-26 Thread Zhu Yanjun
From: Zhu Yanjun Fix a warning when building virtio_net driver. Signed-off-by: Zhu Yanjun --- drivers/net/virtio_net.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 49625638ad43..cf57eddf768a 100644 --- a

Re: [PATCH net-next v1 1/6] virtio_net: introduce device stats feature and structures

2023-12-26 Thread Zhu Yanjun
19 + __u8 type; + __u8 reserved; Thanks a lot. I have made tests. The mentioned errors are fixed in this patch series. Zhu Yanjun + __le16 vq_index; + __le16 reserved1; + __le16 size; +}; + +struct virtio_net_stats_cvq { + struct virtio_net_stats_reply

Re: [PATCH net-next 1/6] virtio_net: introduce device stats feature and structures

2023-12-25 Thread Zhu Yanjun
在 2023/12/22 11:30, Xuan Zhuo 写道: The virtio-net device stats spec: https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82 This commit introduces the relative feature and structures. Hi, Xuan After applying this patch series, withe ethtool version 6.5, I got

Re: [PATCH net-next 3/6] virtio_net: support device stats

2023-12-24 Thread Zhu Yanjun
12-22 @419 #define VIRTIO_NET_STATS_TYPE_CVQ (1L << 32) #define VIRTIO_NET_STATS_TYPE_CVQ (1ULL << 32) The above can fix this problem. Not sure whether this is appropriate for the whole patches. Zhu Yanjun ba106d1c676c80 Xuan Zhuo 2023-12-22 420

Re: [PATCH net-next 1/6] virtio_net: introduce device stats feature and structures

2023-12-24 Thread Zhu Yanjun
e name 'u8' u8 reserved; I can reproduce this problem. Replacing u8 as __u8 can fix this problem. Not sure whether __u8 is correct to the whole patches. Zhu Yanjun ^ 2 errors generated.

Re: [PATCH net-next] virtio-net: switch napi_tx without downing nic

2023-12-21 Thread Zhu Yanjun
在 2023/12/21 13:20, Heng Qi 写道: 在 2023/12/21 上午11:02, Zhu Yanjun 写道: 在 2023/12/20 16:07, Heng Qi 写道: virtio-net has two ways to switch napi_tx: one is through the module parameter, and the other is through coalescing parameter settings (provided that the nic status is down). Sometimes we

Re: [PATCH net-next] virtio-net: switch napi_tx without downing nic

2023-12-20 Thread Zhu Yanjun
napi_tx when debugging. However, the existing methods are a bit troublesome, such as needing to reload the driver or turn off the network card. So try to make this update. What scenario can trigger this? We want to make tests on our device. Zhu Yanjun Signed-off-by: Heng Qi Reviewed-by: Xuan Zhuo

Re: [PATCH net-next v2] net/mlx5e: Fix uninitialised struct field moder.comps

2021-04-20 Thread Zhu Yanjun
On Tue, Apr 20, 2021 at 5:21 PM Leon Romanovsky wrote: > > On Tue, Apr 20, 2021 at 03:09:03PM +0800, Zhu Yanjun wrote: > > On Tue, Apr 20, 2021 at 3:01 PM wangyunjian wrote: > > > > > > From: Yunjian Wang > > > > > > The 'comps

Re: [PATCH net-next v2] net/mlx5e: Fix uninitialised struct field moder.comps

2021-04-20 Thread Zhu Yanjun
anox/mlx5/core/en_main.c > @@ -4868,7 +4868,7 @@ static bool slow_pci_heuristic(struct mlx5_core_dev > *mdev) > > static struct dim_cq_moder mlx5e_get_def_tx_moderation(u8 cq_period_mode) > { > - struct dim_cq_moder moder; > + struct dim_cq_moder moder = {}; If

Re: [PATCH net-next v2] net: psample: Introduce stubs to remove NIC driver dependency

2021-01-27 Thread Zhu Yanjun
; > @@ -35,4 +45,21 @@ static inline void psample_sample_packet(struct > psample_group *group, > > #endif > > +static inline void inline is not needed here. The compiler should judge it. Zhu Yanjun > +psample_nic_sample_packet(struct psample_group *group, > +

[PATCH v3 1/1] xdp: avoid calling kfree twice

2020-12-09 Thread Zhu Yanjun
t;pgs, kfree is called twice. Since umem->pgs is set to NULL after the first kfree, the second kfree would not trigger call trace. Fixes: c0c77d8fb787 ("xsk: add user memory registration support sockopt") CC: Ye Dong Acked-by: Björn Töpel Signed-off-by: Zhu Yanjun

Re: [PATCH v2 1/1] xdp: avoid calling kfree twice

2020-12-09 Thread Zhu Yanjun
On Wed, Dec 9, 2020 at 6:44 PM Toke Høiland-Jørgensen wrote: > > Zhu Yanjun writes: > > > On Wed, Dec 9, 2020 at 1:12 AM Daniel Borkmann wrote: > >> > >> On 12/9/20 6:03 AM, Zhu Yanjun wrote: > >> > In the function xdp_umem_pin_pages, if npgs !=

Re: [PATCH v2 1/1] xdp: avoid calling kfree twice

2020-12-08 Thread Zhu Yanjun
On Wed, Dec 9, 2020 at 1:12 AM Daniel Borkmann wrote: > > On 12/9/20 6:03 AM, Zhu Yanjun wrote: > > In the function xdp_umem_pin_pages, if npgs != umem->npgs and > > npgs >= 0, the function xdp_umem_unpin_pages is called. In this > > function, kfree is called to han

[PATCH v2 1/1] xdp: avoid calling kfree twice

2020-12-07 Thread Zhu Yanjun
is freed twice. Acked-by: Björn Töpel Signed-off-by: Zhu Yanjun --- net/xdp/xdp_umem.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/net/xdp/xdp_umem.c b/net/xdp/xdp_umem.c index 56a28a686988..01b31c56cead 100644 --- a/net/xdp/xdp_umem.c +++ b/net

[PATCH 1/1] xdp: avoid calling kfree twice

2020-12-07 Thread Zhu Yanjun
From: Zhu Yanjun In the function xdp_umem_pin_pages, if npgs != umem->npgs and npgs >= 0, the function xdp_umem_unpin_pages is called. In this function, kfree is called to handle umem->pgs, and then in the function xdp_umem_pin_pages, kfree is called again to handle umem->pgs. Even

[PATCH v5 1/1] xdp: remove the functions xsk_map_inc and xsk_map_put

2020-11-26 Thread Zhu Yanjun
From: Zhu Yanjun The functions xsk_map_put and xsk_map_inc are simple wrappers. As such, replacing these functions with the functions bpf_map_inc and bpf_map_put and removing some test codes. Fixes: d20a1676df7e ("xsk: Move xskmap.c to net/xdp/") Signed-off-by: Zhu Yanjun --- net

[PATCH v4 1/1] xdp: remove the function xsk_map_inc

2020-11-26 Thread Zhu Yanjun
From: Zhu Yanjun The functions xsk_map_put and xsk_map_inc are simple wrappers. As such, replacing these functions with the functions bpf_map_inc and bpf_map_put and removing some test codes. Fixes: d20a1676df7e ("xsk: Move xskmap.c to net/xdp/") Signed-off-by: Zhu Yanjun --- net

Re: [PATCH v3 1/1] xdp: remove the function xsk_map_inc

2020-11-26 Thread Zhu Yanjun
On Wed, Nov 25, 2020 at 4:33 PM Magnus Karlsson wrote: > > On Wed, Nov 25, 2020 at 1:02 AM Daniel Borkmann wrote: > > > > On 11/23/20 4:05 PM, Zhu Yanjun wrote: > > > From: Zhu Yanjun > > > > > > The function xsk_map_inc is a simple wrapper of bpf_m

[PATCH v3 1/1] xdp: remove the function xsk_map_inc

2020-11-23 Thread Zhu Yanjun
From: Zhu Yanjun The function xsk_map_inc is a simple wrapper of bpf_map_inc and always returns zero. As such, replacing this function with bpf_map_inc and removing the test code. Signed-off-by: Zhu Yanjun --- net/xdp/xsk.c| 2 +- net/xdp/xsk.h| 1 - net/xdp/xskmap.c | 13

Re: [PATCH v3 1/1] xdp: remove the function xsk_map_inc

2020-11-23 Thread Zhu Yanjun
On Mon, Nov 23, 2020 at 10:27 PM wrote: > > From: Zhu Yanjun > > The function xsk_map_inc is a simple wrapper of bpf_map_inc and > always returns zero. As such, replacing this function with bpf_map_inc > and removing the test code. > > Signed-off-by: Zhu Yanjun > -

Re: [PATCHv2 1/1] xdp: remove the function xsk_map_inc

2020-11-23 Thread Zhu Yanjun
On Mon, Nov 23, 2020 at 8:19 PM Magnus Karlsson wrote: > > On Mon, Nov 23, 2020 at 1:11 PM Zhu Yanjun wrote: > > > > On Mon, Nov 23, 2020 at 8:05 PM wrote: > > > > > > From: Zhu Yanjun > > > > > > The function xsk_map_inc is a simple wr

Re: [PATCHv2 1/1] xdp: remove the function xsk_map_inc

2020-11-23 Thread Zhu Yanjun
On Mon, Nov 23, 2020 at 8:05 PM wrote: > > From: Zhu Yanjun > > The function xsk_map_inc is a simple wrapper of bpf_map_inc and > always returns zero. As such, replacing this function with bpf_map_inc > and removing the test code. > > Signed-off-by: Zhu Yanjun > -

[PATCH 1/1] xdp: compact the function xsk_map_inc

2020-11-22 Thread Zhu Yanjun
From: Zhu Yanjun The function xsk_map_inc always returns zero. As such, changing the return type to void and removing the test code. Signed-off-by: Zhu Yanjun Signed-off-by: Zhu Yanjun --- net/xdp/xsk.c|1 - net/xdp/xsk.h|2 +- net/xdp/xskmap.c | 10 ++ 3 files

Re: [PATCH 1/1] RDMA/rxe: Fetch skb packets from ethernet layer

2020-11-11 Thread Zhu Yanjun
On Tue, Nov 10, 2020 at 9:58 AM Zhu Yanjun wrote: > > On Tue, Nov 10, 2020 at 2:25 AM Jakub Kicinski wrote: > > > > On Sun, 8 Nov 2020 13:27:32 +0800 Zhu Yanjun wrote: > > > On Sun, Nov 8, 2020 at 1:24 PM Zhu Yanjun wrote: > > > > On Thu, 5 N

Re: [PATCH 1/1] RDMA/rxe: Fetch skb packets from ethernet layer

2020-11-09 Thread Zhu Yanjun
On Tue, Nov 10, 2020 at 2:25 AM Jakub Kicinski wrote: > > On Sun, 8 Nov 2020 13:27:32 +0800 Zhu Yanjun wrote: > > On Sun, Nov 8, 2020 at 1:24 PM Zhu Yanjun wrote: > > > On Thu, 5 Nov 2020 19:12:01 +0800 Zhu Yanjun wrote: > > > > > > In the original design

Re: [PATCH 1/1] RDMA/rxe: Fetch skb packets from ethernet layer

2020-11-07 Thread Zhu Yanjun
On Sun, Nov 8, 2020 at 1:24 PM Zhu Yanjun wrote: > > > > > Forwarded Message > Subject: Re: [PATCH 1/1] RDMA/rxe: Fetch skb packets from ethernet layer > Date: Sat, 7 Nov 2020 12:26:17 -0800 > From: Jakub Kicinski > To: Zhu Yanjun > CC: dled

[PATCH 1/1] net/mlx5e: remove unnecessary memset

2020-11-06 Thread Zhu Yanjun
Since kvzalloc will initialize the allocated memory, it is not necessary to initialize it once again. Fixes: 11b717d61526 ("net/mlx5: E-Switch, Get reg_c0 value on CQE") Signed-off-by: Zhu Yanjun --- .../ethernet/mellanox/mlx5/core/eswitch_offloads.c |1 - 1 files changed, 0

[PATCH 1/1] RDMA/rxe: Fetch skb packets from ethernet layer

2020-11-05 Thread Zhu Yanjun
ethernet layer. This increases bandwidth and decreases latency. Signed-off-by: Zhu Yanjun --- drivers/infiniband/sw/rxe/rxe_net.c | 45 ++- 1 files changed, 44 insertions(+), 1 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe

Re: [PATCH 1/1] MAINTAINERS: SOFT-ROCE: Change Zhu Yanjun's email address

2020-08-16 Thread Zhu Yanjun
On Sun, Aug 16, 2020 at 3:45 PM Leon Romanovsky wrote: > > On Sun, Aug 16, 2020 at 01:25:50PM +0800, Zhu Yanjun wrote: > > I prefer to use this email address for kernel related work. > > > > Signed-off-by: Zhu Yanjun > > --- > > MAINTAINERS |2 +- >

[PATCH 1/1] MAINTAINERS: SOFT-ROCE: Change Zhu Yanjun's email address

2020-08-15 Thread Zhu Yanjun
I prefer to use this email address for kernel related work. Signed-off-by: Zhu Yanjun --- MAINTAINERS |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index e02479a..065225f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -15833,7 +15833,7 @@ F

Re: Bonding driver unexpected behaviour

2020-07-16 Thread Zhu Yanjun
On Thu, Jul 16, 2020 at 6:20 PM Riccardo Paolo Bestetti wrote: > > Hello Zhu Yanjun, > > On Thursday, July 16, 2020 11:45 CEST, Zhu Yanjun > wrote: > > > On Thu, Jul 16, 2020 at 4:08 PM Riccardo Paolo Bestetti > > wrote: > > > > > > > &

Re: Bonding driver unexpected behaviour

2020-07-16 Thread Zhu Yanjun
On Thu, Jul 16, 2020 at 4:08 PM Riccardo Paolo Bestetti wrote: > > Hello Zhu Yanjun, > > On Thursday, July 16, 2020 09:45 CEST, Zhu Yanjun > wrote: > > You can use team to make tests. > I'm not sure I understand what you mean. Could you point me to rele

Re: Bonding driver unexpected behaviour

2020-07-16 Thread Zhu Yanjun
On Thu, Jul 16, 2020 at 3:08 PM Riccardo Paolo Bestetti wrote: > > Hello Zhu Yanjun, > > On Thursday, July 16, 2020 05:41 CEST, Zhu Yanjun > wrote: > > > > > Please check this > > https://developers.redhat.com/blog/2019/05/17/an-introduction-to-l

Re: Bonding driver unexpected behaviour

2020-07-15 Thread Zhu Yanjun
d > bond-15-16 (e.g. who-has > 10.188.15.100 tell 10.188.15.100, who-has 10.188.15.100 tell 10.188.15.200, > ..., who-hash > 10.42.42.200 tell 10.42.42.200). Please check this https://developers.redhat.com/blog/2019/05/17/an-introduction-to-linux-virtual-interfaces-tunnels/#gre

Re: [PATCH] net: forcedeth: add xmit_more support

2019-10-22 Thread Zhu Yanjun
On 2019/10/22 23:40, Jakub Kicinski wrote: On Tue, 22 Oct 2019 13:32:35 +0800, Zhu Yanjun wrote: On 2019/10/21 23:33, Jakub Kicinski wrote: On Mon, 21 Oct 2019 17:56:06 +0800, Zhu Yanjun wrote: On 2019/10/19 6:48, Jakub Kicinski wrote: On Fri, 18 Oct 2019 06:01:25 -0400, Zhu Yanjun wrote

[PATCHv2 1/1] net: forcedeth: add xmit_more support

2019-10-22 Thread Zhu Yanjun
1.10 GBytes 942 Mbits/sec CC: Joe Jin CC: JUNXIAO_BI Reported-and-tested-by: Nan san Signed-off-by: Zhu Yanjun --- V1->V2: use the lower case label. --- drivers/net/ethernet/nvidia/forcedeth.c | 37 +++-- 1 file changed, 31 insertions(+), 6 deletions(-) d

Re: [PATCH] net: forcedeth: add xmit_more support

2019-10-21 Thread Zhu Yanjun
On 2019/10/21 23:33, Jakub Kicinski wrote: On Mon, 21 Oct 2019 17:56:06 +0800, Zhu Yanjun wrote: On 2019/10/19 6:48, Jakub Kicinski wrote: On Fri, 18 Oct 2019 06:01:25 -0400, Zhu Yanjun wrote: This change adds support for xmit_more based on the igb commit 6f19e12f6230 ("igb: flush wh

Re: [PATCH] net: forcedeth: add xmit_more support

2019-10-21 Thread Zhu Yanjun
On 2019/10/19 6:48, Jakub Kicinski wrote: On Fri, 18 Oct 2019 06:01:25 -0400, Zhu Yanjun wrote: This change adds support for xmit_more based on the igb commit 6f19e12f6230 ("igb: flush when in xmit_more mode and under descriptor pressure") and commit 6b16f9ee89b8 ("net: move

[PATCH] net: forcedeth: add xmit_more support

2019-10-18 Thread Zhu Yanjun
1.10 GBytes 942 Mbits/sec CC: Joe Jin CC: JUNXIAO_BI Reported-and-tested-by: Nan san Signed-off-by: Zhu Yanjun --- drivers/net/ethernet/nvidia/forcedeth.c | 37 +++-- 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/nvid

[PATCHv3 0/1] Fix deadlock problem and make performance better

2019-09-05 Thread Zhu Yanjun
ric's advice, "If the loops are ever restarted, the storage->fields will have been modified multiple times.". A similar change in the commit 5f6b4e14cada ("net: dsa: User per-cpu 64-bit statistics") is borrowed to fix the above problem. Zhu Yanjun (1): forcedeth: use per

[PATCHv3 1/1] forcedeth: use per cpu to collect xmit/recv statistics

2019-09-05 Thread Zhu Yanjun
Reported-and-tested-by: Nan san Signed-off-by: Zhu Yanjun --- V2->V3: Following David's advice, fix the problem "Never use the inline keyword in foo.c files, let the compiler decide." V1->V2: Following Eric's advice fix the problem "If the loops are ever

Re: [PATCHv2 1/1] forcedeth: use per cpu to collect xmit/recv statistics

2019-09-04 Thread Zhu Yanjun
On 2019/9/5 6:22, David Miller wrote: From: Zhu Yanjun Date: Sun, 1 Sep 2019 03:26:13 -0400 +static inline void nv_get_stats(int cpu, struct fe_priv *np, + struct rtnl_link_stats64 *storage) ... +static inline void rx_missing_handler(u32 flags, struct

Re: [PATCHv2 1/1] net: rds: add service level support in rds-info

2019-09-03 Thread Zhu Yanjun
On 2019/9/3 9:58, Gustavo A. R. Silva wrote: Hi, On 8/23/19 8:04 PM, Zhu Yanjun wrote: [..] diff --git a/net/rds/ib.c b/net/rds/ib.c index ec05d91..45acab2 100644 --- a/net/rds/ib.c +++ b/net/rds/ib.c @@ -291,7 +291,7 @@ static int rds_ib_conn_info_visitor(struct rds_connection *conn

[PATCHv2 1/1] forcedeth: use per cpu to collect xmit/recv statistics

2019-09-01 Thread Zhu Yanjun
Reported-and-tested-by: Nan san Signed-off-by: Zhu Yanjun --- V1->V2: Following Eric's advice fix the problem "If the loops are ever restarted, the storage->fields will have been modified multiple times." --- drivers/net/ethernet/nvidia/forcedeth.c |

[PATCHv2 0/1] Fix deadlock problem and make performance better

2019-09-01 Thread Zhu Yanjun
) is borrowed to fix the above problem. Zhu Yanjun (1): forcedeth: use per cpu to collect xmit/recv statistics drivers/net/ethernet/nvidia/forcedeth.c | 143 ++-- 1 file changed, 99 insertions(+), 44 deletions(-) -- 2.7.4

Re: [PATCH 1/1] forcedeth: use per cpu to collect xmit/recv statistics

2019-08-30 Thread Zhu Yanjun
On 2019/8/30 17:32, Eric Dumazet wrote: On 8/30/19 10:35 AM, Zhu Yanjun wrote: When testing with a background iperf pushing 1Gbit/sec traffic and running both ifconfig and netstat to collect statistics, some deadlocks occurred. This is quite a heavy patch trying to fix a bug... This is to

[PATCH 0/1] Fix deadlock problem and make performance better

2019-08-30 Thread Zhu Yanjun
dead locks disappear even after very long time running with 1Gbit/sec. Zhu Yanjun (1): forcedeth: use per cpu to collect xmit/recv statistics drivers/net/ethernet/nvidia/forcedeth.c | 132 +--- 1 file changed, 88 insertions(+), 44 deletions(-) -- 2.7.4

[PATCH 1/1] forcedeth: use per cpu to collect xmit/recv statistics

2019-08-30 Thread Zhu Yanjun
0 0 BMRU ... Fixes: f5d827aece36 ("forcedeth: implement ndo_get_stats64() API") CC: Joe Jin CC: JUNXIAO_BI Reported-and-tested-by: Nan san Signed-off-by: Zhu Yanjun --- drivers/net/ethernet/nvidia/forcedeth.c | 132 +--- 1 file changed, 88 inse

Re: [PATCHv2 1/1] net: rds: add service level support in rds-info

2019-08-25 Thread Zhu Yanjun
On 2019/8/25 7:58, David Miller wrote: From: Zhu Yanjun Date: Fri, 23 Aug 2019 21:04:16 -0400 diff --git a/include/uapi/linux/rds.h b/include/uapi/linux/rds.h index fd6b5f6..cba368e 100644 --- a/include/uapi/linux/rds.h +++ b/include/uapi/linux/rds.h @@ -250,6 +250,7 @@ struct

Re: [PATCHv2 1/1] net: rds: add service level support in rds-info

2019-08-23 Thread Zhu Yanjun
On 2019/8/24 9:25, santosh.shilim...@oracle.com wrote: On 8/23/19 6:04 PM, Zhu Yanjun wrote:  From IB specific 7.6.5 SERVICE LEVEL, Service Level (SL) is used to identify different flows within an IBA subnet. It is carried in the local route header of the packet. Before this commit, run &quo

[PATCHv2 1/1] net: rds: add service level support in rds-info

2019-08-23 Thread Zhu Yanjun
n cache statistics") CC: Joe Jin CC: JUNXIAO_BI Suggested-by: Gerd Rausch Signed-off-by: Zhu Yanjun --- V1->V2: fix typos in commit logs. --- include/uapi/linux/rds.h |2 ++ net/rds/ib.c | 16 ++-- net/rds/ib.h |1 + net/rds/ib_cm.c |

Re: [PATCH 1/1] net: rds: add service level support in rds-info

2019-08-20 Thread Zhu Yanjun
Hi,Doug My reply is in line. On 2019/8/20 23:28, Doug Ledford wrote: On Mon, 2019-08-19 at 20:52 -0400, Zhu Yanjun wrote: diff --git a/include/uapi/linux/rds.h b/include/uapi/linux/rds.h index fd6b5f6..cba368e 100644 --- a/include/uapi/linux/rds.h +++ b/include/uapi/linux/rds.h @@ -250,6

[PATCH 1/1] net: rds: add service level support in rds-info

2019-08-19 Thread Zhu Yanjun
tistics") CC: Joe Jin CC: JUNXIAO_BI Suggested-by: Gerd Rausch Signed-off-by: Zhu Yanjun --- include/uapi/linux/rds.h |2 ++ net/rds/ib.c | 16 ++-- net/rds/ib.h |1 + net/rds/ib_cm.c |3 +++ net/rds/rdma_transport.c | 10 +

[PATCHv2 1/2] forcedeth: add recv cache to make nic work steadily

2019-07-21 Thread Zhu Yanjun
. Then recv cache will continue allocate skb with GFP_KERNEL until the recv cache is filled up. When the system memory is not enough, this can make nic work steadily. Becase of recv cache, the performance of nic is enhanced. CC: Joe Jin CC: Junxiao Bi Tested-by: Nan san Signed-off-by: Zhu Yanjun

[PATCHv2 2/2] forcedeth: disable recv cache by default

2019-07-21 Thread Zhu Yanjun
. So this recv cache is disabled by default. CC: Joe Jin CC: Junxiao Bi Tested-by: Nan san Signed-off-by: Zhu Yanjun --- drivers/net/ethernet/nvidia/Kconfig | 11 drivers/net/ethernet/nvidia/Makefile| 1 + drivers/net/ethernet/nvidia/forcedeth.c | 46

[PATCHv2 0/2] forcedeth: recv cache to make NIC work steadily

2019-07-21 Thread Zhu Yanjun
is moved out of while loop. Zhu Yanjun (2): forcedeth: add recv cache make nic work steadily forcedeth: disable recv cache by default drivers/net/ethernet/nvidia/Kconfig | 11 +++ drivers/net/ethernet/nvidia/Makefile| 1 + drivers/net/ethernet/nvi

Re: [PATCH 1/2] forcedeth: add recv cache make nic work steadily

2019-07-05 Thread Zhu Yanjun
Add Nan He is interested this commit. 在 2019/7/5 14:19, Zhu Yanjun 写道: A recv cache is added. The size of recv cache is 1000Mb / skb_length. When the system memory is not enough, this recv cache can make nic work steadily. When nic is up, this recv cache and work queue are created. When nic is

[PATCH 2/2] forcedeth: disable recv cache by default

2019-07-04 Thread Zhu Yanjun
. So this recv cache is disabled by default. CC: Joe Jin CC: Junxiao Bi Signed-off-by: Zhu Yanjun --- drivers/net/ethernet/nvidia/Kconfig | 11 +++ drivers/net/ethernet/nvidia/Makefile| 1 + drivers/net/ethernet/nvidia/forcedeth.c | 34 ++--- 3 files

[PATCH 1/2] forcedeth: add recv cache make nic work steadily

2019-07-04 Thread Zhu Yanjun
: Junxiao Bi Signed-off-by: Zhu Yanjun --- drivers/net/ethernet/nvidia/forcedeth.c | 100 +++- 1 file changed, 98 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c index b327b29..a673005 100644 --- a

[PATCH 0/2] forcedeth: recv cache support

2019-07-04 Thread Zhu Yanjun
own/up modprobe/rmmod forcedeth ip link set mtu 1500 dev forcedeth_nic ethtool -G forcedeth_nic tx 512 rx 1024 And other tests, the NIC with the recv cache can work well. Since the recv cache will reserve 125M memory for NIC, normally this recv cache is disabled by default. Zhu Yanjun (2): forced

[PATCH 1/1] net: rds: fix memory leak in rds_ib_flush_mr_pool

2019-06-06 Thread Zhu Yanjun
ot be used again. The workqueue is executed periodically. So more and more clean_nodes are discarded. Finally the clean_list is NULL. Then this problem will occur. Fixes: 1bc144b62524 ("net, rds, Replace xlist in net/rds/xlist.h with llist") Signed-off-by: Zhu Yanjun --- net/rds/ib_rdma.

[PATCH 1/1] net: rds: fix memory leak when unload rds_rdma

2019-06-03 Thread Zhu Yanjun
us | } 19) 2.285 us|rds_cong_remove_conn [rds](); 19) * 24062.76 us | } " So if many rds connections will be destroyed, this function rds_ib_destroy_nodev_conns uses most of time. Suggested-by: Håkon Bugge Signed-off-by: Zhu Yanjun --- net/rds/ib.c | 2 +- net/rds/ib_recv

[PATCHv2 1/1] net: rds: add per rds connection cache statistics

2019-06-02 Thread Zhu Yanjun
he kernel rds.h, the change in kernel rds.h does not affect rds-tools. rds-info in rds-tools 2.0.5 and 2.0.6 is tested with this commit. It works well. Signed-off-by: Zhu Yanjun --- V1->V2: RDS CI is removed. --- include/uapi/linux/rds.h | 2 ++ net/rds/ib.c | 2 ++ 2 files changed

[PATCH 1/1] net: rds: add per rds connection cache statistics

2019-06-01 Thread Zhu Yanjun
1.1.14 1.1.1.14 58 255 fe80::2:c903:a:7a31 fe80::2:c903:a:7a31 send_wr=256, recv_wr=1024, send_sge=8, rdma_mr_max=4096, rdma_mr_size=257, cache_allocs=12 " This means that there are about 12KiB frag in this rds connection frag cache. Tested-by: RDS CI Signed-off-by: Zhu Yanju

[PATCH 1/1] net: rds: exchange of 8K and 1M pool

2019-04-23 Thread Zhu Yanjun
0 100 0.00 0.00 0.000.00 0.00 -1.00 ... " So this exchange between 8K and 1M pool is added back. Fixes: commit 490ea5967b0d ("RDS: IB: move FMR code to its own file") Signed-off-by: Zhu Yanjun --- net/rds/ib_fmr.c | 11 +++ net/rds/ib_rdma.c | 3 -

Re: [net-next PATCH] net/rds: Return proper "tos" value to user-space

2019-03-08 Thread Zhu Yanjun
ction populates it "iinfo->tos" so 'rds-info -I' already should be showing the correct output but we should popullate it here to for socket option so looks good "rds-info -I" did show the correct output, but "rds-info -n" did not: Thanks. Reviewed-by: Zh

Re: [PATCH] net: nvidia: forcedeth: Fix two possible concurrency use-after-free bugs

2019-01-08 Thread Zhu Yanjun
在 2019/1/8 20:45, Jia-Ju Bai 写道: In drivers/net/ethernet/nvidia/forcedeth.c, the functions nv_start_xmit() and nv_start_xmit_optimized() can be concurrently executed with nv_poll_controller(). nv_start_xmit line 2321: prev_tx_ctx->skb = skb; nv_start_xmit_optimized line 2479: prev_tx_ct

[PATCH 1/1] net: rds: remove unnecessary NULL check

2018-12-30 Thread Zhu Yanjun
In kfree, the NULL check is done. Signed-off-by: Zhu Yanjun --- net/rds/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rds/tcp.c b/net/rds/tcp.c index b9bbcf3d6c63..c16f0a362c32 100644 --- a/net/rds/tcp.c +++ b/net/rds/tcp.c @@ -623,7 +623,7 @@ static void

[PATCHv2 net-next 1/1] net: rds: use memset to optimize the recv

2018-09-16 Thread Zhu Yanjun
The function rds_inc_init is in recv process. To use memset can optimize the function rds_inc_init. The test result: Before: 1) + 24.950 us |rds_inc_init [rds](); After: 1) + 10.990 us |rds_inc_init [rds](); Acked-by: Santosh Shilimkar Signed-off-by: Zhu

[PATCH 1/1] net: rds: use memset to optimize the recv

2018-09-14 Thread Zhu Yanjun
The function rds_inc_init is in recv process. To use memset can optimize the function rds_inc_init. The test result: Before: 1) + 24.950 us |rds_inc_init [rds](); After: 1) + 10.990 us |rds_inc_init [rds](); Signed-off-by: Zhu Yanjun --- net/rds/recv.c | 5

[PATCH 1/1] net/rds: Use rdma_read_gids to get connection SGID/DGID in IPv6

2018-08-25 Thread Zhu Yanjun
connections returns MAC address, instead of DGID. rdma_addr_get_sgid() for RoCE doesn't return correct SGID for IPv6 and when more than one IP address is assigned to the netdevice. So the transport agnostic rdma_read_gids() API is provided by rdma_cm module. Signed-off-by: Zhu Yanjun --- net/rds/ib.

[PATCH 1/1] Revert "rds: ib: add error handle"

2018-04-23 Thread Zhu Yanjun
This reverts commit 3b12f73a5c2977153f28a224392fd4729b50d1dc. After long time discussion and investigations, it seems that there is no mem leak. So this patch is reverted. Signed-off-by: Zhu Yanjun --- net/rds/ib_cm.c | 47 +++ 1 file changed, 11

[PATCHv2 1/1] net/mlx4_core: avoid resetting HCA when accessing an offline device

2018-04-18 Thread Zhu Yanjun
this patch, since HCA is offline, the function mlx4_cmd_post returns an error -EINVAL. Per -EINVAL, the function mlx4_cmd_poll directly returns instead of resetting HCA. CC: Srinivas Eeda CC: Junxiao Bi Suggested-by: Håkon Bugge Suggested-by: Tariq Toukan Signed-off-by: Zhu Yanjun --- V1-&

[PATCH 1/1] net/mlx4_core: avoid resetting HCA when accessing an offline device

2018-04-15 Thread Zhu Yanjun
this patch, since HCA is offline, the function mlx4_cmd_post returns an error -EINVAL. Per -EINVAL, the function mlx4_cmd_poll directly returns instead of resetting HCA. CC: Srinivas Eeda CC: Junxiao Bi Suggested-by: Håkon Bugge Signed-off-by: Zhu Yanjun --- drivers/net/ethernet/mellanox/mlx4

[PATCH net-next 1/1] forcedeth: remove duplicate structure member in rx

2018-01-22 Thread Zhu Yanjun
Since both first_rx_ctx and rx_skb are the head of rx ctx, it not necessary to use two structure members to statically indicate the head of rx ctx. So first_rx_ctx is removed. CC: Srinivas Eeda CC: Joe Jin CC: Junxiao Bi Signed-off-by: Zhu Yanjun --- drivers/net/ethernet/nvidia/forcedeth.c

[PATCHv2 net-next 1/1] forcedeth: remove unused variable

2018-01-16 Thread Zhu Yanjun
The variable miistat is not used. So it is removed. CC: Srinivas Eeda CC: Joe Jin CC: Junxiao Bi Signed-off-by: Zhu Yanjun --- v1->v2: Keep readl function --- drivers/net/ethernet/nvidia/forcedeth.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/

[PATCH net-next 1/1] forcedeth: remove unused variable

2018-01-14 Thread Zhu Yanjun
The variable miistat is not used. So it is removed. CC: Srinivas Eeda CC: Joe Jin CC: Junxiao Bi Signed-off-by: Zhu Yanjun --- drivers/net/ethernet/nvidia/forcedeth.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers

[PATCH NET-NEXT 1/1] forcedeth: remove duplicate structure member in rx

2018-01-04 Thread Zhu Yanjun
Since both first_rx and rx_ring are the head of rx ring, it not necessary to use two structure members to statically indicate the head of rx ring. So first_rx is removed. CC: Srinivas Eeda CC: Joe Jin CC: Junxiao Bi Signed-off-by: Zhu Yanjun --- drivers/net/ethernet/nvidia/forcedeth.c | 17

[PATCH net-next 1/1] forcedeth: optimize the rx with likely

2017-12-25 Thread Zhu Yanjun
In the rx fastpath, the function netdev_alloc_skb rarely fails. Therefore, a likely() optimization is added to this error check conditional. CC: Srinivas Eeda CC: Joe Jin CC: Junxiao Bi Signed-off-by: Zhu Yanjun --- drivers/net/ethernet/nvidia/forcedeth.c | 4 ++-- 1 file changed, 2

[PATCH net-next 1/1] forcedeth: remove duplicate structure member in xmit

2017-12-16 Thread Zhu Yanjun
Since both first_tx_ctx and tx_skb are the head of tx ctx, it not necessary to use two structure members to statically indicate the head of tx ctx. So first_tx_ctx is removed. CC: Srinivas Eeda CC: Joe Jin CC: Junxiao Bi Signed-off-by: Zhu Yanjun --- drivers/net/ethernet/nvidia/forcedeth.c

[PATCHv2 net-next 1/1] forcedeth: remove unnecessary structure member

2017-12-09 Thread Zhu Yanjun
Since both tx_ring and first_tx are the head of tx ring, it not necessary to use two structure members to statically indicate the head of tx ring. So first_tx is removed. CC: Srinivas Eeda CC: Joe Jin CC: Junxiao Bi Signed-off-by: Zhu Yanjun --- drivers/net/ethernet/nvidia/forcedeth.c | 21

[PATCH net-next 1/1] forcedeth: remove unnecessary variable

2017-12-06 Thread Zhu Yanjun
Since both tx_ring and first_tx are the head of tx ring, it not necessary to use two variables. So first_tx is removed. CC: Srinivas Eeda CC: Joe Jin CC: Junxiao Bi Signed-off-by: Zhu Yanjun --- drivers/net/ethernet/nvidia/forcedeth.c | 21 +++-- 1 file changed, 11 insertions

[PATCH net-next 1/1] forcedeth: optimize the xmit with unlikely

2017-11-27 Thread Zhu Yanjun
In xmit, it is very impossible that TX_ERROR occurs. So using unlikely optimizes the xmit process. CC: Srinivas Eeda CC: Joe Jin CC: Junxiao Bi Signed-off-by: Zhu Yanjun --- drivers/net/ethernet/nvidia/forcedeth.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a

[PATCHv2 net-next 1/1] forcedeth: replace pci_unmap_page with dma_unmap_page

2017-11-19 Thread Zhu Yanjun
The function pci_unmap_page is obsolete. So it is replaced with the function dma_unmap_page. CC: Srinivas Eeda CC: Joe Jin CC: Junxiao Bi Signed-off-by: Zhu Yanjun --- V1->V2: fix direction flag error. --- drivers/net/ethernet/nvidia/forcedeth.c | 4 ++-- 1 file changed, 2 insertions(+)

[PATCH net-next 1/1] forcedeth: replace pci_unmap_page with dma_unmap_page

2017-11-19 Thread Zhu Yanjun
The function pci_unmap_page is obsolete. So it is replaced with the function dma_unmap_page. CC: Srinivas Eeda CC: Joe Jin CC: Junxiao Bi Signed-off-by: Zhu Yanjun --- drivers/net/ethernet/nvidia/forcedeth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net

[PATCHv3 1/1] bnx2x: fix slowpath null crash

2017-11-11 Thread Zhu Yanjun
cked. And in the function bnx2x_sp_rtnl_task, after dma memory allocation fails, another shutdown and open NIC is executed. CC: Joe Jin CC: Junxiao Bi Signed-off-by: Zhu Yanjun Acked-by: Ariel Elior --- v2->v3 Changes: fix the style of comments, add the leading space V1->v2 Changes: a

[PATCH net-next 1/1] forcedeth: remove redudant assignments in xmit

2017-11-10 Thread Zhu Yanjun
In xmit process, the variables are set many times. In fact, it is enough for these variables to be set once. After a long time test, the throughput performance is better than before. CC: Srinivas Eeda CC: Joe Jin CC: Junxiao Bi Signed-off-by: Zhu Yanjun --- drivers/net/ethernet/nvidia

[PATCHv2 1/1] bnx2x: fix slowpath null crash

2017-11-08 Thread Zhu Yanjun
cked. And in the function bnx2x_sp_rtnl_task, after dma memory allocation fails, another shutdown and open NIC is executed. CC: Joe Jin CC: Junxiao Bi Signed-off-by: Zhu Yanjun Acked-by: Ariel Elior --- V1->v2 Changes: add Acker and remove unnecessary brackets --- drivers/net/ethernet/broa

  1   2   >