0, Yejune Deng wrote:
> > Add likely() statements in ipv4_confirm_neigh() for 'rt->rt_gw_family
> > == AF_INET'.
>
> Why? Such macros are beneficial in only specific cases, most of the time,
> likely/unlikely is cargo cult.
>
> >
> > Signed-off-by: Yej
negative_advice handler is only called when dst is non-NULL hence the
'if (rt)' check can be removed. 'if' and 'else if' can be merged together.
And use container_of() instead of (struct rtable *).
Signed-off-by: Yejune Deng
---
net/ipv4/route.c | 16 +
Add likely() statements in ipv4_confirm_neigh() for 'rt->rt_gw_family
== AF_INET'.
Signed-off-by: Yejune Deng
---
net/ipv4/route.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index fa68c2612252..5762d9bc671c 100644
-
Put if and else if together, and remove unnecessary judgments, because
it's caller can make sure it is true. And add likely() in
ipv4_confirm_neigh().
Signed-off-by: Yejune Deng
---
net/ipv4/route.c | 18 +++---
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/net
proc_creat_seq() that directly take a struct seq_operations,
and deal with network namespaces in ->open.
Signed-off-by: Yejune Deng
---
net/ipv4/route.c | 34 --
1 file changed, 4 insertions(+), 30 deletions(-)
diff --git a/net/ipv4/route.c b/net/ipv4/rout
There is no need to assign the msg->msg_name to sin or sin6,
because there is DECLARE_SOCKADDR statement.
Signed-off-by: Yejune Deng
---
net/rds/recv.c | 4
1 file changed, 4 deletions(-)
diff --git a/net/rds/recv.c b/net/rds/recv.c
index aba4afe4dfed..4db109fb6ec2 100644
--- a/net/
In inet_initpeers(), struct inet_peer on IA32 uses 128 bytes in nowdays.
Get rid of the cascade and use div64_ul() and clamp_val() calculate that
will not need to be adjusted in the future as suggested by Eric Dumazet.
Suggested-by: Eric Dumazet
Signed-off-by: Yejune Deng
---
net/ipv4
Thanks,I will adopt it and resubmit.
On Fri, Feb 26, 2021 at 10:50 PM Eric Dumazet wrote:
>
>
>
> On 2/26/21 11:57 AM, Yejune Deng wrote:
> > In inet_initpeers(), if si.totalram <= (8192*1024)/PAGE_SIZE, it will
> > be judged three times. Use else if instead of if, it
In inet_initpeers(), if si.totalram <= (8192*1024)/PAGE_SIZE, it will
be judged three times. Use else if instead of if, it only needs to be
judged once.
Signed-off-by: Yejune Deng
---
net/ipv4/inetpeer.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/net/i
Thank you for the clarification.
On Tue, Feb 23, 2021 at 12:07 AM David Ahern wrote:
>
> On 2/22/21 1:37 AM, Eric Dumazet wrote:
> >
> >
> > On 2/22/21 4:15 AM, Yejune Deng wrote:
> >> The arp_hh_ops structure is similar to the arp_generic_ops structure.
>
ild/src/consumer/net/core/neighbour.c:1009)
Reported-by: kernel test robot
Signed-off-by: Yejune Deng
---
net/ipv4/arp.c | 15 ++-
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 922dd73e5740..9ee59c2e419a 100644
--- a/net/ipv4/ar
Sorry,it was my fault, I will resubmit.
On Sun, Feb 21, 2021 at 9:54 AM David Ahern wrote:
>
> On 2/19/21 9:32 PM, Yejune Deng wrote:
> > static const struct neigh_ops arp_direct_ops = {
> > .family = AF_INET,
> > .output =
The 'arp_hh_ops' structure is similar to the 'arp_generic_ops' structure.
So remove the 'arp_hh_ops' structure.
Signed-off-by: Yejune Deng
---
net/ipv4/arp.c | 19 +++
1 file changed, 3 insertions(+), 16 deletions(-)
diff --git a/net/ipv
In bictcp_reset(), use memset and offsetof instead of = 0.
Signed-off-by: Yejune Deng
---
net/ipv4/tcp_cubic.c | 11 +--
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/net/ipv4/tcp_cubic.c b/net/ipv4/tcp_cubic.c
index c7bf5b2..ffcbe46 100644
--- a/net/ipv4/tcp_cubic.c
See Documentation/timers/timers-howto.rst, msleep() is not
for (1ms - 20ms), use usleep_range() instead.
Signed-off-by: Yejune Deng
---
net/core/dev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index d33099f..c0aa52f 100644
--- a/net
Does anyone else have a different opinion? If not,I will adopt it and resubmit.
On Thu, Dec 10, 2020 at 6:19 PM Eric Dumazet wrote:
>
> On Thu, Dec 10, 2020 at 10:35 AM Yejune Deng wrote:
> >
> > See Documentation/timers/timers-howto.rst, msleep() is not
> > for (1ms
See Documentation/timers/timers-howto.rst, msleep() is not
for (1ms - 20ms), There is a more advanced API is used.
Signed-off-by: Yejune Deng
---
net/core/dev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index d33099f..6e83ee03 100644
a set of phy_set_bits() looks more neater
Signed-off-by: Yejune Deng
---
drivers/net/phy/marvell.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 587930a..620052c 100644
--- a/drivers/net/phy
a set of phy_set_bits() looks more neater
Signed-off-by: Yejune Deng
---
drivers/net/phy/marvell.c | 24
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 587930a..f402e7f 100644
--- a/drivers/net
atomic_inc_return() looks better
Signed-off-by: Yejune Deng
---
net/netfilter/ipvs/ip_vs_core.c | 2 +-
net/netfilter/ipvs/ip_vs_sync.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
index c0b8215
a set of atomic_inc() looks more readable
Signed-off-by: Yejune Deng
---
drivers/net/wireless/st/cw1200/bh.c | 10 +-
drivers/net/wireless/st/cw1200/wsm.c | 8
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/net/wireless/st/cw1200/bh.c
b/drivers/net
21 matches
Mail list logo