On Wed, Jul 8, 2020 at 5:13 PM Petr Machata <pe...@mellanox.com> wrote: > > > Petr Machata <pe...@mellanox.com> writes: > > > Cong Wang <xiyou.wangc...@gmail.com> writes: > > > > I'll think about it some more. For now I will at least fix the lack of > > locking. > > I guess I could store smp_processor_id() that acquired the lock in > struct qdisc_skb_head. Do a trylock instead of lock, and on fail check > the stored value. I'll need to be careful about the race between > unsuccessful trylock and the test, and about making sure CPU ID doesn't > change after it is read. I'll probe this tomorrow.
Like __netif_tx_lock(), right? Seems doable. Thanks.