Skip to content

vpp: support portchannel sub interface and punt packets in portchannel via member - #2013

Closed
yue-fred-gao wants to merge 1 commit into
sonic-net:masterfrom
yue-fred-gao:po_punt_via_member_new
Closed

vpp: support portchannel sub interface and punt packets in portchannel via member#2013
yue-fred-gao wants to merge 1 commit into
sonic-net:masterfrom
yue-fred-gao:po_punt_via_member_new

Conversation

@yue-fred-gao

Copy link
Copy Markdown
Contributor

Description of PR

Summary:
support portchannel sub interface and punt packets in portchannel via member interface

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Documentation update
  • Test improvement

Approach

Use the new punt infra introduced for VLAN/BVI. See HLD sonic-net/SONiC#2440
Related change in vpp: sonic-net/sonic-platform-vpp#257

What is the motivation for this PR?

Punt packets to port channel or port channel sub interface via member interface. This is consistent with hardware platforms and meets SONiC expectations.

Work item tracking
  • Microsoft ADO (number only):

How did you do it?

  1. Enable punt via member for portchannel interface and subinterface with vpp PR Update sonic-ext plugin to support portchannel punt  sonic-platform-vpp#257
  2. Create subinterface for port channel

How did you verify/test it?

Verified ARP and unicast packets over port channel and port channel subinterface

Any platform specific information?

vpp

Documentation

Signed-off-by: Yue Gao <yuega2@cisco.com>
@yue-fred-gao
yue-fred-gao requested a review from lunyue-ms July 31, 2026 20:08
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@yue-fred-gao
yue-fred-gao requested review from AkeelAli and dypet July 31, 2026 20:08
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@lunyue-ms

Copy link
Copy Markdown
Contributor

Hi fred,

The change looks good and matches the design in the HLD. I picked it up and ran the
full sub_port_interfaces suite on our KVM testbed, and a few tests failed.

For reference, I ran both stacks on the same testbed (vms-kvm-vpp-t1-lag) with the
same sonic-mgmt revision and the same VPP build — the only things swapped were the
syncd image and the sonic_ext plugin:

stack result
this PR + sonic-platform-vpp master (incl. sonic-net/sonic-platform-vpp#257) 24 failed / 5 passed / 3 skipped
#1907 + sonic-net/sonic-platform-vpp#267 0 failed / 27 passed / 5 skipped

Failed tests (24)
TestSubPorts::test_packet_routed_with_valid_vlan[port]
TestSubPorts::test_packet_routed_with_valid_vlan[port_in_lag]
TestSubPorts::test_routing_between_sub_ports[port-same-TCP-UDP-ICMP]
TestSubPorts::test_routing_between_sub_ports[port-different-TCP-UDP-ICMP]
TestSubPorts::test_routing_between_sub_ports[port_in_lag-same-TCP-UDP-ICMP]
TestSubPorts::test_routing_between_sub_ports[port_in_lag-different-TCP-UDP-ICMP]
TestSubPorts::test_routing_between_sub_ports_and_port[port-l3-TCP-UDP-ICMP]
TestSubPorts::test_routing_between_sub_ports_and_port[port-svi-TCP-UDP-ICMP]
TestSubPorts::test_routing_between_sub_ports_and_port[port_in_lag-l3-TCP-UDP-ICMP]
TestSubPorts::test_routing_between_sub_ports_and_port[port_in_lag-svi-TCP-UDP-ICMP]
TestSubPorts::test_routing_between_sub_ports_unaffected_by_sub_ports_removal[port-same-TCP-UDP-ICMP]
TestSubPorts::test_routing_between_sub_ports_unaffected_by_sub_ports_removal[port-different-TCP-UDP-ICMP]
TestSubPorts::test_tunneling_between_sub_ports[port-same]
TestSubPorts::test_tunneling_between_sub_ports[port-different]
TestSubPorts::test_tunneling_between_sub_ports[port_in_lag-same]
TestSubPorts::test_tunneling_between_sub_ports[port_in_lag-different]
TestSubPorts::test_balancing_sub_ports[port]
TestSubPorts::test_balancing_sub_ports[port_in_lag]
TestSubPorts::test_admin_status_down_disables_forwarding[port]
TestSubPorts::test_admin_status_down_disables_forwarding[port_in_lag]
TestSubPorts::test_vlan_config_impact[port]
TestSubPorts::test_vlan_config_impact[port_in_lag]
TestSubPortStress::test_max_numbers_of_sub_ports[port]
TestSubPortStress::test_max_numbers_of_sub_ports[port_in_lag]

Passed (5) — none of them require actual forwarding
TestSubPorts::test_mtu_inherited_from_parent_port[port] # config check only
TestSubPorts::test_mtu_inherited_from_parent_port[port_in_lag] # config check only
TestSubPorts::test_untagged_packet_not_routed[port] # expects NO forwarding
TestSubPortsNegative::test_packet_routed_with_invalid_vlan[port] # expects drop
TestSubPortsNegative::test_packet_routed_with_invalid_vlan[port_in_lag] # expects drop

Do you think this PR alone is enough for the sub_port_interfaces tests? I'm not
sure whether I missed a required update or some configuration on my side. Thanks.

@yue-fred-gao

yue-fred-gao commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Hi fred,

The change looks good and matches the design in the HLD. I picked it up and ran the full sub_port_interfaces suite on our KVM testbed, and a few tests failed.

For reference, I ran both stacks on the same testbed (vms-kvm-vpp-t1-lag) with the same sonic-mgmt revision and the same VPP build — the only things swapped were the syncd image and the sonic_ext plugin:

stack result
this PR + sonic-platform-vpp master (incl. sonic-net/sonic-platform-vpp#257) 24 failed / 5 passed / 3 skipped
#1907 + sonic-net/sonic-platform-vpp#267 0 failed / 27 passed / 5 skipped
Failed tests (24) TestSubPorts::test_packet_routed_with_valid_vlan[port] TestSubPorts::test_packet_routed_with_valid_vlan[port_in_lag] TestSubPorts::test_routing_between_sub_ports[port-same-TCP-UDP-ICMP] TestSubPorts::test_routing_between_sub_ports[port-different-TCP-UDP-ICMP] TestSubPorts::test_routing_between_sub_ports[port_in_lag-same-TCP-UDP-ICMP] TestSubPorts::test_routing_between_sub_ports[port_in_lag-different-TCP-UDP-ICMP] TestSubPorts::test_routing_between_sub_ports_and_port[port-l3-TCP-UDP-ICMP] TestSubPorts::test_routing_between_sub_ports_and_port[port-svi-TCP-UDP-ICMP] TestSubPorts::test_routing_between_sub_ports_and_port[port_in_lag-l3-TCP-UDP-ICMP] TestSubPorts::test_routing_between_sub_ports_and_port[port_in_lag-svi-TCP-UDP-ICMP] TestSubPorts::test_routing_between_sub_ports_unaffected_by_sub_ports_removal[port-same-TCP-UDP-ICMP] TestSubPorts::test_routing_between_sub_ports_unaffected_by_sub_ports_removal[port-different-TCP-UDP-ICMP] TestSubPorts::test_tunneling_between_sub_ports[port-same] TestSubPorts::test_tunneling_between_sub_ports[port-different] TestSubPorts::test_tunneling_between_sub_ports[port_in_lag-same] TestSubPorts::test_tunneling_between_sub_ports[port_in_lag-different] TestSubPorts::test_balancing_sub_ports[port] TestSubPorts::test_balancing_sub_ports[port_in_lag] TestSubPorts::test_admin_status_down_disables_forwarding[port] TestSubPorts::test_admin_status_down_disables_forwarding[port_in_lag] TestSubPorts::test_vlan_config_impact[port] TestSubPorts::test_vlan_config_impact[port_in_lag] TestSubPortStress::test_max_numbers_of_sub_ports[port] TestSubPortStress::test_max_numbers_of_sub_ports[port_in_lag]

Passed (5) — none of them require actual forwarding TestSubPorts::test_mtu_inherited_from_parent_port[port] # config check only TestSubPorts::test_mtu_inherited_from_parent_port[port_in_lag] # config check only TestSubPorts::test_untagged_packet_not_routed[port] # expects NO forwarding TestSubPortsNegative::test_packet_routed_with_invalid_vlan[port] # expects drop TestSubPortsNegative::test_packet_routed_with_invalid_vlan[port_in_lag] # expects drop

Do you think this PR alone is enough for the sub_port_interfaces tests? I'm not sure whether I missed a required update or some configuration on my side. Thanks.

Hi @lunyue-ms , thanks for running the test. Let me run the test and get back to you.

@yue-fred-gao

Copy link
Copy Markdown
Contributor Author

Hi fred,
The change looks good and matches the design in the HLD. I picked it up and ran the full sub_port_interfaces suite on our KVM testbed, and a few tests failed.
For reference, I ran both stacks on the same testbed (vms-kvm-vpp-t1-lag) with the same sonic-mgmt revision and the same VPP build — the only things swapped were the syncd image and the sonic_ext plugin:
stack result
this PR + sonic-platform-vpp master (incl. sonic-net/sonic-platform-vpp#257) 24 failed / 5 passed / 3 skipped
#1907 + sonic-net/sonic-platform-vpp#267 0 failed / 27 passed / 5 skipped
Failed tests (24) TestSubPorts::test_packet_routed_with_valid_vlan[port] TestSubPorts::test_packet_routed_with_valid_vlan[port_in_lag] TestSubPorts::test_routing_between_sub_ports[port-same-TCP-UDP-ICMP] TestSubPorts::test_routing_between_sub_ports[port-different-TCP-UDP-ICMP] TestSubPorts::test_routing_between_sub_ports[port_in_lag-same-TCP-UDP-ICMP] TestSubPorts::test_routing_between_sub_ports[port_in_lag-different-TCP-UDP-ICMP] TestSubPorts::test_routing_between_sub_ports_and_port[port-l3-TCP-UDP-ICMP] TestSubPorts::test_routing_between_sub_ports_and_port[port-svi-TCP-UDP-ICMP] TestSubPorts::test_routing_between_sub_ports_and_port[port_in_lag-l3-TCP-UDP-ICMP] TestSubPorts::test_routing_between_sub_ports_and_port[port_in_lag-svi-TCP-UDP-ICMP] TestSubPorts::test_routing_between_sub_ports_unaffected_by_sub_ports_removal[port-same-TCP-UDP-ICMP] TestSubPorts::test_routing_between_sub_ports_unaffected_by_sub_ports_removal[port-different-TCP-UDP-ICMP] TestSubPorts::test_tunneling_between_sub_ports[port-same] TestSubPorts::test_tunneling_between_sub_ports[port-different] TestSubPorts::test_tunneling_between_sub_ports[port_in_lag-same] TestSubPorts::test_tunneling_between_sub_ports[port_in_lag-different] TestSubPorts::test_balancing_sub_ports[port] TestSubPorts::test_balancing_sub_ports[port_in_lag] TestSubPorts::test_admin_status_down_disables_forwarding[port] TestSubPorts::test_admin_status_down_disables_forwarding[port_in_lag] TestSubPorts::test_vlan_config_impact[port] TestSubPorts::test_vlan_config_impact[port_in_lag] TestSubPortStress::test_max_numbers_of_sub_ports[port] TestSubPortStress::test_max_numbers_of_sub_ports[port_in_lag]
Passed (5) — none of them require actual forwarding TestSubPorts::test_mtu_inherited_from_parent_port[port] # config check only TestSubPorts::test_mtu_inherited_from_parent_port[port_in_lag] # config check only TestSubPorts::test_untagged_packet_not_routed[port] # expects NO forwarding TestSubPortsNegative::test_packet_routed_with_invalid_vlan[port] # expects drop TestSubPortsNegative::test_packet_routed_with_invalid_vlan[port_in_lag] # expects drop
Do you think this PR alone is enough for the sub_port_interfaces tests? I'm not sure whether I missed a required update or some configuration on my side. Thanks.

Hi @lunyue-ms , thanks for running the test. Let me run the test and get back to you.

Hi @lunyue-ms, I ran the tests and saw some issues that you already fixed in your PRs (subinterface netdev admin state, member interface lost promisc and sometimes tap interface lost sonic-ext-host-xc node when subinterface is recreated). I think it makes sense for you to commit your PRs and I will close this one.

@lunyue-ms

Copy link
Copy Markdown
Contributor

Hi fred,
The change looks good and matches the design in the HLD. I picked it up and ran the full sub_port_interfaces suite on our KVM testbed, and a few tests failed.
For reference, I ran both stacks on the same testbed (vms-kvm-vpp-t1-lag) with the same sonic-mgmt revision and the same VPP build — the only things swapped were the syncd image and the sonic_ext plugin:
stack result
this PR + sonic-platform-vpp master (incl. sonic-net/sonic-platform-vpp#257) 24 failed / 5 passed / 3 skipped
#1907 + sonic-net/sonic-platform-vpp#267 0 failed / 27 passed / 5 skipped
Failed tests (24) TestSubPorts::test_packet_routed_with_valid_vlan[port] TestSubPorts::test_packet_routed_with_valid_vlan[port_in_lag] TestSubPorts::test_routing_between_sub_ports[port-same-TCP-UDP-ICMP] TestSubPorts::test_routing_between_sub_ports[port-different-TCP-UDP-ICMP] TestSubPorts::test_routing_between_sub_ports[port_in_lag-same-TCP-UDP-ICMP] TestSubPorts::test_routing_between_sub_ports[port_in_lag-different-TCP-UDP-ICMP] TestSubPorts::test_routing_between_sub_ports_and_port[port-l3-TCP-UDP-ICMP] TestSubPorts::test_routing_between_sub_ports_and_port[port-svi-TCP-UDP-ICMP] TestSubPorts::test_routing_between_sub_ports_and_port[port_in_lag-l3-TCP-UDP-ICMP] TestSubPorts::test_routing_between_sub_ports_and_port[port_in_lag-svi-TCP-UDP-ICMP] TestSubPorts::test_routing_between_sub_ports_unaffected_by_sub_ports_removal[port-same-TCP-UDP-ICMP] TestSubPorts::test_routing_between_sub_ports_unaffected_by_sub_ports_removal[port-different-TCP-UDP-ICMP] TestSubPorts::test_tunneling_between_sub_ports[port-same] TestSubPorts::test_tunneling_between_sub_ports[port-different] TestSubPorts::test_tunneling_between_sub_ports[port_in_lag-same] TestSubPorts::test_tunneling_between_sub_ports[port_in_lag-different] TestSubPorts::test_balancing_sub_ports[port] TestSubPorts::test_balancing_sub_ports[port_in_lag] TestSubPorts::test_admin_status_down_disables_forwarding[port] TestSubPorts::test_admin_status_down_disables_forwarding[port_in_lag] TestSubPorts::test_vlan_config_impact[port] TestSubPorts::test_vlan_config_impact[port_in_lag] TestSubPortStress::test_max_numbers_of_sub_ports[port] TestSubPortStress::test_max_numbers_of_sub_ports[port_in_lag]
Passed (5) — none of them require actual forwarding TestSubPorts::test_mtu_inherited_from_parent_port[port] # config check only TestSubPorts::test_mtu_inherited_from_parent_port[port_in_lag] # config check only TestSubPorts::test_untagged_packet_not_routed[port] # expects NO forwarding TestSubPortsNegative::test_packet_routed_with_invalid_vlan[port] # expects drop TestSubPortsNegative::test_packet_routed_with_invalid_vlan[port_in_lag] # expects drop
Do you think this PR alone is enough for the sub_port_interfaces tests? I'm not sure whether I missed a required update or some configuration on my side. Thanks.

Hi @lunyue-ms , thanks for running the test. Let me run the test and get back to you.

Hi @lunyue-ms, I ran the tests and saw some issues that you already fixed in your PRs (subinterface netdev admin state, member interface lost promisc and sometimes tap interface lost sonic-ext-host-xc node when subinterface is recreated). I think it makes sense for you to commit your PRs and I will close this one.

Thanks @yue-fred-gao , I will rebase my PRs and then let you know for the review.

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.

4 participants