Re: [PATCH bpf-next v2 1/8] xdp: restructure redirect actions

2021-01-20 Thread Björn Töpel
On 2021-01-20 17:30, Toke Høiland-Jørgensen wrote: Björn Töpel writes: [...] It can't be free'd but, ri->map can be cleared via bpf_clear_redirect_map(). So, between the helper (setting) and the tracepoint in xdp_do_redirect() it can be cleared (say if the XDP program is swapped out, prior r

Re: [PATCH bpf-next v2 1/8] xdp: restructure redirect actions

2021-01-20 Thread Björn Töpel
On 2021-01-20 13:44, Toke Høiland-Jørgensen wrote: Björn Töpel writes: From: Björn Töpel The XDP_REDIRECT implementations for maps and non-maps are fairly similar, but obviously need to take different code paths depending on if the target is using a map or not. Today, the redirect targets

Re: [PATCH bpf-next v2 1/8] xdp: restructure redirect actions

2021-01-20 Thread Björn Töpel
On 2021-01-20 15:52, Toke Høiland-Jørgensen wrote: Björn Töpel writes: On 2021-01-20 13:44, Toke Høiland-Jørgensen wrote: Björn Töpel writes: From: Björn Töpel The XDP_REDIRECT implementations for maps and non-maps are fairly similar, but obviously need to take different code paths depen

Re: [PATCH bpf-next v2 1/8] xdp: restructure redirect actions

2021-01-20 Thread Toke Høiland-Jørgensen
Björn Töpel writes: > On 2021-01-20 15:52, Toke Høiland-Jørgensen wrote: >> Björn Töpel writes: >> >>> On 2021-01-20 13:44, Toke Høiland-Jørgensen wrote: Björn Töpel writes: > From: Björn Töpel > > The XDP_REDIRECT implementations for maps and non-maps are fairly > s

Re: [PATCH bpf-next v2 1/8] xdp: restructure redirect actions

2021-01-20 Thread Toke Høiland-Jørgensen
Björn Töpel writes: > On 2021-01-20 13:44, Toke Høiland-Jørgensen wrote: >> Björn Töpel writes: >> >>> From: Björn Töpel >>> >>> The XDP_REDIRECT implementations for maps and non-maps are fairly >>> similar, but obviously need to take different code paths depending on >>> if the target is usin

Re: [PATCH bpf-next v2 1/8] xdp: restructure redirect actions

2021-01-20 Thread Toke Høiland-Jørgensen
Björn Töpel writes: > From: Björn Töpel > > The XDP_REDIRECT implementations for maps and non-maps are fairly > similar, but obviously need to take different code paths depending on > if the target is using a map or not. Today, the redirect targets for > XDP either uses a map, or is based on ifi

[PATCH bpf-next v2 1/8] xdp: restructure redirect actions

2021-01-19 Thread Björn Töpel
From: Björn Töpel The XDP_REDIRECT implementations for maps and non-maps are fairly similar, but obviously need to take different code paths depending on if the target is using a map or not. Today, the redirect targets for XDP either uses a map, or is based on ifindex. Future commits will introd