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

Mac for kernel static neigh programmed for voq neighs in VOQ chassis with port type inband interface in VS platforms #1724

Merged
merged 1 commit into from Jul 2, 2021

Conversation

vganesan-nokia
Copy link
Contributor

What I did

This patch is to make VOQ chassis with port type inband interface work
in VS platform based setups such as setups with KVMs

Currently with port type inband interface, kernel static neighbors for voq
neighbors are programmed with mac = local asic's mac. Because of this,
packets generated by host destined to voq neighbors will have both src and
dst mac same. This is fine for forwarding by hardware where recycle port is
used for inband interface. However, for VS platforms, since src mac = dst
mac, host's ip stack drops the packet. To fix this problem, for VS
platforms, if the inband interface is port type, staic neibhbors for voq
neighbors are programmed with mac = neighbors's owner asic's mac. With
this change, since src mac and dst mac are different and since we also
program neighbors for all the remote asics, the packet will be sent out
correctly.

NOTE:
Since in local asic, the remote neigh's owner asic mac is not available
it is derived from the switch id and lower 5 bytes of local asic mac.
Therefore, to have VOQ chassis with port type inband interface work in VS
platforms, it is required that asic macs are programmed in the following
format:
<higher 5 bytes same for all asics>:<6th byte = switch id of the asic>

Why I did it

To fix problem related to packet forwarding by linux ip stack for the packets generated by host destined to remote voq neighbors via port type inband interfaces in VOQ chassis systems in KVM based testbed using VS platforms. i.e., this patch is to fix the issue sonic-net/sonic-buildimage#7434

How I verified it

Executed the T2 topology test scripts made for testing VOQ chassis in KVM based test setups and verified that iBGP connections among inband interfaces of all the asics are established successfully.

Signed-off-by: vedganes <vedavinayagam.ganesan@nokia.com>

This patch is to make VOQ chassis with port type inband interface work
in VS platform based setups such as setups with KVMs

Currently with port type inband interface, kernel static neighbors for voq
neighbors are programmed with mac = local asic's mac. Because of this,
packets generated by host destined to voq neighbors will have both src and
dst mac same. This is fine for forwarding by hardwareiwhere recycle port is
used for inband interface. However, for VS platforms, since src mac = dst
mac, host's ip stack drops the packet. To fix this problem, for VS
platforms, if the inband interface is port type, staic neibhbors for voq
neighbors are programmed with mac = neighbors's owner asic's mac. With
this change, since src mac and dst mac are different and since we also
programm neighbor for all the remote asics, the packet will be sent out
correctly.

NOTE:
    Since in local asic, the remote neigh's owner asic mac is not available
it is derived from the switch id and lower 5 bytes of local asic mac.
Therefore, to have VOQ chassis with port type inband interface work in VS
platforms, it is required that asic macs are programmed in the following
format:
<higher 5 bytes same for all asics>:<6th byte = switch id of the asic>
@anshuv-mfst
Copy link

@abdosi - could you please take a look, thanks.

@anshuv-mfst
Copy link

@abdosi - could you please review

@anshuv-mfst anshuv-mfst requested a review from abdosi June 2, 2021 16:45
@anshuv-mfst
Copy link

Hi @ysmanman- could you please review and approve, thanks.

1 similar comment
@anshuv-mfst
Copy link

Hi @ysmanman- could you please review and approve, thanks.

@abdosi
Copy link
Contributor

abdosi commented Jun 15, 2021

if the issue is w.r.t to VS can this change be done in SAI VS Layer ?

@vganesan-nokia
Copy link
Contributor Author

if the issue is w.r.t to VS can this change be done in SAI VS Layer ?

We need to program the owner asic's MAC (for the remote neighbor) in the kernel records not in the SAI/hardware. Also the SAI/hardware record requires the neighbor's own MAC for all platfroms. There is no change in the record sent to SAI.

@abdosi
Copy link
Contributor

abdosi commented Jun 15, 2021

if the issue is w.r.t to VS can this change be done in SAI VS Layer ?

We need to program the owner asic's MAC (for the remote neighbor) in the kernel records not in the SAI/hardware. Also the SAI/hardware record requires the neighbor's own MAC for all platfroms. There is no change in the record sent to SAI.

If it is kernel record only why it is VS specific then ?

@vganesan-nokia
Copy link
Contributor Author

if the issue is w.r.t to VS can this change be done in SAI VS Layer ?

We need to program the owner asic's MAC (for the remote neighbor) in the kernel records not in the SAI/hardware. Also the SAI/hardware record requires the neighbor's own MAC for all platfroms. There is no change in the record sent to SAI.

If it is kernel record only why it is VS specific then ?

For VS platforms for CPU originated packets destined to remote neighbors, the dst mac resolution happens in software. If we do not have this fix, i.e, if we program the kenel neighbors with local asic's mac, the src and dst mac will be same and packet will not be sent out.

@abdosi abdosi merged commit d3aa660 into sonic-net:master Jul 2, 2021
qiluo-msft pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Jul 5, 2021
[flex-counters] Delay flex counters stats init for faster boot time (sonic-net/sonic-swss#1803)
[mirror] Detach session dst ip from route orch LPM calculation regardless of session status at session CONFIG DB removal (sonic-net/sonic-swss#1800)
[Dynamic Buffer Calc] Support dynamic buffer calculation on top of port auto negotiation (sonic-net/sonic-swss#1762)
[neighorch] VOQ encap index change handling (sonic-net/sonic-swss#1729)
[neighorch] Mac for voq neighbors in VS platforms (sonic-net/sonic-swss#1724)
[acl mirror action] Mirror session ref count fix at acl rule attachment (sonic-net/sonic-swss#1761)
judyjoseph pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Aug 7, 2021
[flex-counters] Delay flex counters stats init for faster boot time (sonic-net/sonic-swss#1803)
[mirror] Detach session dst ip from route orch LPM calculation regardless of session status at session CONFIG DB removal (sonic-net/sonic-swss#1800)
[Dynamic Buffer Calc] Support dynamic buffer calculation on top of port auto negotiation (sonic-net/sonic-swss#1762)
[neighorch] VOQ encap index change handling (sonic-net/sonic-swss#1729)
[neighorch] Mac for voq neighbors in VS platforms (sonic-net/sonic-swss#1724)
[acl mirror action] Mirror session ref count fix at acl rule attachment (sonic-net/sonic-swss#1761)
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
[flex-counters] Delay flex counters stats init for faster boot time (sonic-net/sonic-swss#1803)
[mirror] Detach session dst ip from route orch LPM calculation regardless of session status at session CONFIG DB removal (sonic-net/sonic-swss#1800)
[Dynamic Buffer Calc] Support dynamic buffer calculation on top of port auto negotiation (sonic-net/sonic-swss#1762)
[neighorch] VOQ encap index change handling (sonic-net/sonic-swss#1729)
[neighorch] Mac for voq neighbors in VS platforms (sonic-net/sonic-swss#1724)
[acl mirror action] Mirror session ref count fix at acl rule attachment (sonic-net/sonic-swss#1761)
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-swss that referenced this pull request Oct 5, 2021
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants