On 2021/2/3 15:33, Johannes Berg wrote:
> On Wed, 2021-02-03 at 15:00 +0800, samirweng1979 wrote:
>> From: wengjianfeng
>>
>> change 'iff' to 'if'.
>>
>> Signed-off-by: wengjianfeng
>> ---
>> net/wireless/chan.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/net/wire
Remove the weird space inside the NETIF_F_CSUM_MASK.
Signed-off-by: Miaohe Lin
---
include/linux/netdev_features.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
index 2cc3cf80b49a..0b17c4322b09 100644
--- a
Since commit 8d7017fd621d ("blackhole_netdev: use blackhole_netdev to
invalidate dst entries"), we use blackhole_netdev to invalidate dst entries
instead of loopback device anymore.
Signed-off-by: Miaohe Lin
---
net/core/dst.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
di
Since commit 8d7017fd621d ("blackhole_netdev: use blackhole_netdev to
invalidate dst entries"), we use blackhole_netdev to invalidate dst entries
instead of loopback device anymore. Also fix broken NETIF_F_HW_CSUM spell.
Signed-off-by: Miaohe Lin
---
include/linux/netdev_features.h |
The arg exact_dif is not used anymore, remove it. inet_exact_dif_match()
is no longer needed after the above is removed, so remove it too.
Signed-off-by: Miaohe Lin
---
include/net/tcp.h | 10 --
net/ipv4/inet_hashtables.c | 6 ++
2 files changed, 2 insertions(+), 14
The arg exact_dif is not used anymore, remove it. inet6_exact_dif_match()
is no longer needed after the above is removed, remove it too.
Signed-off-by: Miaohe Lin
---
include/linux/ipv6.h| 11 ---
net/ipv6/inet6_hashtables.c | 6 ++
2 files changed, 2 insertions(+), 15
This is a pure codestyle cleanup patch. No functional change intended.
Signed-off-by: Miaohe Lin
---
include/net/dst.h| 2 +-
include/net/sock.h | 2 +-
net/ipv4/icmp.c | 2 +-
net/ipv4/ip_output.c | 2 +-
net/ipv4/ping.c | 6 --
net/ipv4/route.c | 10 +-
6
What 0x means here is actually the max mtu of a ip packet. Use help
macro IP_MAX_MTU here.
Signed-off-by: Miaohe Lin
---
net/ipv4/ip_output.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 329a0ab87542..f0f234727547
The arg exact_dif is not used anymore, remove it.
Signed-off-by: Miaohe Lin
---
net/ipv6/inet6_hashtables.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c
index 2d3add9e6116..55c290d55605 100644
--- a/net/ipv6
The arg exact_dif is not used anymore, remove it.
Signed-off-by: Miaohe Lin
---
net/ipv4/inet_hashtables.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c
index 239e54474b65..8cbe74313f38 100644
--- a/net/ipv4
Set trailer iff skb1 is the skbuff where the tailbits space begins.
Signed-off-by: Miaohe Lin
---
net/core/skbuff.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 0b24aed04060..18ed56316e56 100644
--- a/net/core/skbuff.c
+++ b
Fix some comments, including wrong function name, duplicated word and so
on.
Signed-off-by: Miaohe Lin
---
include/linux/skbuff.h | 4 ++--
include/uapi/linux/in.h | 2 +-
net/core/sock.c | 2 +-
net/ipv4/raw.c | 2 +-
net/l3mdev/l3mdev.c | 2 +-
net/socket.c
Add else to split mutually exclusive case and avoid unnecessary check.
Signed-off-by: Miaohe Lin
---
net/ipv4/ping.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
index 19a947bf0faa..265676fd2bbd 100644
--- a/net/ipv4/ping.c
+++ b/net/ipv4
When skbuff is fragment, we exit immediately and leave ip_hdrlen() as
unused. And remove the unnecessary local variable fragment.
Signed-off-by: Miaohe Lin
---
net/core/skbuff.c | 12 ++--
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/net/core/skbuff.c b/net/core
In the case of off = 0, skb_headers_offset_update() do nothing indeed.
Signed-off-by: Miaohe Lin
---
net/core/skbuff.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 18ed56316e56..f67f0da20a5b 100644
--- a/net/core/skbuff.c
+++ b/net/core
skb_checksum_setup_ipv6() always return -EPROTO if ipv6 packet is fragment.
So we should not continue to parse other header type in this case. Also
remove unnecessary local variable 'fragment'.
Signed-off-by: Miaohe Lin
---
net/core/skbuff.c | 12 ++--
1 file changed, 6 insert
This is a pure codestyle cleanup patch. Also add a blank line after
declarations as warned by checkpatch.pl.
Signed-off-by: Miaohe Lin
---
net/ipv4/ip_options.c | 35 +++
net/ipv4/ip_output.c | 2 +-
net/ipv4/route.c | 6 +++---
3 files changed, 23
Check midx against 0 is always equal to check midx against sk_bound_dev_if
when sk_bound_dev_if is known not equal to 0 in these case.
Signed-off-by: Miaohe Lin
---
net/ipv4/ip_sockglue.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4
We can avoid unnecessary inet_addr_type() call by check addr against
INADDR_ANY first.
Signed-off-by: Miaohe Lin
---
net/ipv4/ping.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
index cc09d1135ce2..19a947bf0faa 100644
--- a/net/ipv4
We can defer set ping saddr until we successfully get the ping port. So we
can avoid clear saddr when failed. Since ping_clear_saddr() is not used
anymore now, remove it.
Signed-off-by: Miaohe Lin
---
net/ipv4/ping.c | 19 +++
1 file changed, 3 insertions(+), 16 deletions
The need for padding 64bit is implicitly checked by nla_align_64bit(), so
remove this explicit one.
Signed-off-by: Miaohe Lin
---
lib/nlattr.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/nlattr.c b/lib/nlattr.c
index bc5b5cf608c4..98f596bfbfd8 100644
--- a/lib
When mtu is locked, we should not obtain ipv4 mtu as we return immediately
in this case and leave acquired ipv4 mtu unused.
Signed-off-by: Miaohe Lin
---
net/ipv4/route.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 8ca6bcab7b03
Use helper macro RT_TOS() to get tos in __icmp_send().
Signed-off-by: Miaohe Lin
---
net/ipv4/icmp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index cf36f955bfe6..3b387dc3864f 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
When mtu is locked, we should not obtain ipv4 mtu as we return immediately
in this case and leave acquired ipv4 mtu unused.
Signed-off-by: Miaohe Lin
---
net/ipv4/route.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 8ca6bcab7b03
There is no need to fetch errno and fatal info from icmp_err_convert when
icmp code is ICMP_FRAG_NEEDED.
Signed-off-by: Miaohe Lin
---
net/ipv4/raw.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index 6fd4330287c2..ea4c36e93824 100644
Convert the uses of fallthrough comments to fallthrough macro.
Signed-off-by: Miaohe Lin
---
net/wireless/chan.c| 4 ++--
net/wireless/mlme.c| 2 +-
net/wireless/nl80211.c | 20 ++--
net/wireless/scan.c| 2 +-
net/wireless/sme.c | 4
Convert the uses of fallthrough comments to fallthrough macro.
Signed-off-by: Miaohe Lin
---
net/sunrpc/auth_gss/gss_krb5_wrap.c | 2 +-
net/sunrpc/clnt.c | 22 +++---
net/sunrpc/xprt.c | 2 +-
net/sunrpc/xprtrdma/verbs.c | 2
Convert the uses of fallthrough comments to fallthrough macro.
Signed-off-by: Miaohe Lin
---
net/dccp/ccids/ccid3.c | 2 +-
net/dccp/feat.c| 3 ++-
net/dccp/input.c | 10 +-
net/dccp/options.c | 2 +-
net/dccp/output.c | 8
net/dccp/proto.c | 8
skb_mpls_push() and skb_mpls_pop() expect skb->data at mac header. Check
this assumption or we would get wrong mac_header and network_header.
Signed-off-by: Miaohe Lin
---
net/core/skbuff.c | 8
1 file changed, 8 insertions(+)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
in
We've been warning about SO_BSDCOMPAT usage for many years. We may remove
this code completely now.
Suggested-by: David S. Miller
Signed-off-by: Miaohe Lin
---
net/core/sock.c | 14 --
1 file changed, 14 deletions(-)
diff --git a/net/core/sock.c b/net/core/sock.c
Convert the uses of fallthrough comments to fallthrough macro.
Signed-off-by: Miaohe Lin
---
net/ceph/ceph_hash.c| 20 ++--
net/ceph/crush/mapper.c | 2 +-
net/ceph/messenger.c| 4 ++--
net/ceph/mon_client.c | 2 +-
net/ceph/osd_client.c | 4 ++--
5 files changed
Convert the uses of fallthrough comments to fallthrough macro.
Signed-off-by: Miaohe Lin
---
net/tipc/bearer.c | 2 +-
net/tipc/link.c | 2 +-
net/tipc/socket.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c
index 808b147df7d5
The npages test against MAX_SKB_FRAGS can be relaxed if we succeed to
allocate high order pages as the note in comment said.
Signed-off-by: Miaohe Lin
---
net/core/skbuff.c | 11 ---
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
We can possibly avoid strcmp warncomm with current->comm by check warned
first.
Signed-off-by: Miaohe Lin
---
net/core/sock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/sock.c b/net/core/sock.c
index e4f40b175acb..51e13bc42791 100644
--- a/net/core/sock.c
++
The frags of skb_shared_info of the data is assigned in following loop. It
is meaningless to do a memcpy of frags here.
Signed-off-by: Miaohe Lin
---
net/core/skbuff.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index afbc1a79dc8a
pskb_carve_frag_list() may return -ENOMEM in pskb_carve_inside_nonlinear().
we should handle this correctly or we would get wrong sk_buff.
Fixes: 6fa01ccd8830 ("skbuff: Add pskb_extract() helper function")
Signed-off-by: Miaohe Lin
---
net/core/skbuff.c | 10 +++---
1 file
Since commit 294f69e662d1 ("compiler_attributes.h: Add 'fallthrough' pseudo
keyword for switch/case use") introduce fallthrough pseudo keyword, then we
should convert the uses of fallthrough comments to it.
Signed-off-by: Miaohe Lin
---
kernel/bpf/cgroup.c | 1 -
kerne
We may access the two bytes after vlan_hdr in vlan_set_encap_proto(). So
we should pull VLAN_HLEN + sizeof(unsigned short) in skb_vlan_untag() or
we may access the wrong data.
Fixes: 0d5501c1c828 ("net: Always untag vlan-tagged traffic on input.")
Signed-off-by: Miaohe Lin
---
net/cor
Convert the uses of fallthrough comments to fallthrough macro.
Signed-off-by: Miaohe Lin
---
kernel/bpf/cgroup.c | 2 +-
kernel/bpf/cpumap.c | 2 +-
kernel/bpf/syscall.c | 2 +-
kernel/bpf/verifier.c | 6 +++---
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/kernel/bpf
If the skb is zcopied, we should increase the skb_uarg refcount before we
involve skb_release_data(). See pskb_expand_head() as a reference.
Fixes: 6fa01ccd8830 ("skbuff: Add pskb_extract() helper function")
Signed-off-by: Miaohe Lin
---
net/core/skbuff.c | 2 ++
1 file changed, 2
UDP or RAW uarg is newly
allocated when the skb is zcopied.
Fixes: 522924b58308 ("net: correct udp zerocopy refcnt also when zerocopy only
on append")
Signed-off-by: Miaohe Lin
---
net/ipv4/ip_output.c | 4 +++-
net/ipv6/ip6_output.c | 4 +++-
2 files changed, 6 insertions(+), 2
The skb_shared_info part of the data is assigned in the following loop. It
is meaningless to do a memcpy here.
Signed-off-by: Miaohe Lin
---
net/core/skbuff.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 7e2e502ef519..5b983c9472f5 100644
t;)
Signed-off-by: Miaohe Lin
---
net/core/sock.c | 25 +++--
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/net/core/sock.c b/net/core/sock.c
index 49cd5ffe673e..c9083ad44ea1 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -3406,6 +3406,16 @@ s
43 matches
Mail list logo