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

test: bpf: Fix check for xdp support in ip #10198

Merged
merged 1 commit into from
Feb 14, 2020

Conversation

pchaigno
Copy link
Member

@pchaigno pchaigno commented Feb 14, 2020

ip's help output wasn't updated when support for xdpgeneric was added, so grep xdpgeneric on ip help doesn't return anything and XDP programs are never loaded. In addition, because we set pipefail and ip link set help returns a non-0 error code, the piped command always returns a non-0
error code anyway.

This PR fixes both issues by using the output of the set dev xdpgeneric off command directly to determine if ip supports xdpgeneric.


This change is Reviewable

ip's help output wasn't updated when support for xdpgeneric was added,
so grep xdpgeneric on ip help doesn't return anything and XDP programs
are never loaded. In addition, because we set pipefail and ip link set
help returns a non-0 error code, the piped command always returns a non-0
error code anyway.

This patch fixes both issues by using the output of the 'set dev
xdpgeneric off' command directly to determine if ip supports xdpgeneric.

Signed-off-by: Paul Chaignon <[email protected]>
@pchaigno pchaigno added pending-review area/CI Continuous Integration testing issue or flake release-note/misc This PR makes changes that have no direct user impact. labels Feb 14, 2020
@pchaigno pchaigno requested a review from a team as a code owner February 14, 2020 16:05
@pchaigno pchaigno added area/misc Impacts miscellaneous areas of the code not otherwise owned by another area. and removed area/CI Continuous Integration testing issue or flake labels Feb 14, 2020
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.002%) to 44.502% when pulling 0394db6 on pr/pchaigno/fix-xdp-verifier-test into 1810709 on master.

@pchaigno
Copy link
Member Author

test-me-please

Copy link
Member

@joestringer joestringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@borkmann borkmann merged commit 0beba2a into master Feb 14, 2020
@borkmann borkmann deleted the pr/pchaigno/fix-xdp-verifier-test branch February 14, 2020 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/misc Impacts miscellaneous areas of the code not otherwise owned by another area. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants