ck *sk_test,
>struct sock **psk)
> {
> - struct sock *sk;
> + struct sock *sk = NULL;
> int err = 0;
>
> spin_lock_bh(&stab->lock);
> - sk = *psk;
> - if (!sk_test || sk_test == sk)
> + if (!sk_test || sk_test == *psk)
> sk = xchg(psk, NULL);
>
> if (likely(sk))
>
> --
> 2.46.2
>
Reviewed-by: John Fastabend
sockmap holding a socket, but without the respective
> link. This in turn means that close(sock) won't trigger the cleanup, i.e. a
> closed socket will not be automatically removed from the sockmap.
>
> Stop tearing the links when a matching link_raw is found.
>
> Sign
Michal Luczaj wrote:
> Verify that the sockmap link was not severed, and socket's entry is indeed
> removed from the map when the corresponding descriptor gets closed.
>
> Signed-off-by: Michal Luczaj
> ---
Reviewed-by: John Fastabend
Stefano Garzarella wrote:
> On Wed, Nov 20, 2024 at 10:48:25PM -0800, John Fastabend wrote:
> >Michal Luczaj wrote:
> >> Two small fixes for vsock: poll() missing a queue check, and close() not
> >> invoking sockmap cleanup.
> >>
> >> Signed-off-by:
++
> 2 files changed, 120 insertions(+), 27 deletions(-)
> ---
> base-commit: 6c4139b0f19b7397286897caee379f8321e78272
> change-id: 20241118-vsock-bpf-poll-close-64f432e682ec
>
> Best regards,
> --
> Michal Luczaj
>
LGTM, would be nice to get an ack from someone on the vsock side
though.
Acked-by: John Fastabend
ses it
> to kmap_local_page() and to page_address(), then kernel panics.
>
> To solve this, we should skip this zero length skb. So in sk_msg_recvmsg(),
> if copy is zero, that means it's a zero length skb, skip invoking
> copy_page_to_iter(). We are using the EFAULT return trigg
Geliang Tang wrote:
> From: Geliang Tang
>
> Run this BPF selftests (./test_progs -t sockmap_basic) on a Loongarch
> platform, a Kernel panic occurs:
>
> '''
> Oops[#1]:
> CPU: 22 PID: 2824 Comm: test_progs Tainted: G OE 6.10.0-rc2+ #18
> Hardware name: LOONGSON Dabieshan/Loongson-TC5
Eric Dumazet wrote:
> On Tue, Jun 25, 2024 at 10:25 AM Geliang Tang wrote:
> >
> > From: Geliang Tang
> >
> > Run the following BPF selftests on Loongarch:
> >
> > ./test_progs -t sockmap_basic
> >
> > A Kernel panic occurs:
> >
> > '''
> > Oops[#1]:
> > CPU: 22 PID: 2824 Comm: test_progs Taint
Geliang Tang wrote:
> On Mon, 2024-05-27 at 21:36 +0200, Jakub Sitnicki wrote:
> > On Mon, May 27, 2024 at 10:12 AM -07, John Fastabend wrote:
> > > Geliang Tang wrote:
> > > > From: Geliang Tang
> > > >
> > > > Switch attachments to bpf_li
Geliang Tang wrote:
> From: Geliang Tang
>
> Switch attachments to bpf_link using bpf_program__attach_sockmap() instead
> of bpf_prog_attach().
Sorry it took me a few days to get to this.
Is there a reason to push this to links vs just leave it as is? I had
a plan to port all the test_sockmap t
s->bytes_recvd += recv;
> + if (recv > 0)
> + s->bytes_recvd += recv;
>
> if (opt->check_recved_len && s->bytes_recvd >
> total_bytes) {
> errno = EMSGSIZE;
> --
> 2.43.0
>
Acked-by: John Fastabend
mp;& *f)
> - ret = SK_DROP;
> err = bpf_skb_adjust_room(skb, 4, 0, 0);
> if (err)
> return SK_DROP;
> --
> 2.43.0
>
Acked-by: John Fastabend
key = next_key = 0;
> bpf_map_update_elem(map_fd[i], &key, &zero, BPF_ANY);
> while (bpf_map_get_next_key(map_fd[i], &key, &next_key) == 0) {
> --
> 2.43.0
>
Acked-by: John Fastabend
Geliang Tang wrote:
> From: Geliang Tang
>
> The values of tx_prog_fd in run_options() should not be 0, so set it as -1
> in else branch, and test it using "if (tx_prog_fd > 0)" condition, not
> "if (tx_prog_fd)" or "if (tx_prog_fd >= 0)".
>
Geliang Tang wrote:
> From: Geliang Tang
>
> There's already a definition of i in run_options() at the beginning, no
> need to define a new one in "if (tx_prog_fd > 0)" block.
>
> Signed-off-by: Geliang Tang
> ---
Acked-by: John Fastabend
these missing "free(input)" in parse_stats() to avoid
> memory leak in veristat.c.
>
> Signed-off-by: Geliang Tang
> ---
Acked-by: John Fastabend
ds these missing "free(ptr)" in check_whitelist() and
> check_blacklist() to avoid memory leaks in test_sockmap.c.
>
> Signed-off-by: Geliang Tang
> ---
Acked-by: John Fastabend
Geliang Tang wrote:
> Hi Jakub,
>
> On Wed, 2024-04-03 at 15:29 -0700, John Fastabend wrote:
> > Jakub Sitnicki wrote:
> > > Hi Geliang,
> > >
> > > On Wed, Apr 03, 2024 at 04:32 PM +08, Geliang Tang wrote:
> > > > From: Geliang Tang
&g
Jakub Sitnicki wrote:
> Hi Geliang,
>
> On Wed, Apr 03, 2024 at 04:32 PM +08, Geliang Tang wrote:
> > From: Geliang Tang
> >
> > Incorrect arguments are passed to fcntl() in test_sockmap.c when invoking
> > it to set file status flags. If O_NONBLOCK is used as 2nd argument and
> > passed into fcn
Song, Yoong Siang wrote:
> On Saturday, March 2, 2024 1:55 AM, John Fastabend
> wrote:
> >Song Yoong Siang wrote:
> >> This patch adds support to per-packet Tx hardware timestamp request to
> >> AF_XDP zero-copy packet via XDP Tx metadata framework. Please note tha
Song Yoong Siang wrote:
> This patch adds support to per-packet Tx hardware timestamp request to
> AF_XDP zero-copy packet via XDP Tx metadata framework. Please note that
> user needs to enable Tx HW timestamp capability via igc_ioctl() with
> SIOCSHWTSTAMP cmd before sending xsk Tx hardware timest
usleep(10*1000);
> + usleep(10);
> }
> }
> }
> --
> 2.34.1
>
Acked-by: John Fastabend
22 matches
Mail list logo