On Wed, Apr 22, 2015 at 3:57 PM, Herbert Xu herb...@gondor.apana.org.au wrote:
Signed-off-by: Li RongQing roy.qing...@gmail.com
This is not a bug fix but an optimisation. The walker entries are
all marked as dead and will be skipped by the loop.
However, I don't see anything wrong
On Fri, Oct 23, 2015 at 6:04 PM, David Miller wrote:
>> +out1:
>> + unregister_sysctl_table(net_header);
>> + kfree(net_header);
>
> I read over unregister_sysctl_table() and it appears to do the kfree()
> for us, doesn't it?
you are right, thanks
-Roy
--
To
On Wed, Oct 14, 2015 at 12:11 AM, Martin KaFai Lau <ka...@fb.com> wrote:
> On Tue, Oct 13, 2015 at 08:46:49PM +0800, Li RongQing wrote:
>> 1. in a machine, configure 3000 ipv6 address in one interface
>>
>> for i in {1..3000}; do ip -6 addr add 4001:5013::$i/0 dev eth0
On Tue, Oct 13, 2015 at 10:26 PM, Hannes Frederic Sowa
wrote:
>>root@du1:~# ip route get 2001:1b70:82a8:18:650:65:0:2
>>2001:1b70:82a8:18:650:65:0:2 dev eth10.650 src
>> 2001:1b70:82a8:18:650:65:0:2 metric 0
>>cache
>>root@du1:~#
>
> Which kernel
ev/msg314717.html
>
> You can try these patches to check if they resolve your problem:
> 7035870d1219 | 2015-05-03 | ipv6: Check RTF_LOCAL on rt->rt6i_flags instead
> of rt->dst.flags
> 653437d02f1f | 2015-04-28 | ipv6: Stop /128 route from disappearing after
> pmtu update
>
&g
On Wed, Oct 14, 2015 at 5:53 PM, Li RongQing <roy.qing...@gmail.com> wrote:
> On Wed, Oct 14, 2015 at 5:18 PM, Sheng Yong <shengyo...@huawei.com> wrote:
>> Hi, Rongqing,
>>
>> Cced Martin KaFai Lau <ka...@fb.com>
>>
>> It seems you trig
On Thu, Oct 15, 2015 at 10:56 PM, Florian Fainelli wrote:
> Did not you mean strlen(dhcp_client_identifer) + 1 instead?
no;
dhcp_client_identifer[0] is client identifier type, and it maybe 0;
dhcp_client_identifer+1 is the start address of client identifier value;
-Roy
--
On Thu, Oct 15, 2015 at 11:27 AM, kbuild test robot wrote:
> Hi Li,
>
> [auto build test WARNING on net/master -- if it's inappropriate base, please
> suggest rules for selecting the more suitable base]
>
> url:
>
1. Machine with 2001:1b70:82a8:18:650:65:0:2 address, and receive wrong
icmp packets
root@du1:~# ifconfig
eth10.650 Link encap:Ethernet HWaddr 74:c9:9a:a7:e5:88
inet6 addr: fe80::76c9:9aff:fea7:e588/64 Scope:Link
inet6 addr: 2001:1b70:82a8:18:650:65:0:2/80
1. in a machine, configure 3000 ipv6 address in one interface
for i in {1..3000}; do ip -6 addr add 4001:5013::$i/0 dev eth0; done
2. in other machine, ping6 the upper configured ipv6 address, then
lots of lost packets
ip -6 addr add 4001:5013::0/64 dev eth0
for i in {1..2000}; do ping6 -q -c1
>>
>> is it right?
>
>
> no. The above works fine for me. I literally copied and pasted all of the
> commands except the master ones which were adapted to my setup -- eth9 and
> eth11 for me instead of eth0 and eth1. tcpdump on N2, N3 show the right one
> is receiving packets based on which 'ping
On Thu, Feb 25, 2016 at 5:44 AM, Stephen Hemminger
wrote:
>> This is especially annoying for the virtualization case because the
>> KVM's tap driver will by default adopt the bridge's MTU on startup
>> making it impossible (without the workaround) to use a large MTU on
On Tue, Feb 23, 2016 at 1:58 AM, Stephen Hemminger
<step...@networkplumber.org> wrote:
>> guest VMs.
>>
>> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1399064
>>
>> Signed-off-by: Li RongQing <roy.qing...@gmail.com>
>
> Your change wor
On Tue, Mar 15, 2016 at 12:25 AM, David Miller wrote:
>
> We need it for the modifications made by fixup_permanent_addr().
fixup_permanent_addr should be protected by ifp->lock,
not by idev->lock write lock, since ifp is modified,
-Roy
:400236400 400236401
Signed-off-by: Li RongQing <lirongq...@baidu.com>
---
include/net/inet_connection_sock.h | 23 ---
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/include/net/inet_connection_sock.h
b/include/net/inet_connection_sock.h
sorry, please drop this patch.
I should replace NR_CPUS with nr_cpu_ids, i will resend it
-R
On 6/15/18, Li RongQing wrote:
> The default NR_CPUS can be very large, but actual possible nr_cpu_ids
> usually is very small. For some x86 distribution, the NR_CPUS is 8192
> and nr_cpu
The default NR_CPUS can be very large, but actual possible nr_cpu_ids
usually is very small. For some x86 distribution, the NR_CPUS is 8192
and nr_cpu_ids is 4.
when xfrm_init is running, num_possible_cpus() should work
Signed-off-by: Li RongQing
Signed-off-by: Wang Li
---
net/xfrm
The default NR_CPUS can be very large, but actual possible nr_cpu_ids
usually is very small. For some x86 distribution, the NR_CPUS is 8192
and nr_cpu_ids is 4, so replace NR_CPU to save some memory
Signed-off-by: Li RongQing
Signed-off-by: Wang Li
---
net/xfrm/xfrm_policy.c | 4 ++--
1 file
RFC4821 say: The value for this timer MUST NOT be less than
5 minutes and is recommended to be 10 minutes, per RFC 1981.
Signed-off-by: Li RongQing
---
net/ipv4/sysctl_net_ipv4.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4
After 07d78363dcffd [net: Convert NAPI gro list into a small hash table]
there is 8 hash buckets, which allow more flows to be held for merging.
keep each as original list length, so increase MAX_GRO_SKBS to 64
Signed-off-by: Li RongQing
---
net/core/dev.c | 3 +--
1 file changed, 1 insertion
On 7/2/18, David Miller wrote:
> From: Li RongQing
> Date: Mon, 2 Jul 2018 19:41:43 +0800
>
>> After 07d78363dcffd [net: Convert NAPI gro list into a small hash table]
>> there is 8 hash buckets, which allow more flows to be held for merging.
>>
>> keep each as
发件人: David Miller [da...@davemloft.net]
发送时间: 2018年7月2日 19:44
收件人: Li,Rongqing
抄送: netdev@vger.kernel.org; eric.duma...@gmail.com
主题: Re: [PATCH][net-next] net: increase MAX_GRO_SKBS to 64
From: Li RongQing
Date: Mon, 2 Jul 2018 19:41:43 +0800
>>
socket can be disconnected and gets transformed back to a listening
socket, if sk_frag.page is not released, which will be cloned into
a new socket by sk_clone_lock, but the reference count of this page
is increased, lead to a use after free or double free issue
Signed-off-by: Li RongQing
> > if (newsk->sk_prot->sockets_allocated)
> > sk_sockets_allocated_inc(newsk);
>
> Good catch.
>
> I suspect this was discovered by some syzkaller/syzbot run ?
>
No.
I am seeing a panic, a page is in both task.task_frag.page and buddy free list;
It should
> -邮件原件-
> 发件人: Eric Dumazet [mailto:eric.duma...@gmail.com]
> 发送时间: 2018年1月26日 11:14
> 收件人: Li,Rongqing <lirongq...@baidu.com>; netdev@vger.kernel.org
> 抄送: eduma...@google.com
> 主题: Re: 答复: [PATCH] net: clean the sk_frag.page of new cloned socket
>
> On
> > my kernel is 3.10, I did not find the root cause, I guest all kind of
> > possibility
> >
>
> Have you backported 22a0e18eac7a9e986fec76c60fa4a2926d1291e2 ?
>
>
When I see this bug, I find this commit, and backport it,
But this seems to not related to my bug.
> > > I would rather move
gets transformed back to a listening socket, will allocate an
tcp_sock through sk_clone_lock() when a new connection comes in.
Signed-off-by: Li RongQing <lirongq...@baidu.com>
Cc: Eric Dumazet <eduma...@google.com>
---
net/core/sock.c | 2 ++
1 file changed, 2 insertions(+)
diff --gi
if dev_get_valid_name failed, propagate its return code
and remove the setting err to ENODEV, it will be set to
0 again before dev_change_net_namespace exits.
Signed-off-by: Li RongQing
---
net/core/dev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/core/dev.c b
0x3ff in tun_hashfn is mask of TUN_NUM_FLOW_ENTRIES, instead
of hardcode, define a macro to setup the relationship with
TUN_NUM_FLOW_ENTRIES
Signed-off-by: Li RongQing
---
drivers/net/tun.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/tun.c b/drivers/net
dev_set_mtu_ext is able to fail with a valid mtu value, at that
condition, extack._msg is not set and random since it is in stack,
then kernel will crash when print it.
Fixes: 7a4c53bee3324a ("net: report invalid mtu value via netlink extack")
Signed-off-by: Zhang Yu
Signed-off-by: L
cpumask_first(cpu_possible_mask)
2: when get/clear statistic, reduce the iteratation; but it
is not hot path, so use for_each_possible_cpu
Signed-off-by: Zhang Yu
Signed-off-by: Li RongQing
---
net/openvswitch/flow.c | 11 +--
net/openvswitch/flow.h | 5 ++---
net
struct packet_ring_buffer, no longer
need to save/restore 'order'
*Remove variable 'order' for packet_set_ring, it is now unused
Signed-off-by: Zhang Yu
Signed-off-by: Li RongQing
---
net/packet/af_packet.c | 44 +---
net/packet/internal.h | 1 -
2
Use modern kvzalloc()/kvfree() instead of custom allocations.
And remove order argument for free_pg_vec and alloc_pg_vec,
this argument is useless to kvfree, or can get from req.
Signed-off-by: Zhang Yu
Signed-off-by: Li RongQing
---
net/packet/af_packet.c | 40
ed-off-by: Zhang Yu
Signed-off-by: Li RongQing
---
drivers/net/vxlan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index ababba37d735..e5d236595206 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -464,7 +464,7 @@ static
e line times, this gives 3% speed-up with small packets.
Signed-off-by: Zhang Yu
Signed-off-by: Li RongQing
---
drivers/net/vxlan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index ababba37d735..e5d236595206 100644
--- a/drive
create_new_namespaces
copy_namespaces
copy_process
do_fork
sys_clone
stub_clone
__clone
not use the directly memory reclaim flag to avoid stall
Signed-off-by: Ni Xun
Signed-off-by: Zhang Yu
Signed-off-by: Wang Li
Signed-off-by: Li RongQing
> -邮件原件-
> 发件人: Florian Westphal [mailto:f...@strlen.de]
> 发送时间: 2018年7月24日 17:20
> 收件人: Li,Rongqing
> 抄送: netdev@vger.kernel.org; pa...@netfilter.org;
> kad...@blackhole.kfki.hu; f...@strlen.de
> 主题: Re: [PATCH] netfilter: avoid stalls in nf_ct_alloc_hashtable
&g
>
> On 07/24/2018 02:50 AM, Li,Rongqing wrote:
>
> > Thanks, Your patch fixes my issue;
> >
> > My patch may be able to reduce stall when modprobe nf module in
> memory
> > stress, Do you think this patch has any value?
>
> Only if you make it use kvza
-off-by: Wang Li
Signed-off-by: Li RongQing
---
include/net/netfilter/nf_conntrack.h | 2 --
net/netfilter/nf_conntrack_core.c| 23 +--
net/netfilter/nf_conntrack_expect.c | 2 +-
net/netfilter/nf_conntrack_helper.c | 4 ++--
net/netfilter/nf_nat_core.c | 4
> -邮件原件-
> 发件人: Eric Dumazet [mailto:eric.duma...@gmail.com]
> 发送时间: 2018年7月25日 13:45
> 收件人: Li,Rongqing ; netdev@vger.kernel.org;
> pa...@netfilter.org; kad...@blackhole.kfki.hu; f...@strlen.de; netfilter-
> de...@vger.kernel.org; coret...@netfilter.org; eduma...@g
Signed-off-by: Zhang Yu
Signed-off-by: Wang Li
Signed-off-by: Li RongQing
---
include/net/netfilter/nf_conntrack.h | 2 --
net/netfilter/nf_conntrack_core.c| 29 ++---
net/netfilter/nf_conntrack_expect.c | 2 +-
net/netfilter/nf_conntrack_helper.c | 4 ++--
net
after reconsider, I think we can remove this check directly, since
rht_grow_above_max() will be called to check the overflow again in
rhashtable_insert_one.
and atomic_read(>hash.nelems) always compares with unsigned
value, will force to switch unsigned, so the hash.nelems overflows can
be
ed-off-by: Zhang Yu
Signed-off-by: Li RongQing
---
net/netlink/af_netlink.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index b4a29bcc33b9..e3a0538ec0be 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -574,11
The type of hash::nelems has been changed from size_t to atom_t
which is int in fact, and impossible to be bigger than UINT_MAX
Fixes: 97defe1ecf86 ("rhashtable: Per bucket locks & deferred
expansion/shrinking")
Signed-off-by: Zhang Yu
Signed-off-by: Li RongQing
---
net/netlin
but limit each hash list length to 8 skb, not
the total 8 skb
Signed-off-by: Li RongQing
---
include/linux/netdevice.h | 7 +-
net/core/dev.c| 56 +++
2 files changed, 29 insertions(+), 34 deletions(-)
diff --git a/include/linux/net
but limit each hash list length to 8 skb, not
the total 8 skb
Signed-off-by: Li RongQing
---
include/linux/netdevice.h | 7 +-
net/core/dev.c| 54 +++
2 files changed, 28 insertions(+), 33 deletions(-)
diff --git a/include/linux/net
The return of num_possible_cpus() is same as nr_cpu_ids, but
nr_cpu_ids can reduce cpu computation
Signed-off-by: Li RongQing
---
net/core/dev.c | 4 ++--
net/ipv4/inet_hashtables.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/core/dev.c b/net/core
> -邮件原件-
> 发件人: Eric Dumazet [mailto:eric.duma...@gmail.com]
> 发送时间: 2018年7月8日 8:22
> 收件人: David Miller ; Li,Rongqing
>
> 抄送: netdev@vger.kernel.org
> 主题: Re: [PATCH][net-next][v2] net: limit each hash list length to
> MAX_GRO_SKBS
>
>
>
> On 07/
of gro_hash, only flush a gro_hash element if the
related bit is set, to speed up napi_gro_flush().
and update gro_bitmask only if it will be changed, to reduce cache
update
Suggested-by: Eric Dumazet
Signed-off-by: Li RongQing
---
include/linux/netdevice.h | 2 +-
net/core/dev.c
> This is used to differentiate when auto adjust is used and when user has set
> the MTU.
> As I already said everything is working as expected and you should not
> remove this code.
>
I see, thank you, and sorry for the noise.
-R
Once mtu_set_by_user is set to true, br_mtu_auto_adjust will
not run, and no chance to clear mtu_set_by_user.
and br_mtu_auto_adjust will run only if mtu_set_by_user is
false, so not need to set it to false again
Cc: Nikolay Aleksandrov
Signed-off-by: Li RongQing
---
net/bridge/br_device.c
of gro_hash, only flush a gro_hash element if the
related bit is set, to speed up napi_gro_flush().
and update gro_bitmask only if it will be changed, to reduce cache
update
Suggested-by: Eric Dumazet
Signed-off-by: Li RongQing
Cc: Stefano Brivio
---
netperf shows no difference, maybe because
> -邮件原件-
> 发件人: Nikolay Aleksandrov [mailto:niko...@cumulusnetworks.com]
> 发送时间: 2018年7月13日 16:01
> 收件人: Li,Rongqing ; netdev@vger.kernel.org
> 主题: Re: [PATCH][net-next] bridge: clean up mtu_set_by_user setting to
> false and comments
>
> On 13/07/18 09:47, Li
> -邮件原件-
> 发件人: Stefano Brivio [mailto:sbri...@redhat.com]
> 发送时间: 2018年7月11日 18:52
> 收件人: Li,Rongqing
> 抄送: netdev@vger.kernel.org; Eric Dumazet
> 主题: Re: [PATCH] net: convert gro_count to bitmask
>
> On Wed, 11 Jul 2018 17:15:53 +0800
> Li RongQing wrote:
> -邮件原件-
> 发件人: Eric Dumazet [mailto:eric.duma...@gmail.com]
> 发送时间: 2018年7月11日 19:32
> 收件人: Li,Rongqing ; netdev@vger.kernel.org
> 主题: Re: [PATCH] net: convert gro_count to bitmask
>
>
>
> On 07/11/2018 02:15 AM, Li RongQing wrote:
> > gro_hash si
> -邮件原件-
> 发件人: David Miller [mailto:da...@davemloft.net]
> 发送时间: 2018年7月12日 10:49
> 收件人: Li,Rongqing
> 抄送: netdev@vger.kernel.org
> 主题: Re: [PATCH] net: convert gro_count to bitmask
>
> From: Li RongQing
> Date: Wed, 11 Jul 2018 17:15:53 +0800
>
&
> -邮件原件-
> 发件人: Daniel Borkmann [mailto:dan...@iogearbox.net]
> 发送时间: 2018年4月17日 22:11
> 收件人: Li,Rongqing <lirongq...@baidu.com>
> 抄送: netdev@vger.kernel.org; t...@kernel.org; a...@fb.com;
> bra...@fb.com
> 主题: Re: [PATCH][net-next] net: ip tos cgroup
>
The input of css_cls_state() is impossible to NULL except
cgrp_css_online, so simplify it
Signed-off-by: Li RongQing <lirongq...@baidu.com>
---
net/core/netclassid_cgroup.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/net/core/netclassid_cgroup.c b/ne
On 4/20/18, David Miller <da...@davemloft.net> wrote:
> From: Li RongQing <lirongq...@baidu.com>
> Date: Thu, 19 Apr 2018 12:59:21 +0800
>
>> The input of css_cls_state() is impossible to NULL except
>> cgrp_css_online, so simplify it
>>
>> Signed-off
>/cgroups/tos/ip_tos.tos
2. then move processes to cgroup, or create processes in cgroup
Signed-off-by: jimyan <jim...@baidu.com>
Signed-off-by: Li RongQing <lirongq...@baidu.com>
---
include/linux/cgroup_subsys.h | 4 ++
include/net/tos_cgroup.h | 35
n
ups/tos/ip_tos.tos
2. then move processes to cgroup, or create processes in cgroup
Signed-off-by: jimyan <jim...@baidu.com>
Signed-off-by: Li RongQing <lirongq...@baidu.com>
---
include/linux/cgroup_subsys.h | 4 ++
include/net/tos_cgroup.h | 46 ++
n
move messages emitting out of sch_tree_lock to avoid holding
this lock too long.
Signed-off-by: Li RongQing <lirongq...@baidu.com>
---
net/sched/sch_htb.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 1ea984
put net when input a invalid ifindex, otherwise it will be leaked
Fixes: 5fcd266a9f64("net/ipv4: Add support for dumping addresses for a specific
device")
Cc: David Ahern
Signed-off-by: Zhang Yu
Signed-off-by: Li RongQing
---
net/ipv4/devinet.c | 4 +++-
1 file changed, 3 insert
avoid to compute the hash value if dev is not null, since
hash value is not used
Signed-off-by: Li RongQing
---
net/ipv6/anycast.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c
index 94999058e110..a20e344486cb 100644
--- a/net
avoid to compute the hash value if dev is not null, since
hash value is not used
Signed-off-by: Li RongQing
---
net/ipv6/anycast.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c
index 94999058e110..cca3b3603c42 100644
--- a/net
if local is NULL pointer, and the following access of local's
dev will trigger panic, which is same as BUG_ON
Signed-off-by: Li RongQing
---
net/openvswitch/vport-netdev.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/openvswitch/vport-netdev.c b/net/openvswitch/vport-netdev.c
index
of time
reduce a comparision
To unicast, and skb dst mac is not device mac, nothing change
To multicast, increase a comparision
Before:
1.03% [kernel] [k] eth_type_trans
After:
0.78% [kernel] [k] eth_type_trans
Signed-off-by: Zhang Yu
Signed-off-by: Li RongQing
---
net
if list is NULL pointer, and the following access of list
will trigger panic, which is same as BUG_ON
Signed-off-by: Li RongQing
---
net/core/skbuff.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 396fcb3baad0..d69503d66021 100644
--- a/net
On Sat, Nov 10, 2018 at 1:29 AM Eric Dumazet wrote:
>
>
>
> On 11/08/2018 10:21 PM, Li RongQing wrote:
> > GRO for UDP needs to lookup socket twice, first is in gro receive,
> > second is gro complete, so if store sock to skb to avoid looking up
> > twice, this ca
> > return pp;
> > }
>
> What if 'pp' is NULL?
>
> Aside from that, this replace a lookup with 2 atomic ops, and only when
> such lookup is amortized on multiple aggregated packets: I'm unsure if
> it's worthy and I don't understand how that improves RR tests (where
> the
if list is NULL pointer, and the following access of list
will trigger panic, which is same as BUG_ON
Signed-off-by: Li RongQing
---
net/core/skbuff.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 396fcb3baad0..cd668b52f96f 100644
--- a/net/core
-by: Li RongQing
---
net/ipv4/udp_offload.c | 18 +-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c
index 0646d61f4fa8..429570112a33 100644
--- a/net/ipv4/udp_offload.c
+++ b/net/ipv4/udp_offload.c
@@ -408,6 +408,11
if skb is NULL pointer, and the following access of skb's
skb_mstamp_ns will trigger panic, which is same as BUG_ON
Signed-off-by: Li RongQing
---
net/ipv4/tcp_ipv4.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index a336787d75e5..5424a4077c27
if loopback_idev is NULL pointer, and the following access of
loopback_idev will trigger panic, which is same as BUG_ON
Signed-off-by: Li RongQing
---
net/ipv6/xfrm6_policy.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c
index d35bcf92969c
we can save container_of computation and return dst directly,
since dst is always first member of struct rtable, and any
breaking will be caught by BUILD_BUG_ON in route.h
include/net/route.h:BUILD_BUG_ON(offsetof(struct rtable, dst) != 0);
Signed-off-by: Li RongQing
---
net/core
we can save container_of computation and return dst directly,
since dst is always first member of struct rt6_info
Add a BUILD_BUG_ON() to catch any change that could break this
assertion.
Signed-off-by: Li RongQing
---
include/net/ip6_route.h | 4 +++-
net/ipv6/route.c| 6 +++---
2
The device gro_cells has been initialized, it should be freed,
otherwise it will be leaked
Fixes: f203b76d78092faf2 ("xfrm: Add virtual xfrm interfaces")
Signed-off-by: Zhang Yu
Signed-off-by: Li RongQing
---
net/xfrm/xfrm_interface.c | 3 +++
1 file changed, 3 insertions(+)
diff -
if tstats of a device is not allocated, this device is not
registered correctly and can not be used.
Signed-off-by: Li RongQing
---
net/xfrm/xfrm_interface.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/net/xfrm/xfrm_interface.c b/net/xfrm/xfrm_interface.c
index dc5b20bf29cf
This place should want to initialize array, not a element,
so it should be sizeof(array) instead of sizeof(element)
but now this array only has one element, so no error in
this condition that XFRM_MAX_OFFLOAD_DEPTH is 1
Signed-off-by: Li RongQing
---
net/xfrm/xfrm_input.c | 2 +-
1 file
>
> I don't understand why you are doing this? It is not going to be
> faster (or safer) than container_of. container_of provides the
> same functionality and is safe against position of the member
> in the structure.
>
In fact, most places are converting dst to rt6_info directly, and only
few
> + BUILD_BUG_ON(offsetof(struct rt6_info, dst) != 0);
> +
please drop this patch, thanks
since BUILD_BUG_ON has been added in ip6_fib.h
include/net/ip6_fib.h: BUILD_BUG_ON(offsetof(struct rt6_info, dst) != 0);
-Li
: Re: [PATCH][next-next][v2] netlink: avoid to allocate full skb when
> sending to many devices
>
>
>
> On 09/20/2018 06:43 AM, Eric Dumazet wrote:
> >
>
Sorry, I should cc to you.
> > And lastly this patch looks way too complicated to me.
> > You probably can write something much simpler.
>
one and send, to avoid to
allocate full skb everytime.
Signed-off-by: Zhang Yu
Signed-off-by: Li RongQing
---
net/netlink/af_netlink.c | 37 ++---
1 file changed, 30 insertions(+), 7 deletions(-)
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
in
they are changed to reduce the cache false-sharing.
Signed-off-by: Zhang Yu
Signed-off-by: Wang Li
Signed-off-by: Li RongQing
---
drivers/net/tun.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 835c73f42ae7..d0745dc81976 100644
caller has guaranted that rxhash is not zero
Signed-off-by: Li RongQing
---
drivers/net/tun.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index d0745dc81976..6760b86547df 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
On 2018/11/23 上午10:04, Li RongQing wrote:
> >when page frag refills, 32K pages, 128MB memory is asked, it hardly
> >successes when system has memory stress
> Looking at get_order(), it seems we get 3 after get_order(32768) since it
> accepts the size of block.
You are r
is used up
so 32KB memory is safe choice, meanwhile, remove a unnecessary
check
Fixes: e4dab1e6ea64 ("vhost_net: mitigate page reference counting during page
frag refill")
Signed-off-by: Zhang Yu
Signed-off-by: Li RongQing
---
drivers/vhost/net.c | 22 +++---
1 file c
on x86)"
Fixes: 5640f7685831e ("net: use a per task frag allocator")
Signed-off-by: Zhang Yu
Signed-off-by: Li RongQing
---
net/core/sock.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/core/sock.c b/net/core/sock.c
index 6d7e189e3cd9..e3cbefeedf5c 100644
-
> get_order(8) returns zero here if I understood it correctly.
You are right, I understood wrongly,
Please drop this patch, sorry for the noise
-Q
pcpu_lstats is defined in several files, so unify them as one
and move to header file
Signed-off-by: Zhang Yu
Signed-off-by: Li RongQing
---
drivers/net/loopback.c| 6 --
drivers/net/nlmon.c | 6 --
drivers/net/vsockmon.c| 14 --
include/linux/netdevice.h
dup deliver.
Signed-off-by: Zhang Yu
Signed-off-by: Li RongQing
---
net/netlink/af_netlink.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index e3a0538ec0be..095b99e3c1fb 100644
--- a/net/netlink/af_netlink.c
++
> On 09/17/2018 10:26 PM, Li RongQing wrote:
> > if skb->head is vmalloc address, when this skb is delivered, full
> > allocation for this skb is required, if there are many devices, the
> > ---
> > net/netlink/af_netlink.c | 14 --
> > 1 file c
struct pcpu_vstats and pcpu_lstats have same members and
usage, and pcpu_lstats is used in many files, so rename
pcpu_vstats as pcpu_lstats to reduce duplicate definition
Signed-off-by: Zhang Yu
Signed-off-by: Li RongQing
---
drivers/net/veth.c| 22 --
include/linux
93 matches
Mail list logo