public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [DISCUSS] Bond arp monitor not works with veth due to flag NETIF_F_LLTX.
@ 2021-11-18  3:11 Hangbin Liu
  2021-11-18  3:34 ` Eric Dumazet
  0 siblings, 1 reply; 3+ messages in thread
From: Hangbin Liu @ 2021-11-18  3:11 UTC (permalink / raw)
  To: netdev
  Cc: Jay Vosburgh, Veaceslav Falico, Andy Gospodarek, Jarod Wilson,
	Jakub Kicinski, Jiri Pirko, davem, Denis Kirjanov, David Ahern,
	Eric Dumazet

Hi,

When I test bond arp monitor with veth interface, the bond link flaps rapidly.
After checking, in bond_ab_arp_inspect():

                trans_start = dev_trans_start(slave->dev);
                if (bond_is_active_slave(slave) &&
                    (!bond_time_in_interval(bond, trans_start, bond->params.missed_max) ||
                     !bond_time_in_interval(bond, last_rx, bond->params.missed_max))) {
                        bond_propose_link_state(slave, BOND_LINK_DOWN);
                        commit++;
                }

it checks both slave's trans_start and last_rx. While veth interface's
trans_start never get updated due to flag "NETIF_F_LLTX". As when NETIF_F_LLTX
set, in netdev_start_xmit() -> txq_trans_update() the txq->trans_start
never get updated because txq->xmit_lock_owner is always -1.

If we remove the flag NETIF_F_LLTX, the HARD_TX_LOCK() will acquire the
spin_lock and update txq->xmit_lock_owner. I expected there may have some
performance drop. But I tested with xdp_redirect_map and pktgen by forwarding
a 10G NIC's traffic to veth interface and didn't see much performance drop. e.g.
With xdpgeneric mode, with the flag, it's 2.18M pps, after removing the flag,
it's 2.11M pps. Not sure if I missed anything.

So what do you think? Should we remove this flag on veth to fix the issue?
Some user may want to use bonding active-backup arp monitor mode on netns.

Thanks
Hangbin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-18 10:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-18  3:11 [DISCUSS] Bond arp monitor not works with veth due to flag NETIF_F_LLTX Hangbin Liu
2021-11-18  3:34 ` Eric Dumazet
2021-11-18 10:17   ` Hangbin Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox