From: Menglong Dong
Replace the check for ETH_P_8021Q and ETH_P_8021AD in
tap_get_user with eth_type_vlan.
Signed-off-by: Menglong Dong
---
drivers/net/tap.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/tap.c b/drivers/net/tap.c
index 3c652c8ac5ba..cf9197fe
From: Menglong Dong
Replace the check for ETH_P_8021Q and ETH_P_8021AD in
tap_get_user_xdp with eth_type_vlan.
Signed-off-by: Menglong Dong
---
drivers/net/tap.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/tap.c b/drivers/net/tap.c
index 3c652c8ac5ba..e007
From: Menglong Dong
Replace the check for ETH_P_8021Q and ETH_P_8021AD in
br_dev_queue_push_xmit with eth_type_vlan.
Signed-off-by: Menglong Dong
---
net/bridge/br_forward.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c
From: Menglong Dong
Replace some checks for ETH_P_8021Q and ETH_P_8021AD with
eth_type_vlan().
Signed-off-by: Menglong Dong
---
v2:
- use eth_type_vlan() in br_validate() and __br_vlan_set_proto()
too.
---
net/bridge/br_forward.c | 3 +--
net/bridge/br_netlink.c | 11 +++
net/bridge
From: Menglong Dong
Replace some checks for ETH_P_8021Q and ETH_P_8021AD in
drivers/net/tap.c with eth_type_vlan.
Signed-off-by: Menglong Dong
---
v2:
- use eth_type_vlan() in tap_get_user_xdp() too.
---
drivers/net/tap.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git
From: Menglong Dong
Replace some checks for ETH_P_8021Q and ETH_P_8021AD with
eth_type_vlan().
Signed-off-by: Menglong Dong
---
v3:
- fix compile warning in br_vlan_set_proto() by casting 'val' to
be16.
v2:
- use eth_type_vlan() in br_validate() and __br_vlan_set_proto()
too.
---
net/brid
From: Menglong Dong
Replace some checks for ETH_P_8021Q and ETH_P_8021AD with
eth_type_vlan().
Signed-off-by: Menglong Dong
---
v4:
- remove unnecessary brackets.
v3:
- fix compile warning in br_vlan_set_proto() by casting 'val' to
be16.
v2:
- use eth_type_vlan() in br_validate() and __br_v
From: Menglong Dong
For now, there is only one element in netns_core_table, and it is inited
directly in sysctl_core_net_init. To make it more flexible, we can init
every element at once, just like what ipv4_sysctl_init_net() did.
Signed-off-by: Menglong Dong
---
net/core/sysctl_net_core.c | 1
From: Menglong Dong
For now, sysctl_wmem_default and sysctl_rmem_default are globally
unified. It's not convenient in some case. For example, when we
use docker and try to control the default udp socket receive buffer
for each container.
For that reason, make sysctl_wmem_default and sysctl_rmem_
From: Menglong Dong
For now, sysctl_wmem_max and sysctl_rmem_max are globally unified.
It's not convenient in some case. For example, when we use docker
and try to control the default udp socket receive buffer for each
container.
For that reason, make sysctl_wmem_max and sysctl_rmem_max
per-name
From: Menglong Dong
Some typos are found out by codespell tool:
$ codespell -w -i 3 ./drivers/net/tun.c
aovid ==> avoid
Fix typos found by codespell.
Signed-off-by: Menglong Dong
---
drivers/net/tun.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/tun.c b/dr
From: Menglong Dong
For now, most sysctl in 'net/core' are globally unified, such as
sysctl_wmem_default, sysctl_rmem_default, sysctl_wmem_default,
sysctl_rmem_default, etc.
It's not convenient in some case. For example, when we use docker
and try to control the default udp socket receive buffer
From: Menglong Dong
For now, sysctl_wmem_max and sysctl_rmem_max are globally unified.
It's not convenient in some case. For example, when we use docker
and try to control the default udp socket receive buffer for each
container.
For that reason, make sysctl_wmem_max and sysctl_rmem_max
per-name
From: Menglong Dong
For now, there is only one element in netns_core_table, and it is inited
directly in sysctl_core_net_init. To make it more flexible, we can init
every element at once, just like what ipv4_sysctl_init_net() did.
Signed-off-by: Menglong Dong
---
net/core/sysctl_net_core.c | 1
From: Menglong Dong
For now, sysctl_wmem_default and sysctl_rmem_default are globally
unified. It's not convenient in some case. For example, when we
use docker and try to control the default udp socket receive buffer
for each container.
For that reason, make sysctl_wmem_default and sysctl_rmem_
From: Menglong Dong
The bit mask for MSG_* seems a little confused here. Replace it
with BIT() to make it clear to understand.
Signed-off-by: Menglong Dong
---
v4:
- CC netdev
v3:
- move changelog here
v2:
- use BIT() instead of BIT_MASK()
---
include/linux/socket.h | 71 ++
From: Menglong Dong
This 'BPF_ADD' is duplicated, and I belive it should be 'BPF_AND'.
Fixes: 981f94c3e921 ("bpf: Add bitwise atomic instructions")
Signed-off-by: Menglong Dong
---
kernel/bpf/disasm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/bpf/disasm.c b/ker
From: Menglong Dong
It's better make 'pkt_sk()' inline here, as non-inline function
shouldn't occur in headers. Besides, this function is simple
enough to be inline.
Signed-off-by: Menglong Dong
---
net/packet/internal.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/p
From: Menglong Dong
'unistd.h' included in 'selftests/bpf/prog_tests/test_lsm.c' is
duplicated.
Signed-off-by: Menglong Dong
---
tools/testing/selftests/bpf/prog_tests/test_lsm.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/prog_tests/test_lsm.c
b/tools/testi
From: Menglong Dong
Some typos are found out by codespell tool:
$ codespell ./net/bridge/
./net/bridge/br_stp.c:604: permanant ==> permanent
./net/bridge/br_stp.c:605: persistance ==> persistence
./net/bridge/br.c:125: underlaying ==> underlying
./net/bridge/br_input.c:43: modue ==> mode
./n
From: Menglong Dong
Replace the check for ETH_P_8021Q and ETH_P_8021AD in
__netif_receive_skb_core with eth_type_vlan.
Signed-off-by: Menglong Dong
---
net/core/dev.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index e4d77c8abe76..2
From: Menglong Dong
It seems that 'netlink_broadcast_filtered()' is not used anywhere
besides 'netlink_broadcast()'. In order to reduce function calls,
just remove it.
Signed-off-by: Menglong Dong
---
include/linux/netlink.h | 4
net/netlink/af_netlink.c | 22 ++
2 f
From: Menglong Dong
The bit mask for MSG_* seems a little confused here. Replace it
with BIT() to make it clear to understand.
Signed-off-by: Menglong Dong
---
v4:
- CC netdev
v3:
- move changelog here
v2:
- use BIT() instead of BIT_MASK()
---
include/linux/socket.h | 71 ++
From: Liu xuzhi
A typo is found out by codespell tool in 34th lines of hashtab.c:
$ codespell ./kernel/bpf/
./hashtab.c:34 : differrent ==> different
Fix a typo found by codespell.
Signed-off-by: Liu xuzhi
---
kernel/bpf/hashtab.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -
From: Xiong Zhenwu
A typo is found out by codespell tool in 111th line of hsr_debugfs.c:
$ codespell ./net/hsr/
net/hsr/hsr_debugfs.c:111: Debufs ==> Debugfs
Fix typos found by codespell.
Signed-off-by: Xiong Zhenwu
---
net/hsr/hsr_debugfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deleti
From: Xiong Zhenwu
A typo is found out by codespell tool in 1734th line of drop_monitor.c:
$ codespell ./net/core/
./net/core/drop_monitor.c:1734: guarnateed ==> guaranteed
Fix a typo found by codespell.
Signed-off-by: Xiong Zhenwu
---
net/core/drop_monitor.c | 2 +-
1 file changed, 1 inser
From: Menglong Dong
In the first patch, I use BIT() for MSG_* to make the code tidier.
Directly use BIT() for MSG_* will be a bit problematic, because
'msg_flags' is defined as 'int' somewhere, and MSG_CMSG_COMPAT
will make it become negative, just like what Guenter Roeck
reported here:
https:/
From: Menglong Dong
The bit mask for MSG_* seems a little confused here. Replace it
with BIT() to make it clear to understand.
Signed-off-by: Menglong Dong
---
include/linux/socket.h | 71 ++
1 file changed, 37 insertions(+), 34 deletions(-)
diff --git
From: Menglong Dong
Currently, MSG_CMSG_COMPAT is defined as '1 << 31'. However, 'msg_flags'
is defined with type of 'int' somewhere, such as 'packet_recvmsg' and
other recvmsg functions:
static int packet_recvmsg(struct socket *sock, struct msghdr *msg,
size_t len,
From: Menglong Dong
In the first patch, I use BIT() for MSG_* to make the code tidier.
Directly use BIT() for MSG_* will be a bit problematic, because
'msg_flags' is defined as 'int' somewhere, and MSG_CMSG_COMPAT
will make it become negative, just like what Guenter Roeck
reported here:
https:/
From: Menglong Dong
The bit mask for MSG_* seems a little confused here. Replace it
with BIT() to make it clear to understand.
Signed-off-by: Menglong Dong
---
include/linux/socket.h | 71 ++
1 file changed, 37 insertions(+), 34 deletions(-)
diff --git
From: Menglong Dong
Currently, MSG_CMSG_COMPAT is defined as '1 << 31'. However, 'msg_flags'
is defined with type of 'int' somewhere, such as 'packet_recvmsg' and
other recvmsg functions:
static int packet_recvmsg(struct socket *sock, struct msghdr *msg,
size_t len,
From: Menglong Dong
The initialization for err with 0 seems useless, as it is soon updated
with -ENOMEM. So, we can init err with -ENOMEM.
Signed-off-by: Menglong Dong
---
drivers/net/macvlan.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/macvlan.c b/driver
From: Menglong Dong
The initialization for err with 0 seems useless, as it is soon updated
with -ENOMEM. So, we can remove it.
Changes since v1:
-Keep -ENOMEM still.
Signed-off-by: Menglong Dong
---
drivers/net/macvlan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/driv
From: Menglong Dong
When udp_memory_allocated is at the limit, __udp_enqueue_schedule_skb
will return a -ENOBUFS, and skb will be dropped in __udp_queue_rcv_skb
without any counters being done. It's hard to find out what happened
once this happen.
So we introduce a UDP_MIB_MEMERRORS to do this j
From: Menglong Dong
When udp_memory_allocated is at the limit, __udp_enqueue_schedule_skb
will return a -ENOBUFS, and skb will be dropped in __udp_queue_rcv_skb
without any counters being done. It's hard to find out what happened
once this happen.
So we introduce a UDP_MIB_MEMERRORS to do this j
From: Menglong Dong
The initialization for 'err' with '-EINVAL' is redundant and
can be removed, as it is updated soon.
Signed-off-by: Menglong Dong
---
net/ipv4/devinet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 123a6d3.
From: Menglong Dong
The initialization for 'err' with '-EINVAL' is redundant and
can be removed, as it is updated soon and not used.
Signed-off-by: Menglong Dong
---
net/ipv4/udp_diag.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/udp_diag.c b/net/ipv4/udp_diag.
From: Menglong Dong
The initialization for 'err' with '-ENOSYS' is redundant and
can be removed, as it is updated soon and not used.
Signed-off-by: Menglong Dong
---
net/ipv4/udp_offload.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp
From: Menglong Dong
The initialization for 'err' with 0 is redundant and can be removed,
as it is updated by ip_send_skb and not used before that.
Signed-off-by: Menglong Dong
---
net/ipv4/udp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
From: Menglong Dong
Obviously, 'bpf/bpf.h' in 'samples/bpf/hbm.c' is duplicated.
Signed-off-by: Menglong Dong
---
samples/bpf/hbm.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/samples/bpf/hbm.c b/samples/bpf/hbm.c
index ff4c533..400e741 100644
--- a/samples/bpf/hbm.c
+++ b/samples/bpf/h
From: Menglong Dong
Some typos are found out by misspell-fixer tool:
$ misspell-fixer -rnv ./net/sched/
./net/sched/act_api.c:686
./net/sched/act_bpf.c:68
./net/sched/cls_rsvp.h:241
./net/sched/em_cmp.c:44
./net/sched/sch_pie.c:408
Fix typos found by misspell-fixer.
Signed-off-by: Menglong Don
From: Menglong Dong
'before(*seq, TCP_SKB_CB(skb)->seq) == true' means that one or more
skbs are lost somehow. Once this happen, it seems that it will
never recover automatically. As a result, a warning will be printed
and a '-EAGAIN' will be returned in non-block mode.
As a general suituation,
From: Menglong Dong
The initialization for 'err' with '-ENOSYS' is redundant and
can be removed, as it is updated soon and not used.
Changes since v1:
- Move the err declaration below struct sock *sk
Signed-off-by: Menglong Dong
---
net/ipv4/udp_offload.c | 2 +-
1 file changed, 1 insertion(+
44 matches
Mail list logo