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

macvlan: add IFLA_MACVLAN_BC_ options #32

Merged
merged 2 commits into from
Jul 10, 2023
Merged

Conversation

Luap99
Copy link
Contributor

@Luap99 Luap99 commented May 24, 2023

Add new IFLA_MACVLAN_BC_QUEUE_LEN, IFLA_MACVLAN_BC_QUEUE_LEN_USED and IFLA_MACVLAN_BC_CUTOFF kernel options for macvlan and macvtap.

https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=d4bff72c8401 https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=954d1fa1ac93

Luap99 added a commit to Luap99/netavark that referenced this pull request May 24, 2023
Expose the netlink IFLA_MACVLAN_BC_CUTOFF option as bclim like the ip
command does. We still need c/common and podman patches to allow this
option for podman network create.

Also I created a PR[1] upstream in the netlink lib to allow setting
these options directly instead of using the DefaultNla work around as I
do here.

[1] rust-netlink/netlink-packet-route#32

This is needed for https://bugzilla.redhat.com/show_bug.cgi?id=2183896

Signed-off-by: Paul Holzinger <[email protected]>
Luap99 added a commit to Luap99/netavark that referenced this pull request May 24, 2023
Expose the netlink IFLA_MACVLAN_BC_CUTOFF option as bclim like the ip
command does. We still need c/common and podman patches to allow this
option for podman network create.

Also I created a PR[1] upstream in the netlink lib to allow setting
these options directly instead of using the DefaultNla work around as I
do here.

[1] rust-netlink/netlink-packet-route#32

This is needed for https://bugzilla.redhat.com/show_bug.cgi?id=2183896

Signed-off-by: Paul Holzinger <[email protected]>
Luap99 added a commit to Luap99/netavark that referenced this pull request May 24, 2023
Expose the netlink IFLA_MACVLAN_BC_CUTOFF option as bclim like the ip
command does. We still need c/common and podman patches to allow this
option for podman network create.

Also I created a PR[1] upstream in the netlink lib to allow setting
these options directly instead of using the DefaultNla work around as I
do here.

TODO: add test but for now this option is not in a released version of
iproute so there is no way to check for it right now.

[1] rust-netlink/netlink-packet-route#32

This is needed for https://bugzilla.redhat.com/show_bug.cgi?id=2183896

Signed-off-by: Paul Holzinger <[email protected]>
Luap99 added a commit to Luap99/netavark that referenced this pull request May 24, 2023
Expose the netlink IFLA_MACVLAN_BC_CUTOFF option as bclim like the ip
command does. We still need c/common and podman patches to allow this
option for podman network create.

Also I created a PR[1] upstream in the netlink lib to allow setting
these options directly instead of using the DefaultNla work around as I
do here.

TODO: Add a test but for now this option is not in a released version of
iproute so there is no way to check for it right now.

[1] rust-netlink/netlink-packet-route#32

This is needed for https://bugzilla.redhat.com/show_bug.cgi?id=2183896

Signed-off-by: Paul Holzinger <[email protected]>
Luap99 added a commit to Luap99/netavark that referenced this pull request May 24, 2023
Expose the netlink IFLA_MACVLAN_BC_CUTOFF option as bclim like the ip
command does. We still need c/common and podman patches to allow this
option for podman network create.

Also I created a PR[1] upstream in the netlink lib to allow setting
these options directly instead of using the DefaultNla work around as I
do here.

TODO: Add a test but for now this option is not in a released version of
iproute so there is no way to check for it right now.

[1] rust-netlink/netlink-packet-route#32

This is needed for https://bugzilla.redhat.com/show_bug.cgi?id=2183896

Signed-off-by: Paul Holzinger <[email protected]>
Luap99 added a commit to Luap99/netavark that referenced this pull request May 24, 2023
Expose the netlink IFLA_MACVLAN_BC_CUTOFF option as bclim like the ip
command does. We still need c/common and podman patches to allow this
option for podman network create.

Also I created a PR[1] upstream in the netlink lib to allow setting
these options directly instead of using the DefaultNla work around as I
do here.

TODO: Add a test but for now this option is not in a released version of
iproute so there is no way to check for it right now.

[1] rust-netlink/netlink-packet-route#32

This is needed for https://bugzilla.redhat.com/show_bug.cgi?id=2183896

Signed-off-by: Paul Holzinger <[email protected]>
Luap99 added a commit to Luap99/netavark that referenced this pull request May 24, 2023
Expose the netlink IFLA_MACVLAN_BC_CUTOFF option as bclim like the ip
command does. We still need c/common and podman patches to allow this
option for podman network create.

Also I created a PR[1] upstream in the netlink lib to allow setting
these options directly instead of using the DefaultNla work around as I
do here.

TODO: Add a test but for now this option is not in a released version of
iproute so there is no way to check for it right now.

[1] rust-netlink/netlink-packet-route#32

This is needed for https://bugzilla.redhat.com/show_bug.cgi?id=2183896

Signed-off-by: Paul Holzinger <[email protected]>
@codecov
Copy link

codecov bot commented May 25, 2023

Codecov Report

Merging #32 (82ba4bf) into main (0735a19) will increase coverage by 0.07%.
The diff coverage is 0.00%.

❗ Current head 82ba4bf differs from pull request most recent head fe96e66. Consider uploading reports for the commit fe96e66 to get more accurate results

@@            Coverage Diff             @@
##             main      #32      +/-   ##
==========================================
+ Coverage   45.14%   45.22%   +0.07%     
==========================================
  Files          75       74       -1     
  Lines        6215     6050     -165     
==========================================
- Hits         2806     2736      -70     
+ Misses       3409     3314      -95     
Impacted Files Coverage Δ
src/rtnl/link/nlas/link_infos.rs 42.85% <0.00%> (-2.60%) ⬇️

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Luap99 added a commit to Luap99/netavark that referenced this pull request May 25, 2023
Expose the netlink IFLA_MACVLAN_BC_CUTOFF option as bclim like the ip
command does. We still need c/common and podman patches to allow this
option for podman network create.

Also I created a PR[1] upstream in the netlink lib to allow setting
these options directly instead of using the DefaultNla work around as I
do here.

TODO: Add a test but for now this option is not in a released version of
iproute so there is no way to check for it right now.

[1] rust-netlink/netlink-packet-route#32

This is needed for https://bugzilla.redhat.com/show_bug.cgi?id=2183896

Signed-off-by: Paul Holzinger <[email protected]>
Luap99 added a commit to Luap99/netavark that referenced this pull request May 25, 2023
Expose the netlink IFLA_MACVLAN_BC_CUTOFF option as bclim like the ip
command does. We still need c/common and podman patches to allow this
option for podman network create.

Also I created a PR[1] upstream in the netlink lib to allow setting
these options directly instead of using the DefaultNla work around as I
do here.

TODO: Add a test but for now this option is not in a released version of
iproute so there is no way to check for it right now.

[1] rust-netlink/netlink-packet-route#32

This is needed for https://bugzilla.redhat.com/show_bug.cgi?id=2183896

Signed-off-by: Paul Holzinger <[email protected]>
Copy link
Member

@cathay4t cathay4t left a comment

Choose a reason for hiding this comment

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

The code looks good to me. Only lack unit test case with strace or nlmon capture data.
Please check test_br_multicast_querier_state_parse and test_br_multicast_querier_state_emit for example.

Add new IFLA_MACVLAN_BC_QUEUE_LEN, IFLA_MACVLAN_BC_QUEUE_LEN_USED and
IFLA_MACVLAN_BC_CUTOFF kernel options for macvlan and macvtap.

https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=d4bff72c8401
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=954d1fa1ac93

Signed-off-by: Paul Holzinger <[email protected]>
@Luap99
Copy link
Contributor Author

Luap99 commented Jun 27, 2023

Test added

@cathay4t cathay4t enabled auto-merge (rebase) July 10, 2023 03:18
@cathay4t cathay4t merged commit 640be35 into rust-netlink:main Jul 10, 2023
@Luap99 Luap99 deleted the macvlan-bc branch July 10, 2023 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants