[PATCH v4] net/iavf: add lock for vf commands

Zhang, Qi Z qi.z.zhang at intel.com
Tue Jan 17 02:20:41 CET 2023



> -----Original Message-----
> From: Mike Pattrick <mkp at redhat.com>
> Sent: Thursday, December 29, 2022 7:00 AM
> To: dev at dpdk.org
> Cc: Zhang, Qi Z <qi.z.zhang at intel.com>; thomas at monjalon.net;
> david.marchand at redhat.com; Zhou, YidingX <yidingx.zhou at intel.com>;
> ktraynor at redhat.com; Mike Pattrick <mkp at redhat.com>; stable at dpdk.org
> Subject: [PATCH v4] net/iavf: add lock for vf commands
> 
> iavf admin queue commands aren't thread-safe. Bugs surrounding this issue
> can manifest in a variety of ways but frequently pend_cmd is over written.
> Simultaneously executing commands can result in a misconfigured device or
> DPDK sleeping in a thread for 2 second.
> 
> Despite this limitation, vf commands may be executed from both
> iavf_dev_alarm_handler() in a control thread and the applications main
> thread. This is trivial to simulate in the testpmd application by creating a bond
> of vf's in active backup mode, and then turning the bond off and then on
> again repeatedly.
> 
> Previously [1] was proposed as a potential solution, but this commit did not
> resolve all potential issues concerning the admin queue and has been
> reverted from the stable branch. I propose adding locks until a more
> complete solution is available.
> 
> [1] commit cb5c1b91f76f ("net/iavf: add thread for event callbacks")
> 
> Fixes: 48de41ca11f0 ("net/avf: enable link status update")
> Fixes: 84108425054a ("net/iavf: support asynchronous virtual channel
> message")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Mike Pattrick <mkp at redhat.com>

Acked-by: Qi Zhang <qi.z.zhang at intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi


More information about the dev mailing list