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

ISSUE 90: SONiC-VPP LAG feature support #91

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

bendrapubalareddy
Copy link
Contributor

No description provided.

Files Modified:
      platform/saivpp/vpplib/SwitchStateBase.cpp
      platform/saivpp/vpplib/SwitchStateBase.h
      platform/saivpp/vpplib/SwitchStateBaseFdb.cpp
      platform/saivpp/vpplib/vppxlate/SaiVppXlate.c
      platform/saivpp/vpplib/vppxlate/SaiVppXlate.h

Signed-of-by:
      bendrapubalareddy
      [email protected]
Files Added:
      LAG-Dot1q-Bridging-Topo.png
      README.LAG.dot1q.bridging.topo.md

Signed-off-by:
              bendrapubalareddy
              [email protected]
Files Added:
           docs/HLD/vpp-lag.md

Singed-off-by:
             bendrapubalareddy
             [email protected]
Files modified:
      modified:   docs/HLD/vpp-lag.md
      modified:   docs/README.LAG.dot1q.bridging.topo.md
      modified:   platform/saivpp/vpplib/SwitchStateBase.cpp
      modified:   platform/saivpp/vpplib/SwitchStateBaseFdb.cpp

Signed-Off-By: bendrapubalareddy
        email: [email protected]
@patilshashidhar patilshashidhar self-requested a review April 1, 2024 06:09
//Delete the Bond interface
delete_bond_interface(lag_ifname);
remove_lag_to_bond_entry(lag_oid);

Copy link
Contributor

Choose a reason for hiding this comment

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

I think you need to call refresh_interfaces_list() to build new interface id to name mapping once bond interface is deleted.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, done


//if LACP is to be enabled in VPP
//mode = VPP_BOND_API_MODE_LACP;
lb = VPP_BOND_API_LB_ALGO_L2;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the hash algorithm should cover L4 and L4 headers for flow consistency to avoid reordering problem.

Copy link
Contributor Author

@bendrapubalareddy bendrapubalareddy Aug 24, 2024

Choose a reason for hiding this comment

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

Ideally this should be configurable , which SONiC does not support. I tried with different options like round robin etc it did not work.

Copy link
Contributor

Choose a reason for hiding this comment

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

LB ALGO is only relevant to LACP or XOR mode. The other modes are static. For example, there is only one interface up in active/standy so no LB is needed. In round-robin, packets are sent to multiple member links in round robin fashion.
VPP LB ALGO supports L2, L23 and L34. If the LAG is used for L3 forwarding, L34 is most likely the choice. But if the LAG is for L2 switching, L23 is probably the better choice. In modern ASICs (8K and BRCM for example), LB algo is automatically adjusted for different scenarios in a sense by excluding terminated headers in hash calculation.
From what I read of SONiC document, it seems LACP is always enabled. Should we do the same in vpp?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree, L23 seems more reasonable choice, given there is configurable option available.

Yes, LACP mode can be enabled and need to be tested once.

Copy link
Contributor

Choose a reason for hiding this comment

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

There is no one-size-fit-all solution here. If the LAG is for L2 switching, we should use L23. If it is for L3 routing, L34 is better, which is the typical 5 tuples hashing. But we don't know if a LAG is for L2 or L3 at the time it is created. Maybe we can create lag with a default lb algo like l23 and change algo to l34 if the lag has IP configured? To do that, either we have to delete and recreate lag in vpp or we augment vpp to allow changing lb algo after lag is created.

@@ -1011,6 +1092,20 @@ static u32 get_swif_idx (vat_main_t *vam, const char *ifname)
return ((u32) -1);
}

static const char * get_swif_name (vat_main_t *vam, const u32 swif_idx)
{
hash_pair_t *p;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think a VPP_LOCK() is required while iterating over the list ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

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