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-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: [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: 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-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: [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 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 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 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 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 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 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-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 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 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 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 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 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: [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 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: [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-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 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 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

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 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: [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: [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 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: [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: [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-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: [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: mlx5e uplink hairpin forwarding

2020-06-22 Thread Tonghao Zhang
On Sun, Jun 21, 2020 at 2:36 AM Eli Cohen wrote: > > On Sat, Jun 20, 2020 at 08:02:19PM +0800, Tonghao Zhang wrote: > > Hi Eli > > > > I review your patches and try to test it. > > $ tc filter add dev enp130s0f0 protocol ip prio 1 root flower dst_ip > > 11.1

mlx5e uplink hairpin forwarding

2020-06-20 Thread Tonghao Zhang
Hi Eli I review your patches and try to test it. $ tc filter add dev enp130s0f0 protocol ip prio 1 root flower dst_ip 11.12.13.14 skip_sw action mirred egress redirect dev enp130s0f1 or $ tc filter add dev enp130s0f0 protocol ip prio 1 parent : flower dst_ip 11.12.13.14 skip_sw action mirred

Re: [ovs-dev] [PATCH 1/1] openvswitch: fix infoleak in conntrack

2020-06-16 Thread Tonghao Zhang
On Tue, Jun 16, 2020 at 10:13 AM Xidong Wang wrote: > > From: xidongwang > > The stack object “zone_limit” has 3 members. In function > ovs_ct_limit_get_default_limit(), the member "count" is > not initialized and sent out via “nla_put_nohdr”. > > Signed-off-by: xidongwang > --- > net/openvswit

Re: [PATCH net-next 1/3] net/mlx5e: Implicitly decap the tunnel packet when necessary

2020-05-05 Thread Tonghao Zhang
On Thu, Apr 30, 2020 at 11:26 PM Roi Dayan wrote: > > > > On 2020-04-28 8:24 AM, xiangxia.m@gmail.com wrote: > > From: Tonghao Zhang > > > > The commit 0a7fcb78cc21 ("net/mlx5e: Support inner header rewrite with > > goto action"), will de

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 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: [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-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 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-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: [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 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 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 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 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: [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. >

one question about openvswitch flow_hash

2019-09-22 Thread Tonghao Zhang
Hi Pravin one question about openvswitch, why we add BUILD_BUG_ON in flow_hash? It is never be true, right ? flow_hash ... /* Make sure number of hash bytes are multiple of u32. */ BUILD_BUG_ON(sizeof(long) % sizeof(u32)); ...

Re: [PATCH net] net: openvswitch: fix possible memleak on createvport fails

2019-09-22 Thread Tonghao Zhang
On Sun, Sep 22, 2019 at 2:50 PM Hillf Danton wrote: > > On Sun, 22 Sep 2019 14:42 from Pravin Shelar > > >> > > >> On Sat, Sep 21, 2019 at 8:48 PM Hillf Danton wrote: > > >> Was that posted without netdev Cced? > > > > > > I do not see your patch on netdev patchwork, repost of the patch would >

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/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-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: 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: 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/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: [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: [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: [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: [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 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 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-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-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 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 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 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 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-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 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 v2] bonding: check slave set command firstly

2019-02-14 Thread Tonghao Zhang
On Fri, Feb 15, 2019 at 12:36 AM David Miller wrote: > > From: xiangxia.m@gmail.com > Date: Mon, 11 Feb 2019 10:49:48 -0800 > > > From: Tonghao Zhang > > > > This patch is a little improvement. If user use the > > command shown as below, we should print

Re: [PATCH net-next] bonding: check slave set command firstly

2019-02-02 Thread Tonghao Zhang
2014-01-22 1375 sscanf(newval->string, > "%16s", command); /* IFNAMSIZ*/ > 0e2e5b66 Nikolay Aleksandrov 2014-01-22 1376 ifname = command + 1; > 0e2e5b66 Nikolay Aleksandrov 2014-01-22 1377 if ((strlen(command) <= 1) || > c9914772 Tonghao Zhang 2019-02-01 13

Re: [PATCH 02/12 net-next,v7] net/mlx5e: support for two independent packet edit actions

2019-02-02 Thread Tonghao Zhang
On Sat, Feb 2, 2019 at 8:11 PM Pablo Neira Ayuso wrote: > > This patch adds pedit_headers_action structure to store the result of > parsing tc pedit actions. Then, it calls alloc_tc_pedit_action() to > populate the mlx5e hardware intermediate representation once all actions > have been parsed. > >

Re: [PATCH net-next] net/mlx5e: Fix code style issue in mlx driver

2019-01-31 Thread Tonghao Zhang
On Fri, Feb 1, 2019 at 4:51 AM Or Gerlitz wrote: > > On Thu, Jan 31, 2019 at 10:49 PM Or Gerlitz wrote: > > > > On Thu, Jan 31, 2019 at 4:11 PM wrote: > > > From: Tonghao Zhang > > > > > > Add the tab before '}' and keep the code sty

Re: [PATCH net v4 2/2] net/mlx5e: Don't overwrite pedit action when multiple pedit used

2019-01-29 Thread Tonghao Zhang
On Tue, Jan 29, 2019 at 11:44 PM Or Gerlitz wrote: > > On Mon, Jan 28, 2019 at 6:18 PM Tonghao Zhang > wrote: > > On Mon, Jan 28, 2019 at 11:34 PM Or Gerlitz wrote: > > > On Mon, Jan 28, 2019 at 2:10 PM Tonghao Zhang > > > wrote: > > > >

Re: [PATCH net v4 2/2] net/mlx5e: Don't overwrite pedit action when multiple pedit used

2019-01-28 Thread Tonghao Zhang
On Mon, Jan 28, 2019 at 11:34 PM Or Gerlitz wrote: > > On Mon, Jan 28, 2019 at 2:10 PM Tonghao Zhang > wrote: > > On Mon, Jan 28, 2019 at 12:40 AM Or Gerlitz wrote: > > > > > > On Sun, Jan 27, 2019 at 1:06 PM wrote: > > > > From: Tonghao Zh

Re: [PATCH net v4 2/2] net/mlx5e: Don't overwrite pedit action when multiple pedit used

2019-01-28 Thread Tonghao Zhang
On Mon, Jan 28, 2019 at 12:40 AM Or Gerlitz wrote: > > On Sun, Jan 27, 2019 at 1:06 PM wrote: > > From: Tonghao Zhang > > > > In some case, we may use multiple pedit actions to modify packets. > > The command shown as below: the last pedit action is effective. >

Re: [PATCH net-next v3 2/2] net/mlx5e: Don't overwrite pedit action when multiple pedit used

2019-01-24 Thread Tonghao Zhang
On Fri, Jan 25, 2019 at 1:21 AM Or Gerlitz wrote: > > On Tue, Jan 22, 2019 at 4:38 PM wrote: > > > > From: Tonghao Zhang > > > > In some case, we may use multiple pedit actions to modify packets. > > The command shown as below: the last pedit action is ef

Re: [PATCH] net: mlx5: allow default ip_proto to offload

2019-01-19 Thread Tonghao Zhang
On Fri, Jan 18, 2019 at 10:19 PM Or Gerlitz wrote: > > On Thu, Jan 17, 2019 at 3:34 PM Tonghao Zhang > wrote: > > On Thu, Jan 17, 2019 at 8:58 PM Or Gerlitz wrote: > > > On Thu, Jan 17, 2019 at 11:28 AM wrote: > > > > From: Tonghao Zhang > > >

Re: [Patch net-next] net: introduce a knob to control whether to inherit devconf config

2019-01-18 Thread Tonghao Zhang
er > > 0 > > # ip netns exec test cat /proc/sys/net/ipv6/conf/all/accept_dad > > 0 > > > > Set to a value out of range (invalid): > > # echo 3 > /proc/sys/net/core/devconf_inherit_init_net > > -bash: echo: write error: Invalid argument > > # echo -1 > /proc/sys/net/core/devconf_inherit_init_net > > -bash: echo: write error: Invalid argument > > > > Reported-by: Zhu Yanjun > > Reported-by: Tonghao Zhang > > Cc: Nicolas Dichtel > > Signed-off-by: Cong Wang > Nice! > > Acked-by: Nicolas Dichtel Acked-by: Tonghao Zhang

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

2019-01-17 Thread Tonghao Zhang
On Fri, Jan 18, 2019 at 2:00 AM Cong Wang wrote: > > On Thu, Jan 17, 2019 at 3:12 AM Tonghao Zhang > wrote: > > > > so, we should support configuration for user, inherit _init_net_ value or > > not ? > > I already told you to introduce a new proc to contro

Re: [PATCH] net: mlx5: allow default ip_proto to offload

2019-01-17 Thread Tonghao Zhang
On Thu, Jan 17, 2019 at 8:58 PM Or Gerlitz wrote: > > On Thu, Jan 17, 2019 at 11:28 AM wrote: > > From: Tonghao Zhang > > with the current code, if a modification of the ip header is required > and the ip protocol is not one of tcp, udp or icmp - we err > > This is do

Re: [PATCH] net: mlx5: allow default ip_proto to offload

2019-01-17 Thread Tonghao Zhang
On Thu, Jan 17, 2019 at 8:58 PM Or Gerlitz wrote: > > On Thu, Jan 17, 2019 at 11:28 AM wrote: > > From: Tonghao Zhang > > with the current code, if a modification of the ip header is required > and the ip protocol is not one of tcp, udp or icmp - we err > > This is do

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: > > &

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 net-next] net: ipv4: allocate ipv4_devconf memory for init_net

2018-12-19 Thread Tonghao Zhang
On Wed, Dec 19, 2018 at 7:09 AM David Miller wrote: > > From: Cong Wang > Date: Sun, 16 Dec 2018 11:06:39 -0800 > > > On Sun, Dec 16, 2018 at 8:24 AM wrote: > >> > >> From: Tonghao Zhang > >> > >> The devconf setting on the init_net w

Re: [PATCH net-next] net: sched: add checks for tbf classid

2018-12-19 Thread Tonghao Zhang
On Thu, Dec 20, 2018 at 1:40 AM Cong Wang wrote: > > On Tue, Dec 18, 2018 at 11:08 PM wrote: > > > > From: Tonghao Zhang > > > > tbf has only one qdisc class. When adding qdisc for it, > > we should check the classid, otherwise the parentid:1 > > class

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

2018-12-17 Thread Tonghao Zhang
On Mon, Dec 17, 2018 at 3:06 AM Cong Wang wrote: > > On Sun, Dec 16, 2018 at 8:24 AM wrote: > > > > From: Tonghao Zhang > > > > The devconf setting on the init_net will affect other > > namespace when them created. For example: > > > > $

Re: [PATCH net-next v6 1/4] net: vhost: lock the vqs one by one

2018-07-25 Thread Tonghao Zhang
On Sun, Jul 22, 2018 at 11:26 PM Michael S. Tsirkin wrote: > > On Sat, Jul 21, 2018 at 11:03:59AM -0700, xiangxia.m@gmail.com wrote: > > From: Tonghao Zhang > > > > This patch changes the way that lock all vqs > > at the same, to lock them one by one. It will

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] 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

[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] bonding: introduce link change helper

2018-05-16 Thread Tonghao Zhang
Introduce an new common helper to avoid redundancy. Signed-off-by: Tonghao Zhang --- drivers/net/bonding/bond_main.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c

[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 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 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 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 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

  1   2   >