jpirko / libteam

team netdevice library
GNU Lesser General Public License v2.1
231 stars 59 forks source link

add ifindex base for stacking #42

Closed batmancn closed 5 years ago

batmancn commented 5 years ago

What I did

Add ifindex base for stacking, which is used for 2 ToR switch stacking.

How I did

Add 'ifindex_base' in 'struct lacp_port', and use it in 'lacp_port_actor_init', which is for LACP pkt's port ID key.

How to verify

Add ifindex base by this config:

root@6688ba77aaa1:/sonic/libteam# cat  teamd/lacp_1.conf
{
    "device":       "team0",
    "runner": {
        "name": "lacp",
        "active": true,
        "fast_rate": true,
                "ifindex_base": 64,
        "tx_hash": ["eth", "ipv4", "ipv6"]
    },
    "link_watch":       {"name": "ethtool"},
    "ports":        {"eth1": {}, "eth2": {}}
}

I use tcpdump to capture LACP pkt to verify. If need more test, please tell me to do it.