Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selftests/xsk: three small fixes #4027

Closed
wants to merge 3 commits into from

Conversation

kernel-patches-bot
Copy link

Pull request for series with
subject: selftests/xsk: three small fixes
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=695399

@kernel-patches-bot
Copy link
Author

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

Print the correct payload when the packet dump option is selected. The
network to host conversion was forgotten and the payload was
erronously declared to be an int instead of an unsigned int. Changed
the loop index i too, as it does not need to be an int and was
declared on the same row.

The printout looks something like this after the fix:

DEBUG>> L2: dst mac: 000A569EEE62
DEBUG>> L2: src mac: 000A569EEE61
DEBUG>> L3: ip_hdr->ihl: 05
DEBUG>> L3: ip_hdr->saddr: 192.168.100.161
DEBUG>> L3: ip_hdr->daddr: 192.168.100.162
DEBUG>> L4: udp_hdr->src: 2121
DEBUG>> L4: udp_hdr->dst: 2020
DEBUG>> L5: payload: 4
---------------------------------------

Fixes: facb7cb ("selftests/bpf: Xsk selftests - SKB POLL, NOPOLL")
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Do not close descriptors that have never been used. File descriptor
fields that are not in use are erroneously marked with the number 0,
which is a valid fd. Mark unused fds with -1 instead and do not close
these when deleting the socket.

Fixes: f366006 ("libbpf: move xsk.{c,h} into selftests/bpf")
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Print the correct error codes when exiting the test suite due to some
terminal error. Some of these had a switched sign and some of them
printed zero instead of errno.

Fixes: facb7cb ("selftests/bpf: Xsk selftests - SKB POLL, NOPOLL")
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
@kernel-patches-bot
Copy link
Author

Upstream branch: 47df8a2
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=695399
version: 1

@kernel-patches-bot
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants