[dpdk-dev] [PATCH 2/8] lib/librte_ether: defind RX/TX lock mode
stephen at networkplumber.org
Wed Jun 8 04:15:53 CEST 2016
On Mon, 6 Jun 2016 13:40:47 +0800
Wenzhuo Lu <wenzhuo.lu at intel.com> wrote:
> Define lock mode for RX/TX queue. Because when resetting
> the device we want the resetting thread to get the lock
> of the RX/TX queue to make sure the RX/TX is stopped.
> Using next ABI macro for this ABI change as it has too
> much impact. 7 APIs and 1 global variable are impacted.
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu at intel.com>
> Signed-off-by: Zhe Tao <zhe.tao at intel.com>
Why does this patch set make a different assumption the rest of the DPDK?
The rest of the DPDK operates on the principle that the application
is smart enough to stop the device before making changes. There is no
equivalent to the Linux kernel RTNL mutex. The API assumes application
threads are well behaved and will not try and sabotage each other.
If you restrict the reset operation to only being available when RX/TX is stopped,
then no lock is needed.
The fact that it requires lots more locking inside each device driver implies
to me this is not correct way to architect this.
More information about the dev