Re: [PATCH] net/mlx5e: Allow removing representors netdev to other namespace

2019-05-21 Thread Tonghao Zhang
On Wed, May 22, 2019 at 12:45 AM Or Gerlitz wrote: > > On Tue, May 21, 2019 at 7:36 AM Tonghao Zhang > wrote: > > On Tue, May 21, 2019 at 4:24 AM Or Gerlitz wrote: > > > > > > On Mon, May 20, 2019 at 3:19 PM wrote: > > > > > > > > From

Re: [PATCH] net/mlx5e: Allow matching only enc_key_id/enc_dst_port for decapsulation action

2019-05-24 Thread Tonghao Zhang
On Sun, May 12, 2019 at 5:08 PM Roi Dayan wrote: > > > > On 06/05/2019 21:28, xiangxia.m@gmail.com wrote: > > From: Tonghao Zhang > > > > In some case, we don't care the enc_src_ip and enc_dst_ip, and > > if we don't match the field enc_src_ip

Re: [PATCH] net/mlx5e: Allow removing representors netdev to other namespace

2019-07-31 Thread Tonghao Zhang
On Wed, May 22, 2019 at 12:49 PM Or Gerlitz wrote: > > On Wed, May 22, 2019 at 4:26 AM Tonghao Zhang > wrote: > > > I review the reps of netronome nfp codes, nfp does't set the > > NETIF_F_NETNS_LOCAL to netdev->features. > > And I changed the OFED codes

Re: [PATCH net-next] openvswitch: Use IS_ERR instead of IS_ERR_OR_NULL

2020-11-01 Thread Tonghao Zhang
> Signed-off-by: YueHaibing Acked-by: Tonghao Zhang > --- > net/openvswitch/meter.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/openvswitch/meter.c b/net/openvswitch/meter.c > index 8fbefd52af7f..15424d26e85d 100644 > --- a/net/openvswit

Re: [ovs-dev] [PATCH net] openvswitch: fix send of uninitialized stack memory in ct limit reply

2021-04-04 Thread Tonghao Zhang
.zone_id = OVS_ZONE_LIMIT_DEFAULT_ZONE, > > + .limit = info->default_limit, > > + }; I review the code, userspace don't use the count of ovs_zone_lime struct, but this patch looks to to me. Thanks Ilya. Acked-by: Tonghao Zhang > > retur

Re: [PATCH] net: sock: simplify tw proto registration

2021-03-09 Thread Tonghao Zhang
On Wed, Mar 10, 2021 at 1:39 AM Alexander Duyck wrote: > > On Mon, Mar 8, 2021 at 7:15 PM wrote: > > > > From: Tonghao Zhang > > > > Introduce a new function twsk_prot_init, inspired by > > req_prot_init, to simplify the "proto_register"

Re: [PATCH] net: sock: simplify tw proto registration

2021-03-10 Thread Tonghao Zhang
On Wed, Mar 10, 2021 at 10:42 AM Alexander Duyck wrote: > > On Tue, Mar 9, 2021 at 5:48 PM Tonghao Zhang wrote: > > > > On Wed, Mar 10, 2021 at 1:39 AM Alexander Duyck > > wrote: > > > > > > On Mon, Mar 8, 2021 at 7:15 PM wrote: > > > > &g

Re: [PATCH net-next v2] net: sock: simplify tw proto registration

2021-03-13 Thread Tonghao Zhang
On Fri, Mar 12, 2021 at 10:15 PM Eric Dumazet wrote: > > > > On 3/12/21 1:10 AM, patchwork-bot+netdev...@kernel.org wrote: > > Hello: > > > > This patch was applied to netdev/net.git (refs/heads/master): > > > > On Thu, 11 Mar 2021 10:57:36

Re: [ovs-discuss] Double free in recent kernels after memleak fix

2020-08-10 Thread Tonghao Zhang
On Tue, Aug 11, 2020 at 4:28 AM Paul E. McKenney wrote: > > On Mon, Aug 10, 2020 at 04:08:59PM -0400, Joel Fernandes wrote: > > On Fri, Aug 07, 2020 at 03:20:15PM -0700, Paul E. McKenney wrote: > > > On Fri, Aug 07, 2020 at 04:47:56PM -0400, Joel Fernandes wrote: > > > > Hi, > > > > Adding more of

Re: [ovs-discuss] Double free in recent kernels after memleak fix

2020-08-10 Thread Tonghao Zhang
On Tue, Aug 11, 2020 at 10:24 AM Cong Wang wrote: > > On Mon, Aug 10, 2020 at 6:16 PM Tonghao Zhang > wrote: > > Hi all, I send a patch to fix this. The rcu warnings disappear. I > > don't reproduce the double free issue. > > But I guess this patch may

Re: [ovs-discuss] Double free in recent kernels after memleak fix

2020-08-10 Thread Tonghao Zhang
On Tue, Aug 11, 2020 at 12:08 PM Cong Wang wrote: > > On Mon, Aug 10, 2020 at 8:27 PM Tonghao Zhang > wrote: > > > > On Tue, Aug 11, 2020 at 10:24 AM Cong Wang wrote: > > > > > > On Mon, Aug 10, 2020 at 6:16 PM Tonghao Zhang > > > wrote: >

Re: [PATCH v2] net: openvswitch: introduce common code for flushing flows

2020-08-15 Thread Tonghao Zhang
On Sat, Aug 15, 2020 at 3:28 AM Johan Knöös wrote: > > On Thu, Aug 13, 2020 at 3:53 PM David Miller wrote: > > > > From: xiangxia.m@gmail.com > > Date: Wed, 12 Aug 2020 17:56:39 +0800 > > > > > From: Tonghao Zhang > > > > > > To av

Re: [PATCH net-next v1 2/3] net: openvswitch: refactor flow free function

2020-08-24 Thread Tonghao Zhang
On Thu, Aug 20, 2020 at 9:52 AM David Miller wrote: > > From: Tonghao Zhang > Date: Thu, 20 Aug 2020 07:21:33 +0800 > > > On Thu, Aug 20, 2020 at 6:52 AM David Miller wrote: > > > >> From: xiangxia.m@gmail.com > >> > >> Date: Tue, 18 Aug

Re: [PATCH net-next v2 2/3] net: openvswitch: refactor flow free function

2020-08-24 Thread Tonghao Zhang
On Mon, Aug 24, 2020 at 9:09 PM David Miller wrote: > > From: xiangxia.m@gmail.com > Date: Mon, 24 Aug 2020 15:36:01 +0800 > > > To avoid a bug when deleting flows in the future, add > > BUG_ON in flush flows function. > > BUG_ON() is too severe, I think WARN_ON() or similar are sufficient > b

[PATCH 1/3] bonding: replace the return value type

2018-05-11 Thread Tonghao Zhang
The method ndo_start_xmit is defined as returning a netdev_tx_t, which is a typedef for an enum type, but the implementation in this driver returns an int. Signed-off-by: Tonghao Zhang --- drivers/net/bonding/bond_alb.c | 8 drivers/net/bonding/bond_main.c | 12 2 files

[PATCH 2/3] bonding: use the skb_get/set_queue_mapping

2018-05-11 Thread Tonghao Zhang
Use the skb_get_queue_mapping, skb_set_queue_mapping and skb_rx_queue_recorded for skb queue_mapping in bonding driver, but not use it directly. Signed-off-by: Tonghao Zhang --- drivers/net/bonding/bond_main.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers

[PATCH 3/3] net: doc: fix spelling mistake: "modrobe.d" -> "modprobe.d"

2018-05-11 Thread Tonghao Zhang
Signed-off-by: Tonghao Zhang --- Documentation/networking/bonding.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt index 9ba04c0..c13214d 100644 --- a/Documentation/networking/bonding.txt +++ b

[PATCH 1/3] bonding: replace the return value type

2018-05-11 Thread Tonghao Zhang
The method ndo_start_xmit is defined as returning a netdev_tx_t, which is a typedef for an enum type, but the implementation in this driver returns an int. Signed-off-by: Tonghao Zhang --- drivers/net/bonding/bond_alb.c | 8 drivers/net/bonding/bond_main.c | 12 2 files

[PATCH 1/2] tcp: Remove unnecessary dst check in tcp_conn_request.

2017-08-16 Thread Tonghao Zhang
, and we remove the unnecessay check. Signed-off-by: Tonghao Zhang --- net/ipv4/tcp_input.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index d73903fe8c83..7eee2c7ddb7a 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp

[PATCH 2/2] tcp: Remove the unused parameter for tcp_try_fastopen.

2017-08-16 Thread Tonghao Zhang
Signed-off-by: Tonghao Zhang --- include/net/tcp.h | 3 +-- net/ipv4/tcp_fastopen.c | 6 ++ net/ipv4/tcp_input.c| 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/include/net/tcp.h b/include/net/tcp.h index afdab3781425..a995004ae946 100644 --- a/include/net

[PATCH net-next v2 0/2] simplify the tcp_conn_request.

2017-08-16 Thread Tonghao Zhang
These patches are not bugfix. But just simplify the tcp_conn_request function. These patches are based on Davem's net-next tree. Tonghao Zhang (2): tcp: Remove unnecessary dst check in tcp_conn_request. tcp: Remove the unused parameter for tcp_try_fastopen. include/net/tcp.h

[PATCH net-next v2 1/2] tcp: Remove unnecessary dst check in tcp_conn_request.

2017-08-16 Thread Tonghao Zhang
, and we remove the unnecessay check. Signed-off-by: Tonghao Zhang --- net/ipv4/tcp_input.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index d73903f..7eee2c7 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp

Re: [PATCH 1/2] tcp: Remove unnecessary dst check in tcp_conn_request.

2017-08-16 Thread Tonghao Zhang
On Wed, Aug 16, 2017 at 10:44 PM, Eric Dumazet wrote: > On Wed, 2017-08-16 at 06:31 -0700, Tonghao Zhang wrote: >> Because we remove the tcp_tw_recycle support in the commit > > >> 4396e46187c ('tcp: remove tcp_tw_recycle') and also delete >> the code 'a

[PATCH net-next v2 0/2] simplify the tcp_conn_request.

2017-08-16 Thread Tonghao Zhang
These patches are not bugfix. But just simplify the tcp_conn_request function. These patches are based on Davem's net-next tree. Tonghao Zhang (2): tcp: Remove unnecessary dst check in tcp_conn_request. tcp: Remove the unused parameter for tcp_try_fastopen. include/net/tcp.h

[PATCH net-next v2 2/2] tcp: Remove the unused parameter for tcp_try_fastopen.

2017-08-16 Thread Tonghao Zhang
The parameter dst of tcp_try_fastopen and tcp_fastopen_create_child is not used anymore. We remove it. Signed-off-by: Tonghao Zhang --- include/net/tcp.h | 3 +-- net/ipv4/tcp_fastopen.c | 6 ++ net/ipv4/tcp_input.c| 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff

[PATCH net-next v2 1/2] tcp: Remove unnecessary dst check in tcp_conn_request.

2017-08-16 Thread Tonghao Zhang
, and we remove the unnecessay check. Signed-off-by: Tonghao Zhang --- net/ipv4/tcp_input.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index d73903f..7eee2c7 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp

Re: [PATCH net-next v2 1/2] tcp: Remove unnecessary dst check in tcp_conn_request.

2017-08-21 Thread Tonghao Zhang
tcp_tw_recycle has been removed. Thanks very much. On Sun, Aug 20, 2017 at 12:25 PM, David Miller wrote: > From: Tonghao Zhang > Date: Wed, 16 Aug 2017 20:02:45 -0700 > >> Because we remove the tcp_tw_recycle support in the commit >> 4396e46187c ('tcp: remove tcp_tw

Re: [PATCH net-next v2 1/2] tcp: Remove unnecessary dst check in tcp_conn_request.

2017-08-21 Thread Tonghao Zhang
On Mon, Aug 21, 2017 at 10:56 PM, Eric Dumazet wrote: > Please do not top post. Got it, thanks. > On Mon, 2017-08-21 at 21:24 +0800, Tonghao Zhang wrote: >> Thanks, yes this is a bug. I found this bug exists from 3.17~ 4.13. >> The commit is d94e0417 >> > > This

[PATCH net-next v3 0/2] Simplify the tcp_conn_request.

2017-08-21 Thread Tonghao Zhang
Just simplify the tcp_conn_request function. Tonghao Zhang (2): tcp: Get a proper dst before checking it. tcp: Remove the unused parameter for tcp_try_fastopen. include/net/tcp.h | 3 +-- net/ipv4/tcp_fastopen.c | 6 ++ net/ipv4/tcp_input.c| 11 +-- 3 files changed

[PATCH net-next v3 1/2] tcp: Get a proper dst before checking it.

2017-08-21 Thread Tonghao Zhang
tcp_peer_is_proven needs a proper route to make the determination, but dst always is NULL. This bug may be there at the beginning of git tree. This does not look serious enough to deserve backports to stable versions. Signed-off-by: Tonghao Zhang --- net/ipv4/tcp_input.c | 9 - 1 file

[PATCH net-next v3 2/2] tcp: Remove the unused parameter for tcp_try_fastopen.

2017-08-21 Thread Tonghao Zhang
Signed-off-by: Tonghao Zhang --- include/net/tcp.h | 3 +-- net/ipv4/tcp_fastopen.c | 6 ++ net/ipv4/tcp_input.c| 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/include/net/tcp.h b/include/net/tcp.h index afdab3781425..a995004ae946 100644 --- a/include/net

Re: [PATCH net-next 1/5] net/mlx5e: Return -EOPNOTSUPP when modify header action zero

2019-02-21 Thread Tonghao Zhang
On Fri, Feb 22, 2019 at 12:27 AM Or Gerlitz wrote: > > On Thu, Feb 21, 2019 at 3:42 PM wrote: > > else /* namespace is MLX5_FLOW_NAMESPACE_KERNEL - NIC offloading */ > > max_actions = MLX5_CAP_FLOWTABLE_NIC_RX(priv->mdev, > > max_modify_header_actions); > > > > + if

Re: [PATCH net-next 2/5] net/mlx5e: Make the log friendly when decapsulation offload not supported

2019-02-21 Thread Tonghao Zhang
On Fri, Feb 22, 2019 at 12:32 AM Or Gerlitz wrote: > > On Thu, Feb 21, 2019 at 3:42 PM wrote: > > > > From: Tonghao Zhang > > > > If we try to offload decapsulation actions to VFs hw, we get the log [1]. > > but the switching was on the tunnel type (if (tun

Re: [PATCH net-next 5/5] net/mlx5e: Support enable/disable VFs link state on switchdev mode

2019-02-21 Thread Tonghao Zhang
On Fri, Feb 22, 2019 at 1:03 AM Or Gerlitz wrote: > > On Thu, Feb 21, 2019 at 3:42 PM wrote: > > From: Tonghao Zhang > > > > This patch allow users to enable/disable VFs link state > > on switchdev mode. > > NAK > > We do it with the reps, if you ch

Re: [PATCH net-next 2/5] net/mlx5e: Make the log friendly when decapsulation offload not supported

2019-02-22 Thread Tonghao Zhang
On Fri, Feb 22, 2019 at 5:07 PM Or Gerlitz wrote: > > On Fri, Feb 22, 2019 at 9:49 AM Tonghao Zhang > wrote: > > > > On Fri, Feb 22, 2019 at 12:32 AM Or Gerlitz wrote: > > > > > > On Thu, Feb 21, 2019 at 3:42 PM wrote: > > > > > > >

Re: [PATCH net-next v2 1/5] net/mlx5e: Return -EOPNOTSUPP when modify header action zero

2019-02-27 Thread Tonghao Zhang
On Tue, Feb 26, 2019 at 9:54 PM Roi Dayan wrote: > > > > On 25/02/2019 12:40, xiangxia.m@gmail.com wrote: > > From: Tonghao Zhang > > > > When max modify header action is zero, we return -EOPNOTSUPP > > directly. In this way, we can ignore wrong message

Re: [PATCH net-next v2 1/5] net/mlx5e: Return -EOPNOTSUPP when modify header action zero

2019-02-27 Thread Tonghao Zhang
On Wed, Feb 27, 2019 at 6:37 AM Or Gerlitz wrote: > > On Mon, Feb 25, 2019 at 1:06 PM wrote: >> >> From: Tonghao Zhang >> >> When max modify header action is zero, we return -EOPNOTSUPP >> directly. In this way, we can ignore wrong message info (e.g. >&g

Re: [PATCH net-next v3 4/4] net/mlx5e: Return -EOPNOTSUPP when attempting to offload an unsupported action

2019-02-28 Thread Tonghao Zhang
On Wed, Feb 27, 2019 at 10:01 PM Roi Dayan wrote: > > > > On 26/02/2019 14:27, xiangxia.m@gmail.com wrote: > > From: Tonghao Zhang > > > > * Now the encapsulation is not supported for mlx5 VFs. When we try to > > offload that action, the -EINVAL is ret

Re: [PATCH 1/2] net/mlx5: Avoid panic when setting vport mac, getting vport config

2019-03-03 Thread Tonghao Zhang
On Sun, Mar 3, 2019 at 8:42 PM Roi Dayan wrote: > > > > On 03/03/2019 11:56, xiangxia.m@gmail.com wrote: > > From: Tonghao Zhang > > > > If we try to set VFs mac address on a VF (not PF) net device, > > the kernel will be crash. The commands are show as

Re: [PATCH 1/2] net/mlx5: Avoid panic when setting vport mac, getting vport config

2019-03-03 Thread Tonghao Zhang
On Sun, Mar 3, 2019 at 8:42 PM Roi Dayan wrote: > > > > On 03/03/2019 11:56, xiangxia.m@gmail.com wrote: > > From: Tonghao Zhang > > > > If we try to set VFs mac address on a VF (not PF) net device, > > the kernel will be crash. The commands are show as

Re: [PATCH net 2/2] net/mlx5: Avoid panic when setting VF rate

2019-03-03 Thread Tonghao Zhang
On Sun, Mar 3, 2019 at 10:17 PM Roi Dayan wrote: > > > > On 03/03/2019 16:12, Roi Dayan wrote: > > > > > > On 03/03/2019 11:56, xiangxia.m....@gmail.com wrote: > >> From: Tonghao Zhang > >> > >> If we try to set VFs rate on a VF (not PF

Re: [PATCH 1/2] net/mlx5: Avoid panic when setting vport mac, getting vport config

2019-03-04 Thread Tonghao Zhang
On Mon, Mar 4, 2019 at 3:06 PM Roi Dayan wrote: > > > > On 04/03/2019 03:04, Tonghao Zhang wrote: > > On Sun, Mar 3, 2019 at 8:42 PM Roi Dayan wrote: > >> > >> > >> > >> On 03/03/2019 11:56, xiangxia.m@gmail.com wrote: > >>>

Re: [PATCH net v1] net/mlx5e: Correctly use the namespace type when allocating pedit action

2019-03-13 Thread Tonghao Zhang
On Sat, Mar 2, 2019 at 3:43 AM Saeed Mahameed wrote: > > On Wed, 2019-02-27 at 21:02 +0100, Pablo Neira Ayuso wrote: > > On Wed, Feb 27, 2019 at 02:05:02PM +, Roi Dayan wrote: > > > > > > On 26/02/2019 14:28, xiangxia.m@gmail.com wrote: > > > >

Re: [PATCH net-next v4 0/4] net/mlx5e: Make little improvement for mlx5e

2019-03-20 Thread Tonghao Zhang
On Thu, Feb 28, 2019 at 11:03 PM wrote: > > From: Tonghao Zhang > > This serial patches are not bugfixes, and just little improvement for mlx5e. > v3->v4: > Patch4: change the long message info and introduce a helper function. > > v2->v3: > Patch 1 and 5 are

Re: [ovs-dev] [PATCH net-next] openvswitch: Make metadata_dst tunnel work in IP_TUNNEL_INFO_BRIDGE mode

2019-03-24 Thread Tonghao Zhang
On Sat, Mar 23, 2019 at 5:28 PM wenxu wrote: > > On 2019/3/23 下午3:50, Pravin Shelar wrote: > > On Thu, Mar 21, 2019 at 3:34 AM wrote: > >> From: wenxu > >> > >> There is currently no support for the multicasti/broadcst aspects > >> of VXLAN in ovs. In the datapath flow the tun_dst must specific.

Re: [ovs-dev] [PATCH net-next] openvswitch: Make metadata_dst tunnel work in IP_TUNNEL_INFO_BRIDGE mode

2019-03-24 Thread Tonghao Zhang
On Mon, Mar 25, 2019 at 9:24 AM wenxu wrote: > > On 2019/3/25 上午2:46, Pravin Shelar wrote: > > On Sun, Mar 24, 2019 at 12:03 AM wenxu wrote: > >> On 2019/3/24 上午5:39, Pravin Shelar wrote: > >>> On Sat, Mar 23, 2019 at 2:18 AM wenxu wrote: > On 2019/3/23 下午3:50, Pravin Shelar wrote: > >

Re: [PATCH] net/mlx5e: Allow removing representors netdev to other namespace

2019-05-20 Thread Tonghao Zhang
On Tue, May 21, 2019 at 4:24 AM Or Gerlitz wrote: > > On Mon, May 20, 2019 at 3:19 PM wrote: > > > > From: Tonghao Zhang > > > > At most case, we use the ConnectX-5 NIC on compute node for VMs, > > but we will offload forwarding rules to NICs on gateway no

Re: [PATCH] net: vxlan: disallow removing to other namespace

2019-05-20 Thread Tonghao Zhang
On Tue, May 21, 2019 at 7:53 AM David Miller wrote: > > From: xiangxia.m@gmail.com > Date: Fri, 17 May 2019 19:42:23 -0700 > > > From: Tonghao Zhang > > > > Don't allow to remove the vxlan device to other namesapce, > > because we maintain the dat

Re: [PATCH] net: vxlan: disallow removing to other namespace

2019-05-21 Thread Tonghao Zhang
On Tue, May 21, 2019 at 5:28 PM Nicolas Dichtel wrote: > > Le 21/05/2019 à 07:53, Tonghao Zhang a écrit : > [snip] > > The problem is that we create one vxlan netdevice(e.g dstport 4789 and > > external), and move it to > > one net-namespace, and then we hope create

Re: [PATCH net-next v3 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()

2018-07-01 Thread Tonghao Zhang
On Mon, Jul 2, 2018 at 10:29 AM Jason Wang wrote: > > > > On 2018年06月30日 14:33, xiangxia.m@gmail.com wrote: > > From: Tonghao Zhang > > > > Factor out generic busy polling logic and will be > > used for tx path in the next patch. And with the pat

[PATCH 2/2] doc: Change the udp/sctp rmem/wmem default value.

2018-03-13 Thread Tonghao Zhang
The SK_MEM_QUANTUM was changed from PAGE_SIZE to 4096. Signed-off-by: Tonghao Zhang --- Documentation/networking/ip-sysctl.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index 783675a

[PATCH 1/2] udp: Move the udp sysctl to namespace.

2018-03-13 Thread Tonghao Zhang
This patch moves the udp_rmem_min, udp_wmem_min to namespace and init the udp_l3mdev_accept explicitly. Signed-off-by: Tonghao Zhang --- include/net/netns/ipv4.h | 3 ++ net/ipv4/sysctl_net_ipv4.c | 32 - net/ipv4/udp.c | 86

Re: [PATCH 1/2] udp: Move the udp sysctl to namespace.

2018-03-13 Thread Tonghao Zhang
On Tue, Mar 13, 2018 at 7:36 PM, Paolo Abeni wrote: > Hi, > > On Tue, 2018-03-13 at 02:57 -0700, Tonghao Zhang wrote: >> This patch moves the udp_rmem_min, udp_wmem_min >> to namespace and init the udp_l3mdev_accept explicitly. > > Can you please be a little more

[PATCH v2 1/2] udp: Move the udp sysctl to namespace.

2018-03-13 Thread Tonghao Zhang
This patch moves the udp_rmem_min, udp_wmem_min to namespace and init the udp_l3mdev_accept explicitly. The udp_rmem_min/udp_wmem_min affect udp rx/tx queue, with this patch namespaces can set them differently. Signed-off-by: Tonghao Zhang --- v2: use a common helper to avoid the code

[PATCH v2 2/2] doc: Change the udp/sctp rmem/wmem default value.

2018-03-13 Thread Tonghao Zhang
The SK_MEM_QUANTUM was changed from PAGE_SIZE to 4096. Signed-off-by: Tonghao Zhang --- Documentation/networking/ip-sysctl.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index 783675a

Re: [PATCH] tcp: Support tcp socket allocated counter in namespace.

2018-02-28 Thread Tonghao Zhang
On Wed, Feb 14, 2018 at 1:19 AM, David Miller wrote: > From: Tonghao Zhang > Date: Mon, 12 Feb 2018 18:44:00 -0800 > >> Sometimes, we want to know how many tcp sockets are in use >> different _net_ namespaces. It's a key resource metric. With >> this patch, we c

Re: [PATCH] tcp: Support tcp socket allocated counter in namespace.

2018-02-28 Thread Tonghao Zhang
On Wed, Feb 28, 2018 at 10:41 PM, David Miller wrote: > From: Tonghao Zhang > Date: Wed, 28 Feb 2018 21:01:52 +0800 > >>> The amount of new conditional tests in these fast paths are not >>> justified for this new counter which is of debatable usefullness. >> s

[PATCH] stcp: Replace use of sockets_allocated with specified macro.

2017-12-22 Thread Tonghao Zhang
942ce ("foundations of per-cgroup memory pressure controlling.") Cc: Glauber Costa Signed-off-by: Tonghao Zhang --- net/sctp/socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sctp/socket.c b/net/sctp/socket.c index aadcd4244d9b..a5e2150ab013 100644 --- a/net/sctp

[PATCH] stcp: Replace use of sockets_allocated with specified macro.

2017-12-22 Thread Tonghao Zhang
942ce ("foundations of per-cgroup memory pressure controlling.") Cc: Glauber Costa Signed-off-by: Tonghao Zhang --- net/sctp/socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sctp/socket.c b/net/sctp/socket.c index aadcd4244d9b..a5e2150ab013 100644 --- a/net/sctp

[PATCH v2] sctp: Replace use of sockets_allocated with specified macro.

2017-12-22 Thread Tonghao Zhang
942ce ("foundations of per-cgroup memory pressure controlling.") Cc: Glauber Costa Signed-off-by: Tonghao Zhang --- fix typo. --- net/sctp/socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sctp/socket.c b/net/sctp/socket.c index aadcd4244d9b..a5e2150ab013 100644

[PATCH] vhost: Remove the unused variable.

2018-01-07 Thread Tonghao Zhang
The patch (7235acdb1) changed the way of the work flushing in which the queued seq, done seq, and the flushing are not used anymore. Then remove them now. Fixes: 7235acdb1 ("vhost: simplify work flushing") Cc: Jason Wang Signed-off-by: Tonghao Zhang --- drivers/vhost/vhost.c | 1

[PATCH v2] vhost: Remove the unused variable.

2018-01-09 Thread Tonghao Zhang
The patch (7235acdb1) changed the way of the work flushing in which the queued seq, done seq, and the flushing are not used anymore. Then remove them now. Fixes: 7235acdb1 ("vhost: simplify work flushing") Cc: Jason Wang Signed-off-by: Tonghao Zhang Acked-by: Jason Wang --- dri

[PATCH] net: core: improve the tx_hash calculating

2018-05-31 Thread Tonghao Zhang
Use the % instead of while, and it may simple code and improve the calculating. The real_num_tx_queues has been checked when allocating and setting it. Signed-off-by: Tonghao Zhang --- net/core/dev.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/net/core/dev.c b

[PATCH] net: virtio: simplify the virtnet_find_vqs

2018-05-31 Thread Tonghao Zhang
Use the common free functions while return successfully. Signed-off-by: Tonghao Zhang --- drivers/net/virtio_net.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 8f08a3e..0eee6d6 100644 --- a/drivers/net

Re: [ovs-dev] [PATCH net-next 0/9] optimize openvswitch flow looking up

2019-10-07 Thread Tonghao Zhang
On Fri, Oct 4, 2019 at 1:09 AM William Tu wrote: > > Hi Tonghao, > > Thanks for the patch. > > > On 29 Sep 2019, at 19:09, xiangxia.m@gmail.com wrote: > > > > > From: Tonghao Zhang > > > > > > This series patch optimize openvswitch. >

Re: [PATCH net-next 2/9] net: openvswitch: convert mask list in mask array

2019-10-07 Thread Tonghao Zhang
On Wed, Oct 2, 2019 at 10:02 AM Pravin Shelar wrote: > > On Sun, Sep 29, 2019 at 7:09 PM wrote: > > > > From: Tonghao Zhang > > > > Port the codes to linux upstream and with little changes. > > > > Pravin B Shelar, says: > > | mask cache

Re: [PATCH net-next 5/9] net: openvswitch: optimize flow-mask looking up

2019-10-07 Thread Tonghao Zhang
On Wed, Oct 2, 2019 at 10:03 AM Pravin Shelar wrote: > > On Sun, Sep 29, 2019 at 7:09 PM wrote: > > > > From: Tonghao Zhang > > > > The full looking up on flow table traverses all mask array. > > If mask-array is too large, the number of invalid flow-mask &g

Re: [PATCH net-next 7/9] net: openvswitch: add likely in flow_lookup

2019-10-07 Thread Tonghao Zhang
On Wed, Oct 2, 2019 at 10:07 AM Pravin Shelar wrote: > > On Sun, Sep 29, 2019 at 7:09 PM wrote: > > > > From: Tonghao Zhang > > > > The most case *index < ma->max, we add likely for performance. > > > > Signed-off-by: Tonghao Zhang > > --

Re: [PATCH net-next v2 00/10] optimize openvswitch flow looking up

2019-10-10 Thread Tonghao Zhang
On Wed, Oct 9, 2019 at 1:33 AM Gregory Rose wrote: > > > On 10/7/2019 6:00 PM, xiangxia.m@gmail.com wrote: > > From: Tonghao Zhang > > > > This series patch optimize openvswitch for performance or simplify > > codes. > > > > Patch 1, 2, 4: Port

Re: [PATCH net-next v2 00/10] optimize openvswitch flow looking up

2019-10-15 Thread Tonghao Zhang
On Tue, Oct 15, 2019 at 6:26 AM Gregory Rose wrote: > > On 10/10/2019 1:42 AM, Tonghao Zhang wrote: > > On Wed, Oct 9, 2019 at 1:33 AM Gregory Rose wrote: > >> > > [snip] > > >> Hi Tonghao, > >> > >> I've applied your patch series

Re: [PATCH net-next v4 08/10] net: openvswitch: fix possible memleak on destroy flow-table

2019-10-17 Thread Tonghao Zhang
On Fri, Oct 18, 2019 at 6:38 AM Pravin Shelar wrote: > > On Wed, Oct 16, 2019 at 5:50 AM wrote: > > > > From: Tonghao Zhang > > > > When we destroy the flow tables which may contain the flow_mask, > > so release the flow mask struct. > > > > S

Re: [ovs-dev] [PATCH net-next v4 05/10] net: openvswitch: optimize flow-mask looking up

2019-10-20 Thread Tonghao Zhang
On Sat, Oct 19, 2019 at 7:27 AM William Tu wrote: > > On Wed, Oct 16, 2019 at 5:54 AM wrote: > > > > From: Tonghao Zhang > > > > The full looking up on flow table traverses all mask array. > > If mask-array is too large, the number of invalid flow-mask &g

Re: [PATCH net-next v4 08/10] net: openvswitch: fix possible memleak on destroy flow-table

2019-10-20 Thread Tonghao Zhang
On Sat, Oct 19, 2019 at 2:12 AM Pravin Shelar wrote: > > On Thu, Oct 17, 2019 at 8:16 PM Tonghao Zhang > wrote: > > > > On Fri, Oct 18, 2019 at 6:38 AM Pravin Shelar wrote: > > > > > > On Wed, Oct 16, 2019 at 5:50 AM wrote: > > > > > >

Re: [ovs-dev] [PATCH net-next v4 00/10] optimize openvswitch flow looking up

2019-10-21 Thread Tonghao Zhang
On Tue, Oct 22, 2019 at 1:14 AM William Tu wrote: > > On Wed, Oct 16, 2019 at 5:50 AM wrote: > > > > From: Tonghao Zhang > > > > This series patch optimize openvswitch for performance or simplify > > codes. > > > > Patch 1, 2, 4: Port Pravin B

Re: [PATCH net-next v4 08/10] net: openvswitch: fix possible memleak on destroy flow-table

2019-10-22 Thread Tonghao Zhang
On Tue, Oct 22, 2019 at 2:58 PM Pravin Shelar wrote: > > On Sun, Oct 20, 2019 at 10:02 PM Tonghao Zhang > wrote: > > > > On Sat, Oct 19, 2019 at 2:12 AM Pravin Shelar wrote: > > > > > > On Thu, Oct 17, 2019 at 8:16 PM Tonghao Zhang > > > wrote:

Re: [PATCH net-next] netfilter: nf_conntrack: introduce conntrack limit per-zone

2019-10-23 Thread Tonghao Zhang
On Wed, Oct 23, 2019 at 6:31 PM Florian Westphal wrote: > > xiangxia.m@gmail.com wrote: > > nf_conntrack_max is used to limit the maximum number of > > conntrack entries in the conntrack table for every network > > namespace. For the containers that reside in the same namespace, > > they shar

Re: [PATCH net-next v2] virtio-net: ethtool configurable RXCSUM

2020-10-08 Thread Tonghao Zhang
On Wed, Sep 30, 2020 at 6:05 PM Willem de Bruijn wrote: > > On Wed, Sep 30, 2020 at 4:05 AM wrote: > > > > From: Tonghao Zhang > > > > Allow user configuring RXCSUM separately with ethtool -K, > > reusing the existing virtnet_set_guest_offloads helper > &g

Re: [PATCH net-next v2] virtio-net: ethtool configurable RXCSUM

2020-10-09 Thread Tonghao Zhang
On Fri, Oct 9, 2020 at 9:49 PM Willem de Bruijn wrote: > > On Thu, Oct 8, 2020 at 9:19 PM Tonghao Zhang wrote: > > > > On Wed, Sep 30, 2020 at 6:05 PM Willem de Bruijn > > wrote: > > > > > > On Wed, Sep 30, 2020 at 4:05 AM wrote: > > > > &

Re: [PATCH net-next v3 2/2] net: openvswitch: make masks cache size configurable

2020-07-29 Thread Tonghao Zhang
On Wed, Jul 29, 2020 at 9:27 PM Eelco Chaudron wrote: > > This patch makes the masks cache size configurable, or with > a size of 0, disable it. > > Reviewed-by: Paolo Abeni > Signed-off-by: Eelco Chaudron > --- > Changes in v3: > - Use is_power_of_2() function > - Use array_size() function >

Re: [PATCH net-next v3 2/2] net: openvswitch: make masks cache size configurable

2020-07-30 Thread Tonghao Zhang
On Thu, Jul 30, 2020 at 8:33 PM Eelco Chaudron wrote: > > Thanks Tonghao for the review, see comments inline below! > > If I get no more reviews by the end of the week I’ll send out a v4. > > //Eelco > > > On 30 Jul 2020, at 7:07, Tonghao Zhang wrote: > > > O

Re: [PATCH net-next v3 2/2] net: openvswitch: make masks cache size configurable

2020-07-30 Thread Tonghao Zhang
On Thu, Jul 30, 2020 at 9:52 PM Eelco Chaudron wrote: > > > > On 30 Jul 2020, at 15:25, Tonghao Zhang wrote: > > > On Thu, Jul 30, 2020 at 8:33 PM Eelco Chaudron > > wrote: > >> > >> Thanks Tonghao for the review, see comments inline below! > &g

Re: [ovs-dev] [PATCH net-next v2 1/2] net: openvswitch: add masks cache hit counter

2020-07-23 Thread Tonghao Zhang
On Thu, Jul 23, 2020 at 8:58 PM Eelco Chaudron wrote: > > Add a counter that counts the number of masks cache hits, and > export it through the megaflow netlink statistics. > > Reviewed-by: Paolo Abeni > Signed-off-by: Eelco Chaudron LGTM Reviewed-by: Tonghao Zhang > ---

Re: [PATCH net backport 5.6.14-5.8.3 v1] net: openvswitch: introduce common code for flushing flows

2020-08-26 Thread Tonghao Zhang
On Wed, Aug 26, 2020 at 6:31 PM Greg KH wrote: > > On Tue, Aug 25, 2020 at 01:25:32PM +0800, xiangxia.m@gmail.com wrote: > > From: Tonghao Zhang > > > > [ Upstream commit 77b981c82c1df7c7ad32a046f17f007450b46954 ] > > That is not what this commit is :( > &g

Re: [PATCH net-next v2 1/3] net: openvswitch: improve coding style

2020-08-31 Thread Tonghao Zhang
On Thu, Aug 27, 2020 at 3:23 AM Pravin Shelar wrote: > > On Mon, Aug 24, 2020 at 12:37 AM wrote: > > > > From: Tonghao Zhang > > > > Not change the logic, just improve coding style. > > > > Cc: Pravin B Shelar > > Signed-off-by: Tonghao Zha

Re: [PATCH net-next v3 1/3] net: openvswitch: improve coding style

2020-09-01 Thread Tonghao Zhang
On Wed, Aug 26, 2020 at 5:51 AM Stefano Brivio wrote: > > On Tue, 25 Aug 2020 13:06:34 +0800 > xiangxia.m@gmail.com wrote: > > > +++ b/net/openvswitch/datapath.c > > > > [...] > > > > @@ -2095,7 +2099,7 @@ static void ovs_update_headroom(struct datapath *dp, > > unsigned int new_headroom) > >

Re: [PATCH net-next v2 1/3] net: openvswitch: improve coding style

2020-09-01 Thread Tonghao Zhang
On Tue, Sep 1, 2020 at 2:41 AM David Miller wrote: > > From: Tonghao Zhang > Date: Mon, 31 Aug 2020 21:00:28 +0800 > > > On Thu, Aug 27, 2020 at 3:23 AM Pravin Shelar wrote: > >> > >> On Mon, Aug 24, 2020 at 12:37 AM wrote: > >> > > >>

Re: [ovs-dev] [PATCH net-next] net: openvswitch: fixes crash if nf_conncount_init() fails

2020-09-01 Thread Tonghao Zhang
a65878d6f00b ("net: openvswitch: fixes potential deadlock in dp > cleanup code") > Reported-by: kernel test robot > Signed-off-by: Eelco Chaudron Reviewed-by: Tonghao Zhang > --- > net/openvswitch/datapath.c |8 +++- > 1 file changed, 7 insertions(+),

Re: [PATCH 1/2] virtio-net: don't disable guest csum when disable LRO

2020-09-28 Thread Tonghao Zhang
On Mon, Sep 28, 2020 at 4:35 PM Willem de Bruijn wrote: > > On Mon, Sep 28, 2020 at 5:41 AM wrote: > > > > From: Tonghao Zhang > > > > Open vSwitch and Linux bridge will disable LRO of the interface > > when this interface added to them. Now when disable

Re: [PATCH 2/2] virtio-net: ethtool configurable RXCSUM

2020-09-28 Thread Tonghao Zhang
On Mon, Sep 28, 2020 at 4:39 PM Willem de Bruijn wrote: > > On Mon, Sep 28, 2020 at 5:42 AM wrote: > > > > From: Tonghao Zhang > > > > Allow user configuring RXCSUM separately with ethtool -K, > > reusing the existing virtnet_set_guest_offloads helper > &g

Re: [PATCH 1/2] virtio-net: don't disable guest csum when disable LRO

2020-09-28 Thread Tonghao Zhang
On Tue, Sep 29, 2020 at 3:21 AM Michael S. Tsirkin wrote: > > On Mon, Sep 28, 2020 at 11:39:14AM +0800, xiangxia.m@gmail.com wrote: > > From: Tonghao Zhang > > > > Open vSwitch and Linux bridge will disable LRO of the interface > > when this interface added to

Re: [PATCH 2/2] virtio-net: ethtool configurable RXCSUM

2020-09-28 Thread Tonghao Zhang
On Tue, Sep 29, 2020 at 3:25 AM Michael S. Tsirkin wrote: > > On Mon, Sep 28, 2020 at 11:39:15AM +0800, xiangxia.m@gmail.com wrote: > > From: Tonghao Zhang > > > > Allow user configuring RXCSUM separately with ethtool -K, > > reusing the existing virtnet_set_

Re: [PATCH 1/2] virtio-net: don't disable guest csum when disable LRO

2020-09-28 Thread Tonghao Zhang
On Tue, Sep 29, 2020 at 1:57 PM Michael S. Tsirkin wrote: > > On Tue, Sep 29, 2020 at 09:40:22AM +0800, Tonghao Zhang wrote: > > On Tue, Sep 29, 2020 at 3:21 AM Michael S. Tsirkin wrote: > > > > > > On Mon, Sep 28, 2020 at 11:39:14AM +0800, xiangxia.m@gmail.co

Re: [PATCH 2/2] virtio-net: ethtool configurable RXCSUM

2020-09-28 Thread Tonghao Zhang
On Tue, Sep 29, 2020 at 1:55 PM Michael S. Tsirkin wrote: > > On Tue, Sep 29, 2020 at 09:45:24AM +0800, Tonghao Zhang wrote: > > On Tue, Sep 29, 2020 at 3:25 AM Michael S. Tsirkin wrote: > > > > > > On Mon, Sep 28, 2020 at 11:39:15AM +0800, xiangxia.m@gmail.co

Re: [PATCH net v2] virtio-net: don't disable guest csum when disable LRO

2020-09-29 Thread Tonghao Zhang
On Tue, Sep 29, 2020 at 2:23 PM Michael S. Tsirkin wrote: > > On Tue, Sep 29, 2020 at 09:58:06AM +0800, xiangxia.m@gmail.com wrote: > > From: Tonghao Zhang > > > > Open vSwitch and Linux bridge will disable LRO of the interface > > when this interface added to

Re: [PATCH 2/2] virtio-net: ethtool configurable RXCSUM

2020-09-29 Thread Tonghao Zhang
On Tue, Sep 29, 2020 at 2:22 PM Michael S. Tsirkin wrote: > > On Tue, Sep 29, 2020 at 02:10:56PM +0800, Tonghao Zhang wrote: > > On Tue, Sep 29, 2020 at 1:55 PM Michael S. Tsirkin wrote: > > > > > > On Tue, Sep 29, 2020 at 09:45:24AM +0800, Tonghao Zhang wrote: >

Re: [PATCH net v2] virtio-net: don't disable guest csum when disable LRO

2020-09-29 Thread Tonghao Zhang
On Tue, Sep 29, 2020 at 3:32 PM Willem de Bruijn wrote: > > On Tue, Sep 29, 2020 at 4:00 AM wrote: > > > > From: Tonghao Zhang > > > > Open vSwitch and Linux bridge will disable LRO of the interface > > when this interface added to them. Now when disable

Re: [PATCH net v2] virtio-net: don't disable guest csum when disable LRO

2020-09-29 Thread Tonghao Zhang
On Tue, Sep 29, 2020 at 3:29 PM Willem de Bruijn wrote: > > On Tue, Sep 29, 2020 at 9:23 AM Michael S. Tsirkin wrote: > > > > On Tue, Sep 29, 2020 at 02:59:03PM +0800, Tonghao Zhang wrote: > > > On Tue, Sep 29, 2020 at 2:23 PM Michael S. Tsirkin > > > w

Re: [PATCH 2/2] virtio-net: ethtool configurable RXCSUM

2020-09-29 Thread Tonghao Zhang
On Tue, Sep 29, 2020 at 3:25 PM Michael S. Tsirkin wrote: > > On Tue, Sep 29, 2020 at 03:17:50PM +0800, Tonghao Zhang wrote: > > On Tue, Sep 29, 2020 at 2:22 PM Michael S. Tsirkin wrote: > > > > > > On Tue, Sep 29, 2020 at 02:10:56PM +0800, Tonghao Zhang wrote: >

Re: [PATCH] net: mlx5: update hw flows when encap source mac changed

2019-01-11 Thread Tonghao Zhang
On Sat, Jan 12, 2019 at 6:50 AM Cong Wang wrote: > > On Fri, Jan 11, 2019 at 6:19 AM wrote: > > @@ -622,17 +629,20 @@ static void mlx5e_rep_neigh_update(struct work_struct > > *work) > > memcpy(ha, n->ha, ETH_ALEN); > > nud_state = n->nud_state; > > dead = n->dead; > > +

Re: [PATCH RESEND net-next v2] net: ipv4: allocate ipv4_devconf memory for init_net

2019-01-17 Thread Tonghao Zhang
On Thu, Jan 17, 2019 at 4:25 PM Nicolas Dichtel wrote: > > Le 16/01/2019 à 09:53, xiangxia.m@gmail.com a écrit : > > From: Tonghao Zhang > > > > The devconf setting on the init_net will affect other > > namespace when them created. For example: > > &

  1   2   >