net/sfc: add init on attach
authorAndrew Rybchenko <arybchenko@solarflare.com>
Tue, 29 Nov 2016 16:19:03 +0000 (16:19 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 17 Jan 2017 18:39:26 +0000 (19:39 +0100)
commitba641f2076426945e112899181a6b0ee6492f8db
tree26403850e01de56296678652f65daecf40fcfafd
parente1b9445985790740d0aa3729ca6a9341f0aa988a
net/sfc: add init on attach

The setup and configuration of the PMD is not performance sensitive,
but is not thread safe either. It is possible that the multiple
read/writes during PMD setup and configuration could be corrupted
in a multi-thread environment.  Since this is not performance
sensitive, the developer can choose to add their own layer to provide
thread-safe setup and configuration. It is expected that, in most
applications, the initial configuration of the network ports would be
done by a single thread at startup.

In the case of exception on the event queue, the event queue and
corresponding Rx/Tx queue should be restarted in the Rx/Tx queue
polling context. These operations require access to the device
control which should be serialized. The device level lock will do
the job.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/sfc/Makefile
drivers/net/sfc/sfc.c [new file with mode: 0644]
drivers/net/sfc/sfc.h
drivers/net/sfc/sfc_debug.h
drivers/net/sfc/sfc_ethdev.c
drivers/net/sfc/sfc_mcdi.c [new file with mode: 0644]