Skip to content

Support src_mac, dst_mac and vlan id in flower filters#809

Closed
shuowang-123 wants to merge 2 commits intovishvananda:mainfrom
shuowang-123:shuowang/support_src_dst_mac
Closed

Support src_mac, dst_mac and vlan id in flower filters#809
shuowang-123 wants to merge 2 commits intovishvananda:mainfrom
shuowang-123:shuowang/support_src_dst_mac

Conversation

@shuowang-123
Copy link
Copy Markdown

@shuowang-123 shuowang-123 commented Sep 3, 2022

See title, so users are able to filter flower rules based on src/dst mac address. I ran the test on an Oracle Linux 8 virtual machine and it passed:

[] go test -run "TestFilterFlowerAddDel"
PASS
ok github.com/vishvananda/netlink 0.017s

I also ran the test (without cleanup) on the same machine, was able to see the flower rule was created correctly, as reported by "tc":

[] ip netns exec netns1 tc filter show dev foo ingress
filter parent ffff: protocol all pref 1 flower chain 0
filter parent ffff: protocol all pref 1 flower chain 0 handle 0x1
dst_mac 2c:54:91:88:c9:e5
src_mac 2c:54:91:88:c9:e3
eth_type ipv4
dst_ip 1.0.0.1/24
src_ip 2.0.0.1/24
enc_dst_ip 3.0.0.1/24
enc_src_ip 4.0.0.1/24
enc_key_id 1234
enc_dst_port 8472
not_in_hw
action order 1: mirred (Egress Redirect to device bar) stolen
index 1 ref 1 bind 1

@shuowang-123
Copy link
Copy Markdown
Author

This should address second request from #589

@shuowang-123 shuowang-123 changed the title Support src_mac and dst_mac in flower filters Support src_mac, dst_mac and vlan id in flower filters Sep 8, 2022
@aboch
Copy link
Copy Markdown
Collaborator

aboch commented Aug 23, 2024

@shuowang-123

@vishvananda
Copy link
Copy Markdown
Owner

Closing due to inactivity. Feel free to reopen.

@vishvananda vishvananda closed this Sep 2, 2025
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.

3 participants