Skip to content

Conversation

@kernel-patches-daemon-bpf-rc
Copy link

Pull request for series with
subject: xsk: refactors around generic xmit side
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1004951

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 5a427fd
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1004951
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 5a427fd
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1004951
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 58a5820
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1004951
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 58a5820
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1004951
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 348f611
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1004951
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 2383e45
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1004951
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: f0b5c14
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1004951
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 8b52d09
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1004951
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 34f033a
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1004951
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: ceeaa71
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1004951
version: 1

We are unnecessarily setting a bunch of skb fields per each processed
descriptor, which is redundant for fragmented frames.

Let us set these respective members for first fragment only.

Signed-off-by: Maciej Fijalkowski <[email protected]>
Devices that set IFF_TX_SKB_NO_LINEAR will not execute branch that
handles metadata, as we set @first_frag only for !IFF_TX_SKB_NO_LINEAR
code in xsk_build_skb().

Same functionality can be achieved with checking if xsk_get_num_desc()
returns 0. To replace current usage of @first_frag with
XSKCB(skb)->num_descs check, pull out the code from
xsk_set_destructor_arg() that initializes sk_buff::cb and call it before
skb_store_bits() in branch that creates skb against first processed
frag. This so error path has the XSKCB(skb)->num_descs initialized and
can free skb in case skb_store_bits() failed.

Signed-off-by: Maciej Fijalkowski <[email protected]>
xsk_build_skb() has gone wild with its size and one of the things we can
do about it is to pull out a branch that takes care of metadata handling
and make it a separate function. Consider this as a good start of
cleanup.

No functional changes here.

Signed-off-by: Maciej Fijalkowski <[email protected]>
Acked-by: Stanislav Fomichev <[email protected]>
Reviewed-by: Jason Xing <[email protected]>
@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: d4680a1
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1004951
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=1004951 expired. Closing PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants