On Thu, Feb 21, 2019 at 09:44:07AM +0100, Jiri Pirko wrote:
Thu, Feb 21, 2019 at 09:26:17AM CET, liuhangbin(a)gmail.com wrote:
>> Just confirmed the issue is not cause by this code. I will give an update after
get more info.
>> Sorry to bother you.
>Update: This issue was caused by teaming PFs and VFs .
>The customer has a topology like
>eth0 (PF link that's running LACP)
> --> vf0 (VF that use loadbalance mode)
>eth1 (physical link that's running LACP)
> --> vf1 (VF that use loadbalance mode)
>After eth0/vf0 down and up. eth0 enters lacp negotiate mode and not
>active yet. But vf0 is up immediately.
>So vf0 will be active(cause it use loadbalance mode) and starts
>sending packets. In the end, these packets
>are sent from eth0 as it's PF device.
It is unclear to me how your topology looks exactly. Anyway, if you run
lacp, you don't really care about physical link up/down. So that should
be okay for the vf, even if it gets link up.
Sorry I didn't make it clear. Hope this topo helps.
vf0 -- team1 -- vf1
eth0 -- team0 -- eth1
eth0 and eth1 are two PF devices, with team0(LACP mode) on them.
vf0 and vf1 are two VF devices, with team1(loadbalance mode) on them.
Here is the process:
1) The switch port eth0 conected down/unplugged. Then eth0/vf0 also down.
2) eth1/vf1 enabled and start to send/reply messages.
3) After a while, the switch port up/plugged. eth0/vf0 up at the same time.
4) eth0 goto lacp negotiate state
5) vf0 up and enabled directly as it use loadbalance mode
6) vf0 start to reply packages, while eth0 and the switch port are still in
lacp negotiation. So the switch port is not ready to forward packets. The
packets send from vf0 are dropped.
>To avoid vf0 active before eth0 finishing LACP negotiation. The
>customer use 'teamnl -p eth0 team0 getoption enabled' to detect
>eth0's state and setup vf0 manually. This method works. But I'm not
Setup how? I don't understand the scenario, sorry :/ Could you attach
some configs or something?
I dont have the script files. From the info they supply, I guess it looks
while true; do
teamnl -p eth0 team0 getoption enabled && break || continue
teamnl team1 setoption activeport 4
If you need, I can ask for the script they use.