> On 03.09.2021., at 20:10, Mrityunjay Kumar <kumarn...@gmail.com> wrote: > > Please find the comment inline below. > Regards, > Mrityunjay Kumar. > Mobile: +91 - 9731528504 > > > > On Fri, Sep 3, 2021 at 9:52 PM Damjan Marion <dmar...@me.com > <mailto:dmar...@me.com>> wrote: > > >> On 03.09.2021., at 12:05, Mrityunjay Kumar <kumarn...@gmail.com >> <mailto:kumarn...@gmail.com>> wrote: >> >> Damjan Hi, >> >> I’m so sorry for pointing but I’d like to make sure I understood you >> correctly. Since I don’t have specific case of tx-placement but please help >> vpp-dev <https://lists.fd.io/g/vpp-dev/message/19192> mail readers. >> · tx queues are statically mapped by vpp. >> · main thread always maps to queue 0. of each interface in vpp. >> · For the dpdk interfaces by default, number of vlib_mains [main >> thread + workers] is equal to the number of tx queues if the dpdk driver >> support such limit. >> · Tx queues limit can be controlled by startup.conf section dpdk { >> num-tx-queues #abc }. But it might leads to spinlock on workers threads, >> refer the code. >> if (xd->tx_q_used < tm->n_vlib_mains) >> clib_spinlock_init (&vec_elt >> (xd->tx_queues, j).lock); >> >> So I think, we can’t generalised workers to tx queue mapping as because, >> different vpp interface can have different number of tx queues. > > If VPP have more worker threads than number of TX queues on the specific > interace, then VPP will share 1 queue between multiple workers for that > interface. > > With the new tx queue infra (not yet enabled for dpdk). we allow dynamic > mapping of tx queues and also sharing single queue between multiple workers. > I.e. you can have 8 workers sharing 4 queues (2:1 mapping). > > [MJ]: Why should we implement some features to allow an user to configure > less TX queues than worker threads? In case of hardware limitation, that's > ok. If the number of threads is more than TX Queue , it leads to lock on > thread. Being a decade old user of dpdk, we recommend a lock-less mechanism. > [MJ]: Why do we think of implementing tx-placemats in VPP? If someone shares > a use case, it will definitely help me to improve my knowledge.
One example is AWS Nitro which have per-queue limits which in some cases lead that you need more than one queue to deal with traffic from single thread. — Damjan
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#20069): https://lists.fd.io/g/vpp-dev/message/20069 Mute This Topic: https://lists.fd.io/mt/82088483/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-