Hi Brian, Jiri
thanks for the comments.
On Mon, Feb 10, 2025 at 8:47 AM Brian Vazquez wrote:
>
> On Mon, Feb 10, 2025 at 4:19 AM Jiri Olsa wrote:
> >
> > On Sun, Feb 09, 2025 at 11:22:35PM -0800, Yan Zhai wrote:
> > > The generic_map_lookup_batch currently ret
Iterating through array of maps may encounter non existing keys. The
batch operation should not fail on when this happens.
Signed-off-by: Yan Zhai
Acked-by: Hou Tao
---
.../bpf/map_tests/map_in_map_batch_ops.c | 62 +--
1 file changed, 44 insertions(+), 18 deletions
ps://lore.kernel.org/bpf/Z6JXtA1M5jAZx8xD@debian.debian/
Signed-off-by: Yan Zhai
Acked-by: Hou Tao
---
v2->v3: deleted a used macro
v1->v2: incorporate more useful information inside commit message.
---
kernel/bpf/syscall.c | 18 +-
1 file changed, 5 insertions(+), 13 deletions(-)
xisting key, and
does not return EINTR any more.
V2->V3: deleted a unused macro
V1->V2: split the fix and selftests; fixed a few selftests issues.
V2: https://lore.kernel.org/bpf/cover.1738905497.git@cloudflare.com/
V1: https://lore.kernel.org/bpf/Z6OYbS4WqQnmzi2z@debian.debian/
Yan
Iterating through array of maps may encounter non existing keys. The
batch operation should not fail on when this happens.
Signed-off-by: Yan Zhai
---
.../bpf/map_tests/map_in_map_batch_ops.c | 62 +--
1 file changed, 44 insertions(+), 18 deletions(-)
diff --git a/tools
ps://lore.kernel.org/bpf/Z6JXtA1M5jAZx8xD@debian.debian/
Signed-off-by: Yan Zhai
---
v1->v2: incorporate more useful information inside commit message.
v1: https://lore.kernel.org/bpf/Z6OYbS4WqQnmzi2z@debian.debian/
---
kernel/bpf/syscall.c | 16 +---
1 file changed, 5 insertions(+), 11 delet
avior by skipping the non-existing key, and
does not return EINTR any more.
V1->V2: split the fix and selftests; fixed a few selftests issues.
V1: https://lore.kernel.org/bpf/Z6OYbS4WqQnmzi2z@debian.debian/
Yan Zhai (2):
bpf: skip non exist keys in generic_map_lookup_batch
selftests: bpf: t
On Thu, Feb 6, 2025 at 2:20 AM Yan Zhai wrote:
>
> On Thu, Feb 6, 2025 at 12:40 AM Hou Tao wrote:
> >
> >
> >
> > Yes, the retry logic doesn't change the previous key. Thanks for the
> > clarifying.
> > > And by "skipping to the
On Thu, Feb 6, 2025 at 12:40 AM Hou Tao wrote:
>
> Hi,
>
> On 2/6/2025 12:57 AM, Yan Zhai wrote:
> > The generic_map_lookup_batch currently returns EINTR if it fails with
> > ENOENT and retries several times on bpf_map_copy_value. The next batch
> > would start fro
f it finds a non
existing element, skip to the next key.
Fixes: cb4d03ab499d ("bpf: Add generic support for lookup batch op")
Closes: https://lore.kernel.org/bpf/Z6JXtA1M5jAZx8xD@debian.debian/
Signed-off-by: Yan Zhai
---
kernel/bpf/syscall.c | 16 ++
.../b
smaller than requested gso_size, and return EMSGSIZE instead of EINVAL
on MTU/PMTU check failure to be more specific on the error cause.
Fixes: 4094871db1d6 ("udp: only do GSO if # of segs > 1")
Signed-off-by: Yan Zhai
Suggested-by: Willem de Bruijn
---
v2->v3: simplify the code;
On Thu, Jan 30, 2025 at 9:35 AM Willem de Bruijn
wrote:
>
> Yan Zhai wrote:
> > Commit 4094871db1d6 ("udp: only do GSO if # of segs > 1") avoided GSO
> > for small packets. But the kernel currently dismisses GSO requests only
> > after checking MTU/PMT
v2 link here: https://lore.kernel.org/netdev/Z5swit7ykNRbJFMS@debian.debian/T/#u
On Wed, Jan 29, 2025 at 10:48 AM Yan Zhai wrote:
>
> On Wed, Jan 29, 2025 at 8:08 AM Willem de Bruijn
> wrote:
> >
> > Yan Zhai wrote:
> > > On Tue, Jan 28, 2025 at 8:45 AM
smaller than requested gso_size, and return EMSGSIZE instead of EINVAL
on MTU/PMTU check failure to be more specific on the error cause.
Fixes: 4094871db1d6 ("udp: only do GSO if # of segs > 1")
Signed-off-by: Yan Zhai
--
v1->v2: add a missing MTU check when fall back to no GS
On Wed, Jan 29, 2025 at 8:08 AM Willem de Bruijn
wrote:
>
> Yan Zhai wrote:
> > On Tue, Jan 28, 2025 at 8:45 AM Willem de Bruijn
> > wrote:
> > >
> > > Yan Zhai wrote:
> > > > Hi Willem,
> > > >
> > > > Thanks for getti
On Tue, Jan 28, 2025 at 8:45 AM Willem de Bruijn
wrote:
>
> Yan Zhai wrote:
> > Hi Willem,
> >
> > Thanks for getting back to me.
> >
> > On Mon, Jan 27, 2025 at 8:33 AM Willem de Bruijn
> > wrote:
> > >
> > > Yan Zhai wrote:
>
Hi Willem,
Thanks for getting back to me.
On Mon, Jan 27, 2025 at 8:33 AM Willem de Bruijn
wrote:
>
> Yan Zhai wrote:
> > Commit 4094871db1d6 ("udp: only do GSO if # of segs > 1") avoided GSO
> > for small packets. But the kernel currently dismisses GSO requests
4094871db1d6 ("udp: only do GSO if # of segs > 1")
Signed-off-by: Yan Zhai
---
net/ipv4/udp.c | 18 --
net/ipv6/udp.c | 18 --
tools/testing/selftests/net/udpgso.c | 14 ++
3 files changed, 30 i
Replace kfree_skb_reason with sk_skb_reason_drop and pass the receiving
socket to the tracepoint.
Reported-by: kernel test robot
Closes: https://lore.kernel.org/r/202406011859.aacus8gv-...@intel.com/
Signed-off-by: Yan Zhai
---
v2->v3: fixed uninitialized sk, added missing report tags.
---
Replace kfree_skb_reason with sk_skb_reason_drop and pass the receiving
socket to the tracepoint.
Reported-by: kernel test robot
Closes: https://lore.kernel.org/r/202406011751.npvn0ssk-...@intel.com/
Signed-off-by: Yan Zhai
---
v2->v3: added missing report tags
---
net/ipv4/udp.c |
Replace kfree_skb_reason with sk_skb_reason_drop and pass the receiving
socket to the tracepoint.
Reported-by: kernel test robot
Closes: https://lore.kernel.org/r/202406011539.jhwbd7dx-...@intel.com/
Signed-off-by: Yan Zhai
---
v2->v3: added missing report tags
---
net/ipv4/syncookies.c
Replace kfree_skb_reason with sk_skb_reason_drop and pass the receiving
socket to the tracepoint.
Signed-off-by: Yan Zhai
---
net/ipv4/raw.c | 4 ++--
net/ipv6/raw.c | 8
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index 1a0953650356
Replace kfree_skb_reason with sk_skb_reason_drop and pass the receiving
socket to the tracepoint.
Signed-off-by: Yan Zhai
---
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 823306487a82..619ddc087957 100644
--- a/net
are still usable but they are now just
inline helpers that call sk_skb_reason_drop.
Note it is not feasible to do the same to consume_skb. Packets not
dropped can flow through multiple receive handlers, and have multiple
receiving sockets. Leave it untouched for now.
Suggested-by: Eric Dumazet
Sig
othing about a receiver.
Allow passing an extra receiving socket to the tracepoint to improve
the visibility on receiving drops.
Signed-off-by: Yan Zhai
---
v4->v5: rename rx_skaddr -> rx_sk as Jesper Dangaard Brouer suggested
v3->v4: adjusted the TP_STRUCT field order to be consisten
org/linux-kernel/cover.1717206060.git@cloudflare.com/
V1: https://lore.kernel.org/netdev/cover.1717105215.git@cloudflare.com/
Yan Zhai (7):
net: add rx_sk to trace_kfree_skb
net: introduce sk_skb_reason_drop function
ping: use sk_skb_reason_drop to free rx packets
net: raw: use sk_skb_reas
On Fri, Jun 14, 2024 at 5:15 AM Paolo Abeni wrote:
>
> On Wed, 2024-06-12 at 09:59 +0200, Jesper Dangaard Brouer wrote:
> >
> > On 11/06/2024 22.11, Yan Zhai wrote:
> > > skb does not include enough information to find out receiving
> > > sockets/services and
Replace kfree_skb_reason with sk_skb_reason_drop and pass the receiving
socket to the tracepoint.
Reported-by: kernel test robot
Closes: https://lore.kernel.org/r/202406011859.aacus8gv-...@intel.com/
Signed-off-by: Yan Zhai
---
v2->v3: fixed uninitialized sk, added missing report tags.
---
Replace kfree_skb_reason with sk_skb_reason_drop and pass the receiving
socket to the tracepoint.
Reported-by: kernel test robot
Closes: https://lore.kernel.org/r/202406011751.npvn0ssk-...@intel.com/
Signed-off-by: Yan Zhai
---
v2->v3: added missing report tags
---
net/ipv4/udp.c |
Replace kfree_skb_reason with sk_skb_reason_drop and pass the receiving
socket to the tracepoint.
Reported-by: kernel test robot
Closes: https://lore.kernel.org/r/202406011539.jhwbd7dx-...@intel.com/
Signed-off-by: Yan Zhai
---
v2->v3: added missing report tags
---
net/ipv4/syncookies.c
Replace kfree_skb_reason with sk_skb_reason_drop and pass the receiving
socket to the tracepoint.
Signed-off-by: Yan Zhai
---
net/ipv4/raw.c | 4 ++--
net/ipv6/raw.c | 8
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index 1a0953650356
Replace kfree_skb_reason with sk_skb_reason_drop and pass the receiving
socket to the tracepoint.
Signed-off-by: Yan Zhai
---
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 823306487a82..619ddc087957 100644
--- a/net
are still usable but they are now just
inline helpers that call sk_skb_reason_drop.
Note it is not feasible to do the same to consume_skb. Packets not
dropped can flow through multiple receive handlers, and have multiple
receiving sockets. Leave it untouched for now.
Suggested-by: Eric Dumazet
Sig
othing about a receiver.
Allow passing an extra receiving socket to the tracepoint to improve
the visibility on receiving drops.
Signed-off-by: Yan Zhai
---
v3->v4: adjusted the TP_STRUCT field order to be consistent
v2->v3: fixed drop_monitor function prototype
---
include/trace/event
sted.
V3: https://lore.kernel.org/netdev/cover.1717529533.git@cloudflare.com/
V2:
https://lore.kernel.org/linux-kernel/cover.1717206060.git@cloudflare.com/
V1: https://lore.kernel.org/netdev/cover.1717105215.git@cloudflare.com/
Yan Zhai (7):
net: add rx_sk to trace_kfree_skb
net: int
On Mon, Jun 10, 2024 at 11:54 AM Steven Rostedt wrote:
>
> On Thu, 6 Jun 2024 10:37:46 -0500
> Yan Zhai wrote:
>
> > > name: kfree_skb
> > > ID: 1799
> > > format:
> > > field:unsigned short common_type; offset:0; size:2;
&
On Wed, Jun 5, 2024 at 6:57 PM Steven Rostedt wrote:
>
> On Tue, 4 Jun 2024 14:47:38 -0700
> Yan Zhai wrote:
>
> > skb does not include enough information to find out receiving
> > sockets/services and netns/containers on packet drops. In theory
> > skb->dev
Replace kfree_skb_reason with sk_skb_reason_drop and pass the receiving
socket to the tracepoint.
Reported-by: kernel test robot
Closes: https://lore.kernel.org/r/202406011859.aacus8gv-...@intel.com/
Signed-off-by: Yan Zhai
---
v2->v3: fixed uninitialized sk, added missing report tags.
---
Replace kfree_skb_reason with sk_skb_reason_drop and pass the receiving
socket to the tracepoint.
Reported-by: kernel test robot
Closes: https://lore.kernel.org/r/202406011751.npvn0ssk-...@intel.com/
Signed-off-by: Yan Zhai
---
v2->v3: added missing report tags
---
net/ipv4/udp.c |
Replace kfree_skb_reason with sk_skb_reason_drop and pass the receiving
socket to the tracepoint.
Reported-by: kernel test robot
Closes: https://lore.kernel.org/r/202406011539.jhwbd7dx-...@intel.com/
Signed-off-by: Yan Zhai
---
v2->v3: added missing report tags
---
net/ipv4/syncookies.c
Replace kfree_skb_reason with sk_skb_reason_drop and pass the receiving
socket to the tracepoint.
Signed-off-by: Yan Zhai
---
net/ipv4/raw.c | 4 ++--
net/ipv6/raw.c | 8
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index 1a0953650356
Replace kfree_skb_reason with sk_skb_reason_drop and pass the receiving
socket to the tracepoint.
Signed-off-by: Yan Zhai
---
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 823306487a82..619ddc087957 100644
--- a/net
are still usable but they are now just
inline helpers that call sk_skb_reason_drop.
Note it is not feasible to do the same to consume_skb. Packets not
dropped can flow through multiple receive handlers, and have multiple
receiving sockets. Leave it untouched for now.
Suggested-by: Eric Dumazet
Sig
othing about a receiver.
Allow passing an extra receiving socket to the tracepoint to improve
the visibility on receiving drops.
Signed-off-by: Yan Zhai
---
v2->v3: fixed drop_monitor function prototype
---
include/trace/events/skb.h | 11 +++
net/core/dev.c | 2 +-
https://lore.kernel.org/netdev/cover.1717105215.git@cloudflare.com/
Yan Zhai (7):
net: add rx_sk to trace_kfree_skb
net: introduce sk_skb_reason_drop function
ping: use sk_skb_reason_drop to free rx packets
net: raw: use sk_skb_reason_drop to free rx packets
tcp: use sk_skb_reason_dro
45 matches
Mail list logo