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

Update libteam patch to handle the backplane interfaces. #7468

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

judyjoseph
Copy link
Contributor

@judyjoseph judyjoseph commented Apr 28, 2021

Why I did it

In the multi-asic platforms with backplane interfaces, the following error was seen in teamd.log and was resulting in portId calculated as 0. This port-id was used to set the actor portid in lacp pdu. The error message was

"ERR teamd1#teamd_PortChannel4041[39]: Ethernet-BP64: Can't convert from port name to port id. Port id is equal to 0, but this is not expected"

The backplane interfaces have prefix "Ethernet-BP".

How I did it

Added support for port name prefix "Ethernet-BP".

How to verify it

No errors seen on config reload and reboot of the device. The "port' in "actor_lacpdu_info" is filled in correctly.

admin@str2--acs-1:~$ teamdctl -n 0 PortChannel4040 state dump
{
    "ports": {
        "Ethernet-BP0": {
            "ifinfo": {
                "dev_addr": "70:79:b3:07:60:50",
                "dev_addr_len": 6,
                "ifindex": 34,
                "ifname": "Ethernet-BP0"
            },
            "link": {
                "duplex": "half",
                "speed": 0,
                "up": true
            },
            "link_watches": {
                "list": {
                    "link_watch_0": {
                        "delay_down": 0,
                        "delay_up": 0,
                        "down_count": 0,
                        "name": "ethtool",
                        "up": true
                    }
                },
                "up": true
            },
            "runner": {
                "actor_lacpdu_info": {
                    "key": 0,
                    "port": 1,
                    "port_priority": 255,
                    "state": 61,
                    "system": "70:79:b3:07:60:50",
                    "system_priority": 65535
                },
                "aggregator": {
                    "id": 34,
                    "selected": true
                },
                "key": 0,
                "partner_lacpdu_info": {
                    "key": 0,
                    "port": 257,
                    "port_priority": 255,
                    "state": 61,
                    "system": "02:42:f0:7f:01:02",
                    "system_priority": 65535
                },
                "prio": 255,
                "selected": true,
                "state": "current"
            }
        },
        "Ethernet-BP12": {
            "ifinfo": {
                "dev_addr": "70:79:b3:07:60:50",
                "dev_addr_len": 6,
                "ifindex": 37,
                "ifname": "Ethernet-BP12"
            },
            "link": {
                "duplex": "half",
                "speed": 0,
                "up": true
            },
            "link_watches": {
                "list": {
                    "link_watch_0": {
                        "delay_down": 0,
                        "delay_up": 0,
                        "down_count": 0,
                        "name": "ethtool",
                        "up": true
                    }
                },
                "up": true
            },
            "runner": {
                "actor_lacpdu_info": {
                    "key": 0,
                    "port": 13,
                    "port_priority": 255,
                    "state": 61,
                    "system": "70:79:b3:07:60:50",
                    "system_priority": 65535
                },
                "aggregator": {
                    "id": 34,
                    "selected": true
                },
                "key": 0,
                "partner_lacpdu_info": {
                    "key": 0,
                    "port": 269,
                    "port_priority": 255,
                    "state": 61,
                    "system": "02:42:f0:7f:01:02",
                    "system_priority": 65535
                },
                "prio": 255,
                "selected": true,
                "state": "current"
            }
        },
        "Ethernet-BP16": {
            "ifinfo": {
                "dev_addr": "70:79:b3:07:60:50",
                "dev_addr_len": 6,
                "ifindex": 38,
                "ifname": "Ethernet-BP16"
            },
            "link": {
                "duplex": "half",
                "speed": 0,
                "up": true
            },
            "link_watches": {
                "list": {
                    "link_watch_0": {
                        "delay_down": 0,
                        "delay_up": 0,
                        "down_count": 0,
                        "name": "ethtool",
                        "up": true
                    }
                },
                "up": true
            },
            "runner": {
                "actor_lacpdu_info": {
                    "key": 0,
                    "port": 17,
                    "port_priority": 255,
                    "state": 61,
                    "system": "70:79:b3:07:60:50",
                    "system_priority": 65535
                },
                "aggregator": {
                    "id": 34,
                    "selected": true
                },
                "key": 0,
                "partner_lacpdu_info": {
                    "key": 0,
                    "port": 273,
                    "port_priority": 255,
                    "state": 61,
                    "system": "02:42:f0:7f:01:02",
                    "system_priority": 65535
                },
                "prio": 255,
                "selected": true,
                "state": "current"
            }
        },
        "Ethernet-BP20": {
            "ifinfo": {
                "dev_addr": "70:79:b3:07:60:50",
                "dev_addr_len": 6,
                "ifindex": 39,
                "ifname": "Ethernet-BP20"
            },
            "link": {
                "duplex": "half",
                "speed": 0,
                "up": true
            },
            "link_watches": {
                "list": {
                    "link_watch_0": {
                        "delay_down": 0,
                        "delay_up": 0,
                        "down_count": 0,
                        "name": "ethtool",
                        "up": true
                    }
                },
                "up": true
            },
            "runner": {
                "actor_lacpdu_info": {
                    "key": 0,
                    "port": 21,
                    "port_priority": 255,
                    "state": 61,
                    "system": "70:79:b3:07:60:50",
                    "system_priority": 65535
                },
                "aggregator": {
                    "id": 34,
                    "selected": true
                },
                "key": 0,
                "partner_lacpdu_info": {
                    "key": 0,
                    "port": 277,
                    "port_priority": 255,
                    "state": 61,
                    "system": "02:42:f0:7f:01:02",
                    "system_priority": 65535
                },
                "prio": 255,
                "selected": true,
                "state": "current"
            }
        },
        "Ethernet-BP24": {
            "ifinfo": {
                "dev_addr": "70:79:b3:07:60:50",
                "dev_addr_len": 6,
                "ifindex": 40,
                "ifname": "Ethernet-BP24"
            },
            "link": {
                "duplex": "half",
                "speed": 0,
                "up": true
            },
            "link_watches": {
                "list": {
                    "link_watch_0": {
                        "delay_down": 0,
                        "delay_up": 0,
                        "down_count": 0,
                        "name": "ethtool",
                        "up": true
                    }
                },
                "up": true
            },
            "runner": {
                "actor_lacpdu_info": {
                    "key": 0,
                    "port": 25,
                    "port_priority": 255,
                    "state": 61,
                    "system": "70:79:b3:07:60:50",
                    "system_priority": 65535
                },
                "aggregator": {
                    "id": 34,
                    "selected": true
                },
                "key": 0,
                "partner_lacpdu_info": {
                    "key": 0,
                    "port": 281,
                    "port_priority": 255,
                    "state": 61,
                    "system": "02:42:f0:7f:01:02",
                    "system_priority": 65535
                },
                "prio": 255,
                "selected": true,
                "state": "current"
            }
        },
        "Ethernet-BP28": {
            "ifinfo": {
                "dev_addr": "70:79:b3:07:60:50",
                "dev_addr_len": 6,
                "ifindex": 41,
                "ifname": "Ethernet-BP28"
            },
            "link": {
                "duplex": "half",
                "speed": 0,
                "up": true
            },
            "link_watches": {
                "list": {
                    "link_watch_0": {
                        "delay_down": 0,
                        "delay_up": 0,
                        "down_count": 0,
                        "name": "ethtool",
                        "up": true
                    }
                },
                "up": true
            },
            "runner": {
                "actor_lacpdu_info": {
                    "key": 0,
                    "port": 29,
                    "port_priority": 255,
                    "state": 61,
                    "system": "70:79:b3:07:60:50",
                    "system_priority": 65535
                },
                "aggregator": {
                    "id": 34,
                    "selected": true
                },
                "key": 0,
                "partner_lacpdu_info": {
                    "key": 0,
                    "port": 285,
                    "port_priority": 255,
                    "state": 61,
                    "system": "02:42:f0:7f:01:02",
                    "system_priority": 65535
                },
                "prio": 255,
                "selected": true,
                "state": "current"
            }
        },
        "Ethernet-BP4": {
            "ifinfo": {
                "dev_addr": "70:79:b3:07:60:50",
                "dev_addr_len": 6,
                "ifindex": 35,
                "ifname": "Ethernet-BP4"
            },
            "link": {
                "duplex": "half",
                "speed": 0,
                "up": true
            },
            "link_watches": {
                "list": {
                    "link_watch_0": {
                        "delay_down": 0,
                        "delay_up": 0,
                        "down_count": 0,
                        "name": "ethtool",
                        "up": true
                    }
                },
                "up": true
            },
            "runner": {
                "actor_lacpdu_info": {
                    "key": 0,
                    "port": 5,
                    "port_priority": 255,
                    "state": 61,
                    "system": "70:79:b3:07:60:50",
                    "system_priority": 65535
                },
                "aggregator": {
                    "id": 34,
                    "selected": true
                },
                "key": 0,
                "partner_lacpdu_info": {
                    "key": 0,
                    "port": 261,
                    "port_priority": 255,
                    "state": 61,
                    "system": "02:42:f0:7f:01:02",
                    "system_priority": 65535
                },
                "prio": 255,
                "selected": true,
                "state": "current"
            }
        },
        "Ethernet-BP8": {
            "ifinfo": {
                "dev_addr": "70:79:b3:07:60:50",
                "dev_addr_len": 6,
                "ifindex": 36,
                "ifname": "Ethernet-BP8"
            },
            "link": {
                "duplex": "half",
                "speed": 0,
                "up": true
            },
            "link_watches": {
                "list": {
                    "link_watch_0": {
                        "delay_down": 0,
                        "delay_up": 0,
                        "down_count": 0,
                        "name": "ethtool",
                        "up": true
                    }
                },
                "up": true
            },
            "runner": {
                "actor_lacpdu_info": {
                    "key": 0,
                    "port": 9,
                    "port_priority": 255,
                    "state": 61,
                    "system": "70:79:b3:07:60:50",
                    "system_priority": 65535
                },
                "aggregator": {
                    "id": 34,
                    "selected": true
                },
                "key": 0,
                "partner_lacpdu_info": {
                    "key": 0,
                    "port": 265,
                    "port_priority": 255,
                    "state": 61,
                    "system": "02:42:f0:7f:01:02",
                    "system_priority": 65535
                },
                "prio": 255,
                "selected": true,
                "state": "current"
            }
        }
    },
    "runner": {
        "active": true,
        "fallback": false,
        "fast_rate": false,
        "select_policy": "lacp_prio",
        "sys_prio": 65535
    },
    "setup": {
        "daemonized": true,
        "dbus_enabled": false,
        "debug_level": 1,
        "kernel_team_mode_name": "loadbalance",
        "pid": 39,
        "pid_file": "/var/run/teamd/PortChannel4040.pid",
        "runner_name": "lacp",
        "zmq_enabled": false
    },
    "team_device": {
        "ifinfo": {
            "dev_addr": "70:79:b3:07:60:50",
            "dev_addr_len": 6,
            "ifindex": 4,
            "ifname": "PortChannel4040"
        }
    }
}

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012

Description for the changelog

A picture of a cute animal (not mandatory but encouraged)

@abdosi
Copy link
Contributor

abdosi commented Apr 28, 2021

does this error has any impact on lacp protocol functionality ?

I don't see this affecting the protocol functionality. From the LACP spec, the port identifier should be unique in an aggregator. The state machine uses Actor/partnor info in the LACP PDU's to compare with info stored locally and reach a matched state. I found these parameters are used more to make sure the ports are bundled in the right PortChannel -- if there are multiple portchannels ( aggregators)

In this case we have fixed interface configurations for back-end portchannels, so I find it is ok.

@abdosi
Copy link
Contributor

abdosi commented May 3, 2021

is it ok to have lacp_portname_to_port_id to return same value for Ethernet0 and Ethernet-BP0 ?

The idea as I understand this function lacp_portname_to_port_id() was added was to have a consistency for "port_id" in lacp bpdu send after warmboot. Before Warm boot the lacp bpdu's are saved locally, and this saved copy is used to send the first lacp packet out when teamd comes up after warmboot. If we use ifindex which linux kernel generates, the value after warmboot needn't be same as the one which is saved in lacp bpdu before warmboot.

We are ok here, relating to Ethernet0 and Ethernet-BP0, as we will not bundle them together.

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.

3 participants