[dpdk-dev] [PATCH 00/56] Solarflare libefx-based PMD

2016-11-25 Thread Andrew Rybchenko
On 11/25/2016 04:00 PM, Thomas Monjalon wrote:
> 2016-11-25 12:43, Ferruh Yigit:
>> On 11/25/2016 12:02 PM, Andrew Rybchenko wrote:
>>> On 11/25/2016 01:24 PM, Ferruh Yigit wrote:
 On 11/23/2016 7:49 AM, Andrew Rybchenko wrote:
> On 11/23/2016 03:02 AM, Ferruh Yigit wrote:
>> Also folder structure is drivers/net/sfc/efx/, why /sfc/
>> layer is created?
>> sfc is company name (solarflare communications), right? Other driver
>> folders not structured based on company, what about using
>> drivers/net/efx/* ?
> I've tried to explain it above in item (2):
>
>   >>>
>
>2. Another Solarflare PMD with in-kernel part (for control operations)
>   is considered and could be added in the future. Code for data path
>   should be shared by these two drivers. libefx-based PMD is put into
>   'efx' subdirectory to have a space for another PMD and shared code.
>
> <<<
>
> So, main reason is to have location for the code shared by two Solarflare
> network PMDs. May be it better to relocate when we really have it.
> I'm open for other ideas/suggestions.
 If there will be another PMD that shares code with current one, the
 logic seems good, but I am not sure about start using company names, I
 am not against it, just I don't know.
>>> I think that mlx4 and mlx5 are tightly bound to the company name (plus
>>> adapter generation, I guess).
>>>
 Let's relocate later, this buys some time to think / get feedback on issue.
>>> Do I understand correctly that you suggest to avoid extra level inside
>>> for now
>>> and relocate later if required? If so, that's fine for me.
>>>
>>> As for naming, we think that just "efx" is a bad idea. The prefix is
>>> occupied by
>>> the libefx functions and driver should use something else. We have chosen
>>> "sfc" mainly to follow naming used in Linux kernel for Solarflare driver
>>> (the first level of Ethernet driver names is company bound in the Linux
>>> kernel).
>>> If we avoid extra level as discussed above, I think "sfc_efx", "sfcefx"
>>> (may be it
>>> will look better nearby other drivers) or just "sfc" are fine for us.
>>>
>> Thomas, Bruce, any comment on this?
> You can add multiple drivers in the same library. As an example, ixgbe
> directory have several drivers for PF/VF, scalar/vector, etc.
> If you really want separate directories for your drivers while sharing some
> code, you can link some files from the other directory.

Thanks for ideas/examples. I'll remove extra level.

> About the name of this directory, I have no strong opinion.
> sfcefx looks good.

If there is no strong opinion against "sfc" , we'd prefer to keep it:
  1. sfc is used in Linux (and, hopefully, well know)
  2. sfc is shorter and already used in sources
  3. sfc seems to be more future proof if we would like to add more drivers
  inside (efx binds it to libefx)
  4. sfc could be read as well as Solarflare Flareon Controller ;)

Andrew.


[dpdk-dev] [PATCH 00/56] Solarflare libefx-based PMD

2016-11-25 Thread Andrew Rybchenko
On 11/23/2016 03:02 AM, Ferruh Yigit wrote:
> On 11/21/2016 3:00 PM, Andrew Rybchenko wrote:
>> The patch series adds Solarflare libefx-based network PMD.
>>
>> This version of the driver supports Solarflare SFN7xxx and SFN8xxx
>> families of 10/40 Gbps adapters.
>>
>> libefx is a platform-independent library to implement drivers for
>> Solarflare network adapters. It provides unified adapter family
>> independent interface (if possible). FreeBSD [1] and illumos [2]
>> drivers are built on top of the library.
>>
>> The patch series could be logically structured into 5 sub-series:
>>   1. (1) add the driver skeleton including documentation
>>   2. (2-30) import libefx and include it in build with the latest patch
>>   3. (31-43) implement minimal device level operations in steps
>>   4. (44-51) implement Rx subsystem
>>   5. (52-56) implement Tx subsystem
>>
>> Functional driver with multi-queue support capable to send and receive
>> traffic appears with the last patch in the series.
>>
>> The following design decisions are made during development:
>>
>>   1. Since libefx uses positive errno return codes, positive errno
>>  return codes are used inside the driver and coversion to negative
>>  is done on return from eth_dev_ops callbacks. We think that it
>>  is the less error-prone way.
>>
>>   2. Another Solarflare PMD with in-kernel part (for control operations)
>>  is considered and could be added in the future. Code for data path
>>  should be shared by these two drivers. libefx-based PMD is put into
>>  'efx' subdirectory to have a space for another PMD and shared code.
>>
>>   3. Own event queue (a way to deliver events from HW to host CPU) is
>>  used for house-keeping (e.g. link status notifications), each Tx
>>  and each Rx queue. No locks on datapath are requires in this case.
>>
>>   4. Alarm is used to periodically poll house-keeping event queue.
>>  The event queue is used to deliver link status change notifications,
>>  Rx/Tx queue flush events, SRAM events. It is not used on datapath.
>>  The event queue polling is protected using spin-lock since
>>  concurrent access from different contexts is possible (e.g. device
>>  stop when polling alarm is running).
>>
>> [1] https://svnweb.freebsd.org/base/head/sys/dev/sfxge/common/
>> [2] 
>> https://github.com/illumos/illumos-gate/tree/master/usr/src/uts/common/io/sfxge/common/
>>
>> ---
>>
>> Andrew Rybchenko (49):
>>net/sfc: libefx-based PMD stub sufficient to build and init
>>net/sfc: import libefx base
>>net/sfc: import libefx register definitions
>>net/sfc: import libefx filters support
>>net/sfc: import libefx MCDI definition
>>net/sfc: import libefx MCDI implementation
>>net/sfc: import libefx MCDI logging support
>>net/sfc: import libefx MCDI proxy authorization support
>>net/sfc: import libefx 5xxx/6xxx family support
>>net/sfc: import libefx SFN7xxx family support
>>net/sfc: import libefx SFN8xxx family support
>>net/sfc: import libefx diagnostics support
>>net/sfc: import libefx built-in selftest support
>>net/sfc: import libefx software per-queue statistics support
>>net/sfc: import libefx PHY flags control support
>>net/sfc: import libefx PHY statistics support
>>net/sfc: import libefx PHY LEDs control support
>>net/sfc: import libefx MAC statistics support
>>net/sfc: import libefx event prefetch support
>>net/sfc: import libefx Rx scatter support
>>net/sfc: import libefx RSS support
>>net/sfc: import libefx loopback control support
>>net/sfc: import libefx monitors statistics support
>>net/sfc: import libefx support to access monitors via MCDI
>>net/sfc: import libefx support for Rx packed stream mode
>>net/sfc: import libefx NVRAM support
>>net/sfc: import libefx VPD support
>>net/sfc: import libefx bootrom configuration support
>>net/sfc: import libefx licensing support
>>net/sfc: implement dummy callback to get device information
>>net/sfc: implement driver operation to init device on attach
>>net/sfc: add device configure and close stubs
>>net/sfc: add device configuration checks
>>net/sfc: implement device start and stop operations
>>net/sfc: make available resources estimation and allocation
>>net/sfc: interrupts support sufficient for event queue init
>>net/sfc: implement event queue support
>>net/sfc: implement EVQ dummy exception handling
>>net/sfc: maintain management event queue
>>net/sfc: periodic management EVQ polling using alarm
>>net/sfc: minimum port control sufficient to receive traffic
>>net/sfc: implement Rx subsystem stubs
>>net/sfc: check configured rxmode
>>net/sfc: implement Rx queue setup release operations
>>net/sfc: calculate Rx buffer size which may be used
>>net/sfc: validate Rx queue buffers setup
>>net/sfc: implement Rx queue start and stop operations
>>net/sfc: 

[dpdk-dev] [PATCH 00/56] Solarflare libefx-based PMD

2016-11-25 Thread Andrew Rybchenko
On 11/25/2016 01:24 PM, Ferruh Yigit wrote:
> On 11/23/2016 7:49 AM, Andrew Rybchenko wrote:
>> On 11/23/2016 03:02 AM, Ferruh Yigit wrote:
>>> On 11/21/2016 3:00 PM, Andrew Rybchenko wrote:
 The patch series adds Solarflare libefx-based network PMD.

 This version of the driver supports Solarflare SFN7xxx and SFN8xxx
 families of 10/40 Gbps adapters.

 libefx is a platform-independent library to implement drivers for
 Solarflare network adapters. It provides unified adapter family
 independent interface (if possible). FreeBSD [1] and illumos [2]
 drivers are built on top of the library.

 The patch series could be logically structured into 5 sub-series:
1. (1) add the driver skeleton including documentation
2. (2-30) import libefx and include it in build with the latest patch
3. (31-43) implement minimal device level operations in steps
4. (44-51) implement Rx subsystem
5. (52-56) implement Tx subsystem

 Functional driver with multi-queue support capable to send and receive
 traffic appears with the last patch in the series.

 The following design decisions are made during development:

1. Since libefx uses positive errno return codes, positive errno
   return codes are used inside the driver and coversion to negative
   is done on return from eth_dev_ops callbacks. We think that it
   is the less error-prone way.

2. Another Solarflare PMD with in-kernel part (for control operations)
   is considered and could be added in the future. Code for data path
   should be shared by these two drivers. libefx-based PMD is put into
   'efx' subdirectory to have a space for another PMD and shared code.

3. Own event queue (a way to deliver events from HW to host CPU) is
   used for house-keeping (e.g. link status notifications), each Tx
   and each Rx queue. No locks on datapath are requires in this case.

4. Alarm is used to periodically poll house-keeping event queue.
   The event queue is used to deliver link status change notifications,
   Rx/Tx queue flush events, SRAM events. It is not used on datapath.
   The event queue polling is protected using spin-lock since
   concurrent access from different contexts is possible (e.g. device
   stop when polling alarm is running).

 [1] https://svnweb.freebsd.org/base/head/sys/dev/sfxge/common/
 [2] 
 https://github.com/illumos/illumos-gate/tree/master/usr/src/uts/common/io/sfxge/common/

 ---

 Andrew Rybchenko (49):
 net/sfc: libefx-based PMD stub sufficient to build and init
 net/sfc: import libefx base
 net/sfc: import libefx register definitions
 net/sfc: import libefx filters support
 net/sfc: import libefx MCDI definition
 net/sfc: import libefx MCDI implementation
 net/sfc: import libefx MCDI logging support
 net/sfc: import libefx MCDI proxy authorization support
 net/sfc: import libefx 5xxx/6xxx family support
 net/sfc: import libefx SFN7xxx family support
 net/sfc: import libefx SFN8xxx family support
 net/sfc: import libefx diagnostics support
 net/sfc: import libefx built-in selftest support
 net/sfc: import libefx software per-queue statistics support
 net/sfc: import libefx PHY flags control support
 net/sfc: import libefx PHY statistics support
 net/sfc: import libefx PHY LEDs control support
 net/sfc: import libefx MAC statistics support
 net/sfc: import libefx event prefetch support
 net/sfc: import libefx Rx scatter support
 net/sfc: import libefx RSS support
 net/sfc: import libefx loopback control support
 net/sfc: import libefx monitors statistics support
 net/sfc: import libefx support to access monitors via MCDI
 net/sfc: import libefx support for Rx packed stream mode
 net/sfc: import libefx NVRAM support
 net/sfc: import libefx VPD support
 net/sfc: import libefx bootrom configuration support
 net/sfc: import libefx licensing support
 net/sfc: implement dummy callback to get device information
 net/sfc: implement driver operation to init device on attach
 net/sfc: add device configure and close stubs
 net/sfc: add device configuration checks
 net/sfc: implement device start and stop operations
 net/sfc: make available resources estimation and allocation
 net/sfc: interrupts support sufficient for event queue init
 net/sfc: implement event queue support
 net/sfc: implement EVQ dummy exception handling
 net/sfc: maintain management event queue
 net/sfc: periodic management EVQ polling using alarm
 net/sfc: minimum port control sufficient 

[dpdk-dev] [PATCH 00/56] Solarflare libefx-based PMD

2016-11-25 Thread Thomas Monjalon
2016-11-25 12:43, Ferruh Yigit:
> On 11/25/2016 12:02 PM, Andrew Rybchenko wrote:
> > On 11/25/2016 01:24 PM, Ferruh Yigit wrote:
> >> On 11/23/2016 7:49 AM, Andrew Rybchenko wrote:
> >>> On 11/23/2016 03:02 AM, Ferruh Yigit wrote:
>  Also folder structure is drivers/net/sfc/efx/, why /sfc/
>  layer is created?
>  sfc is company name (solarflare communications), right? Other driver
>  folders not structured based on company, what about using
>  drivers/net/efx/* ?
> >>> I've tried to explain it above in item (2):
> >>>
> >>>  >>>
> >>>
> >>>   2. Another Solarflare PMD with in-kernel part (for control operations)
> >>>  is considered and could be added in the future. Code for data path
> >>>  should be shared by these two drivers. libefx-based PMD is put into
> >>>  'efx' subdirectory to have a space for another PMD and shared code.
> >>>
> >>> <<<
> >>>
> >>> So, main reason is to have location for the code shared by two Solarflare
> >>> network PMDs. May be it better to relocate when we really have it.
> >>> I'm open for other ideas/suggestions.
> >> If there will be another PMD that shares code with current one, the
> >> logic seems good, but I am not sure about start using company names, I
> >> am not against it, just I don't know.
> > 
> > I think that mlx4 and mlx5 are tightly bound to the company name (plus
> > adapter generation, I guess).
> > 
> >> Let's relocate later, this buys some time to think / get feedback on issue.
> > 
> > Do I understand correctly that you suggest to avoid extra level inside
> > for now
> > and relocate later if required? If so, that's fine for me.
> > 
> > As for naming, we think that just "efx" is a bad idea. The prefix is
> > occupied by
> > the libefx functions and driver should use something else. We have chosen
> > "sfc" mainly to follow naming used in Linux kernel for Solarflare driver
> > (the first level of Ethernet driver names is company bound in the Linux
> > kernel).
> > If we avoid extra level as discussed above, I think "sfc_efx", "sfcefx"
> > (may be it
> > will look better nearby other drivers) or just "sfc" are fine for us.
> > 
> 
> Thomas, Bruce, any comment on this?

You can add multiple drivers in the same library. As an example, ixgbe
directory have several drivers for PF/VF, scalar/vector, etc.
If you really want separate directories for your drivers while sharing some
code, you can link some files from the other directory.

About the name of this directory, I have no strong opinion.
sfcefx looks good.


[dpdk-dev] [PATCH 00/56] Solarflare libefx-based PMD

2016-11-25 Thread Ferruh Yigit
On 11/25/2016 12:02 PM, Andrew Rybchenko wrote:
> On 11/25/2016 01:24 PM, Ferruh Yigit wrote:
>> On 11/23/2016 7:49 AM, Andrew Rybchenko wrote:
>>> On 11/23/2016 03:02 AM, Ferruh Yigit wrote:
 On 11/21/2016 3:00 PM, Andrew Rybchenko wrote:
> The patch series adds Solarflare libefx-based network PMD.
>
> This version of the driver supports Solarflare SFN7xxx and SFN8xxx
> families of 10/40 Gbps adapters.
>
> libefx is a platform-independent library to implement drivers for
> Solarflare network adapters. It provides unified adapter family
> independent interface (if possible). FreeBSD [1] and illumos [2]
> drivers are built on top of the library.
>
> The patch series could be logically structured into 5 sub-series:
>   1. (1) add the driver skeleton including documentation
>   2. (2-30) import libefx and include it in build with the latest patch
>   3. (31-43) implement minimal device level operations in steps
>   4. (44-51) implement Rx subsystem
>   5. (52-56) implement Tx subsystem
>
> Functional driver with multi-queue support capable to send and receive
> traffic appears with the last patch in the series.
>
> The following design decisions are made during development:
>
>   1. Since libefx uses positive errno return codes, positive errno
>  return codes are used inside the driver and coversion to negative
>  is done on return from eth_dev_ops callbacks. We think that it
>  is the less error-prone way.
>
>   2. Another Solarflare PMD with in-kernel part (for control operations)
>  is considered and could be added in the future. Code for data path
>  should be shared by these two drivers. libefx-based PMD is put into
>  'efx' subdirectory to have a space for another PMD and shared code.
>
>   3. Own event queue (a way to deliver events from HW to host CPU) is
>  used for house-keeping (e.g. link status notifications), each Tx
>  and each Rx queue. No locks on datapath are requires in this case.
>
>   4. Alarm is used to periodically poll house-keeping event queue.
>  The event queue is used to deliver link status change notifications,
>  Rx/Tx queue flush events, SRAM events. It is not used on datapath.
>  The event queue polling is protected using spin-lock since
>  concurrent access from different contexts is possible (e.g. device
>  stop when polling alarm is running).
>
> [1] https://svnweb.freebsd.org/base/head/sys/dev/sfxge/common/
> [2] 
> https://github.com/illumos/illumos-gate/tree/master/usr/src/uts/common/io/sfxge/common/
>
> ---
>
> Andrew Rybchenko (49):
>net/sfc: libefx-based PMD stub sufficient to build and init
>net/sfc: import libefx base
>net/sfc: import libefx register definitions
>net/sfc: import libefx filters support
>net/sfc: import libefx MCDI definition
>net/sfc: import libefx MCDI implementation
>net/sfc: import libefx MCDI logging support
>net/sfc: import libefx MCDI proxy authorization support
>net/sfc: import libefx 5xxx/6xxx family support
>net/sfc: import libefx SFN7xxx family support
>net/sfc: import libefx SFN8xxx family support
>net/sfc: import libefx diagnostics support
>net/sfc: import libefx built-in selftest support
>net/sfc: import libefx software per-queue statistics support
>net/sfc: import libefx PHY flags control support
>net/sfc: import libefx PHY statistics support
>net/sfc: import libefx PHY LEDs control support
>net/sfc: import libefx MAC statistics support
>net/sfc: import libefx event prefetch support
>net/sfc: import libefx Rx scatter support
>net/sfc: import libefx RSS support
>net/sfc: import libefx loopback control support
>net/sfc: import libefx monitors statistics support
>net/sfc: import libefx support to access monitors via MCDI
>net/sfc: import libefx support for Rx packed stream mode
>net/sfc: import libefx NVRAM support
>net/sfc: import libefx VPD support
>net/sfc: import libefx bootrom configuration support
>net/sfc: import libefx licensing support
>net/sfc: implement dummy callback to get device information
>net/sfc: implement driver operation to init device on attach
>net/sfc: add device configure and close stubs
>net/sfc: add device configuration checks
>net/sfc: implement device start and stop operations
>net/sfc: make available resources estimation and allocation
>net/sfc: interrupts support sufficient for event queue init
>net/sfc: implement event queue support
>net/sfc: implement EVQ dummy exception handling
>net/sfc: maintain management event queue
>net/sfc: periodic 

[dpdk-dev] [PATCH 00/56] Solarflare libefx-based PMD

2016-11-25 Thread Ferruh Yigit
On 11/24/2016 4:15 PM, Andrew Rybchenko wrote:
> On 11/23/2016 06:29 PM, Ferruh Yigit wrote:
>> On 11/21/2016 3:00 PM, Andrew Rybchenko wrote:
>>> The patch series adds Solarflare libefx-based network PMD.
>>>
>>> This version of the driver supports Solarflare SFN7xxx and SFN8xxx
>>> families of 10/40 Gbps adapters.
>>>
>>> libefx is a platform-independent library to implement drivers for
>>> Solarflare network adapters. It provides unified adapter family
>>> independent interface (if possible). FreeBSD [1] and illumos [2]
>>> drivers are built on top of the library.
>>>
>>> The patch series could be logically structured into 5 sub-series:
>>>  1. (1) add the driver skeleton including documentation
>>>  2. (2-30) import libefx and include it in build with the latest patch
>>>  3. (31-43) implement minimal device level operations in steps
>>>  4. (44-51) implement Rx subsystem
>>>  5. (52-56) implement Tx subsystem
>>>
>>> Functional driver with multi-queue support capable to send and receive
>>> traffic appears with the last patch in the series.
>>>
>>> The following design decisions are made during development:
>>>
>>>  1. Since libefx uses positive errno return codes, positive errno
>>> return codes are used inside the driver and coversion to negative
>>> is done on return from eth_dev_ops callbacks. We think that it
>>> is the less error-prone way.
>>>
>>>  2. Another Solarflare PMD with in-kernel part (for control operations)
>>> is considered and could be added in the future. Code for data path
>>> should be shared by these two drivers. libefx-based PMD is put into
>>> 'efx' subdirectory to have a space for another PMD and shared code.
>>>
>>>  3. Own event queue (a way to deliver events from HW to host CPU) is
>>> used for house-keeping (e.g. link status notifications), each Tx
>>> and each Rx queue. No locks on datapath are requires in this case.
>>>
>>>  4. Alarm is used to periodically poll house-keeping event queue.
>>> The event queue is used to deliver link status change notifications,
>>> Rx/Tx queue flush events, SRAM events. It is not used on datapath.
>>> The event queue polling is protected using spin-lock since
>>> concurrent access from different contexts is possible (e.g. device
>>> stop when polling alarm is running).
>>>
>>> [1] https://svnweb.freebsd.org/base/head/sys/dev/sfxge/common/
>>> [2] 
>>> https://github.com/illumos/illumos-gate/tree/master/usr/src/uts/common/io/sfxge/common/
>>>
>>> ---
>> I would like to note that very well organized patchset. Thank you for
>> your effort.
> 
> Thanks a lot, it is very pleasant to read it.
> 
> Please, see my questions in thread for patches 01/56 (about compiler
> versions to test on) and 30/56 (about libefx configuration documentation).
> 
> Also I'd like to ask a question about the further patches submission.
> We have about 40 patches which support various features (RSS, stats,
> flow control and many others). What is the preferred way to submit it?
> A. Separately since they are not so tightly related (but in fact cannot be
> applied in random order since some touch the same lines in code)
> B. As a series to process everything in one go.

If they can't be applied in random order, it is better send as a patchset.

But if you can make multiple logically independent patchsets with small
effort, please do, smaller patchsets are easier to chew.

> 
> Thanks,
> Andrew.



[dpdk-dev] [PATCH 00/56] Solarflare libefx-based PMD

2016-11-25 Thread Ferruh Yigit
On 11/23/2016 7:49 AM, Andrew Rybchenko wrote:
> On 11/23/2016 03:02 AM, Ferruh Yigit wrote:
>> On 11/21/2016 3:00 PM, Andrew Rybchenko wrote:
>>> The patch series adds Solarflare libefx-based network PMD.
>>>
>>> This version of the driver supports Solarflare SFN7xxx and SFN8xxx
>>> families of 10/40 Gbps adapters.
>>>
>>> libefx is a platform-independent library to implement drivers for
>>> Solarflare network adapters. It provides unified adapter family
>>> independent interface (if possible). FreeBSD [1] and illumos [2]
>>> drivers are built on top of the library.
>>>
>>> The patch series could be logically structured into 5 sub-series:
>>>   1. (1) add the driver skeleton including documentation
>>>   2. (2-30) import libefx and include it in build with the latest patch
>>>   3. (31-43) implement minimal device level operations in steps
>>>   4. (44-51) implement Rx subsystem
>>>   5. (52-56) implement Tx subsystem
>>>
>>> Functional driver with multi-queue support capable to send and receive
>>> traffic appears with the last patch in the series.
>>>
>>> The following design decisions are made during development:
>>>
>>>   1. Since libefx uses positive errno return codes, positive errno
>>>  return codes are used inside the driver and coversion to negative
>>>  is done on return from eth_dev_ops callbacks. We think that it
>>>  is the less error-prone way.
>>>
>>>   2. Another Solarflare PMD with in-kernel part (for control operations)
>>>  is considered and could be added in the future. Code for data path
>>>  should be shared by these two drivers. libefx-based PMD is put into
>>>  'efx' subdirectory to have a space for another PMD and shared code.
>>>
>>>   3. Own event queue (a way to deliver events from HW to host CPU) is
>>>  used for house-keeping (e.g. link status notifications), each Tx
>>>  and each Rx queue. No locks on datapath are requires in this case.
>>>
>>>   4. Alarm is used to periodically poll house-keeping event queue.
>>>  The event queue is used to deliver link status change notifications,
>>>  Rx/Tx queue flush events, SRAM events. It is not used on datapath.
>>>  The event queue polling is protected using spin-lock since
>>>  concurrent access from different contexts is possible (e.g. device
>>>  stop when polling alarm is running).
>>>
>>> [1] https://svnweb.freebsd.org/base/head/sys/dev/sfxge/common/
>>> [2] 
>>> https://github.com/illumos/illumos-gate/tree/master/usr/src/uts/common/io/sfxge/common/
>>>
>>> ---
>>>
>>> Andrew Rybchenko (49):
>>>net/sfc: libefx-based PMD stub sufficient to build and init
>>>net/sfc: import libefx base
>>>net/sfc: import libefx register definitions
>>>net/sfc: import libefx filters support
>>>net/sfc: import libefx MCDI definition
>>>net/sfc: import libefx MCDI implementation
>>>net/sfc: import libefx MCDI logging support
>>>net/sfc: import libefx MCDI proxy authorization support
>>>net/sfc: import libefx 5xxx/6xxx family support
>>>net/sfc: import libefx SFN7xxx family support
>>>net/sfc: import libefx SFN8xxx family support
>>>net/sfc: import libefx diagnostics support
>>>net/sfc: import libefx built-in selftest support
>>>net/sfc: import libefx software per-queue statistics support
>>>net/sfc: import libefx PHY flags control support
>>>net/sfc: import libefx PHY statistics support
>>>net/sfc: import libefx PHY LEDs control support
>>>net/sfc: import libefx MAC statistics support
>>>net/sfc: import libefx event prefetch support
>>>net/sfc: import libefx Rx scatter support
>>>net/sfc: import libefx RSS support
>>>net/sfc: import libefx loopback control support
>>>net/sfc: import libefx monitors statistics support
>>>net/sfc: import libefx support to access monitors via MCDI
>>>net/sfc: import libefx support for Rx packed stream mode
>>>net/sfc: import libefx NVRAM support
>>>net/sfc: import libefx VPD support
>>>net/sfc: import libefx bootrom configuration support
>>>net/sfc: import libefx licensing support
>>>net/sfc: implement dummy callback to get device information
>>>net/sfc: implement driver operation to init device on attach
>>>net/sfc: add device configure and close stubs
>>>net/sfc: add device configuration checks
>>>net/sfc: implement device start and stop operations
>>>net/sfc: make available resources estimation and allocation
>>>net/sfc: interrupts support sufficient for event queue init
>>>net/sfc: implement event queue support
>>>net/sfc: implement EVQ dummy exception handling
>>>net/sfc: maintain management event queue
>>>net/sfc: periodic management EVQ polling using alarm
>>>net/sfc: minimum port control sufficient to receive traffic
>>>net/sfc: implement Rx subsystem stubs
>>>net/sfc: check configured rxmode
>>>net/sfc: implement Rx queue setup release operations
>>>net/sfc: calculate Rx buffer 

[dpdk-dev] [PATCH 00/56] Solarflare libefx-based PMD

2016-11-24 Thread Andrew Rybchenko
On 11/23/2016 06:29 PM, Ferruh Yigit wrote:
> On 11/21/2016 3:00 PM, Andrew Rybchenko wrote:
>> The patch series adds Solarflare libefx-based network PMD.
>>
>> This version of the driver supports Solarflare SFN7xxx and SFN8xxx
>> families of 10/40 Gbps adapters.
>>
>> libefx is a platform-independent library to implement drivers for
>> Solarflare network adapters. It provides unified adapter family
>> independent interface (if possible). FreeBSD [1] and illumos [2]
>> drivers are built on top of the library.
>>
>> The patch series could be logically structured into 5 sub-series:
>>   1. (1) add the driver skeleton including documentation
>>   2. (2-30) import libefx and include it in build with the latest patch
>>   3. (31-43) implement minimal device level operations in steps
>>   4. (44-51) implement Rx subsystem
>>   5. (52-56) implement Tx subsystem
>>
>> Functional driver with multi-queue support capable to send and receive
>> traffic appears with the last patch in the series.
>>
>> The following design decisions are made during development:
>>
>>   1. Since libefx uses positive errno return codes, positive errno
>>  return codes are used inside the driver and coversion to negative
>>  is done on return from eth_dev_ops callbacks. We think that it
>>  is the less error-prone way.
>>
>>   2. Another Solarflare PMD with in-kernel part (for control operations)
>>  is considered and could be added in the future. Code for data path
>>  should be shared by these two drivers. libefx-based PMD is put into
>>  'efx' subdirectory to have a space for another PMD and shared code.
>>
>>   3. Own event queue (a way to deliver events from HW to host CPU) is
>>  used for house-keeping (e.g. link status notifications), each Tx
>>  and each Rx queue. No locks on datapath are requires in this case.
>>
>>   4. Alarm is used to periodically poll house-keeping event queue.
>>  The event queue is used to deliver link status change notifications,
>>  Rx/Tx queue flush events, SRAM events. It is not used on datapath.
>>  The event queue polling is protected using spin-lock since
>>  concurrent access from different contexts is possible (e.g. device
>>  stop when polling alarm is running).
>>
>> [1] https://svnweb.freebsd.org/base/head/sys/dev/sfxge/common/
>> [2] 
>> https://github.com/illumos/illumos-gate/tree/master/usr/src/uts/common/io/sfxge/common/
>>
>> ---
> I would like to note that very well organized patchset. Thank you for
> your effort.

Thanks a lot, it is very pleasant to read it.

Please, see my questions in thread for patches 01/56 (about compiler
versions to test on) and 30/56 (about libefx configuration documentation).

Also I'd like to ask a question about the further patches submission.
We have about 40 patches which support various features (RSS, stats,
flow control and many others). What is the preferred way to submit it?
A. Separately since they are not so tightly related (but in fact cannot be
applied in random order since some touch the same lines in code)
B. As a series to process everything in one go.

Thanks,
Andrew.


[dpdk-dev] [PATCH 00/56] Solarflare libefx-based PMD

2016-11-24 Thread Andrew Rybchenko
On 11/23/2016 10:21 PM, Stephen Hemminger wrote:
> On Wed, 23 Nov 2016 10:49:33 +0300
> Andrew Rybchenko  wrote:
>
>> I've tried to explain it above in item (2):
>>
>>   >>>
>>
>>2. Another Solarflare PMD with in-kernel part (for control operations)
>>   is considered and could be added in the future. Code for data path
>>   should be shared by these two drivers. libefx-based PMD is put into
>>   'efx' subdirectory to have a space for another PMD and shared code.
>>
>> <<<
>>
>> So, main reason is to have location for the code shared by two Solarflare
>> network PMDs. May be it better to relocate when we really have it.
>> I'm open for other ideas/suggestions.
> So is this driver dependent on another non-upstream kernel driver to work?

No, this driver does not have any external dependencies.

> Is this documented in docs directory.  If it does depend on other non-upstream
> components, then the default config should disable the driver.


Andrew.



[dpdk-dev] [PATCH 00/56] Solarflare libefx-based PMD

2016-11-23 Thread Ferruh Yigit
On 11/21/2016 3:00 PM, Andrew Rybchenko wrote:
> The patch series adds Solarflare libefx-based network PMD.
> 
> This version of the driver supports Solarflare SFN7xxx and SFN8xxx
> families of 10/40 Gbps adapters.
> 
> libefx is a platform-independent library to implement drivers for
> Solarflare network adapters. It provides unified adapter family
> independent interface (if possible). FreeBSD [1] and illumos [2]
> drivers are built on top of the library.
> 
> The patch series could be logically structured into 5 sub-series:
>  1. (1) add the driver skeleton including documentation
>  2. (2-30) import libefx and include it in build with the latest patch
>  3. (31-43) implement minimal device level operations in steps
>  4. (44-51) implement Rx subsystem
>  5. (52-56) implement Tx subsystem
> 
> Functional driver with multi-queue support capable to send and receive
> traffic appears with the last patch in the series.
> 
> The following design decisions are made during development:
> 
>  1. Since libefx uses positive errno return codes, positive errno
> return codes are used inside the driver and coversion to negative
> is done on return from eth_dev_ops callbacks. We think that it
> is the less error-prone way.
> 
>  2. Another Solarflare PMD with in-kernel part (for control operations)
> is considered and could be added in the future. Code for data path
> should be shared by these two drivers. libefx-based PMD is put into
> 'efx' subdirectory to have a space for another PMD and shared code.
> 
>  3. Own event queue (a way to deliver events from HW to host CPU) is
> used for house-keeping (e.g. link status notifications), each Tx
> and each Rx queue. No locks on datapath are requires in this case.
> 
>  4. Alarm is used to periodically poll house-keeping event queue.
> The event queue is used to deliver link status change notifications,
> Rx/Tx queue flush events, SRAM events. It is not used on datapath.
> The event queue polling is protected using spin-lock since
> concurrent access from different contexts is possible (e.g. device
> stop when polling alarm is running).
> 
> [1] https://svnweb.freebsd.org/base/head/sys/dev/sfxge/common/
> [2] 
> https://github.com/illumos/illumos-gate/tree/master/usr/src/uts/common/io/sfxge/common/
> 
> ---

I would like to note that very well organized patchset. Thank you for
your effort.

Thanks,
ferruh



[dpdk-dev] [PATCH 00/56] Solarflare libefx-based PMD

2016-11-23 Thread Thomas Monjalon
2016-11-23 09:57, Mcnamara, John:
> From: Andrew Rybchenko
> > Yes, I have no ICC compilers. I'll try to fix these warnings, but I can't
> > be sure without checking it.
> > Also we cannot claim ICC supported without building and testing the
> > generated binary.
> 
> Hi,
> 
> You can get a copy of ICC with a 30 day evaluation license here: 
> https://software.intel.com/en-us/try-buy-tools

I think we should stop having some ICC requirements.
That's OK to support it on best effort base but it cannot be
a responsibility of developers outside of Intel.


[dpdk-dev] [PATCH 00/56] Solarflare libefx-based PMD

2016-11-23 Thread Stephen Hemminger
On Wed, 23 Nov 2016 10:49:33 +0300
Andrew Rybchenko  wrote:

> I've tried to explain it above in item (2):
> 
>  >>>  
> 
>   2. Another Solarflare PMD with in-kernel part (for control operations)
>  is considered and could be added in the future. Code for data path
>  should be shared by these two drivers. libefx-based PMD is put into
>  'efx' subdirectory to have a space for another PMD and shared code.
> 
> <<<
> 
> So, main reason is to have location for the code shared by two Solarflare
> network PMDs. May be it better to relocate when we really have it.
> I'm open for other ideas/suggestions.

So is this driver dependent on another non-upstream kernel driver to work?
Is this documented in docs directory.  If it does depend on other non-upstream
components, then the default config should disable the driver.


[dpdk-dev] [PATCH 00/56] Solarflare libefx-based PMD

2016-11-23 Thread Andrew Rybchenko
On 11/23/2016 03:02 AM, Ferruh Yigit wrote:
> On 11/21/2016 3:00 PM, Andrew Rybchenko wrote:
>> The patch series adds Solarflare libefx-based network PMD.
>>
>> This version of the driver supports Solarflare SFN7xxx and SFN8xxx
>> families of 10/40 Gbps adapters.
>>
>> libefx is a platform-independent library to implement drivers for
>> Solarflare network adapters. It provides unified adapter family
>> independent interface (if possible). FreeBSD [1] and illumos [2]
>> drivers are built on top of the library.
>>
>> The patch series could be logically structured into 5 sub-series:
>>   1. (1) add the driver skeleton including documentation
>>   2. (2-30) import libefx and include it in build with the latest patch
>>   3. (31-43) implement minimal device level operations in steps
>>   4. (44-51) implement Rx subsystem
>>   5. (52-56) implement Tx subsystem
>>
>> Functional driver with multi-queue support capable to send and receive
>> traffic appears with the last patch in the series.
>>
>> The following design decisions are made during development:
>>
>>   1. Since libefx uses positive errno return codes, positive errno
>>  return codes are used inside the driver and coversion to negative
>>  is done on return from eth_dev_ops callbacks. We think that it
>>  is the less error-prone way.
>>
>>   2. Another Solarflare PMD with in-kernel part (for control operations)
>>  is considered and could be added in the future. Code for data path
>>  should be shared by these two drivers. libefx-based PMD is put into
>>  'efx' subdirectory to have a space for another PMD and shared code.
>>
>>   3. Own event queue (a way to deliver events from HW to host CPU) is
>>  used for house-keeping (e.g. link status notifications), each Tx
>>  and each Rx queue. No locks on datapath are requires in this case.
>>
>>   4. Alarm is used to periodically poll house-keeping event queue.
>>  The event queue is used to deliver link status change notifications,
>>  Rx/Tx queue flush events, SRAM events. It is not used on datapath.
>>  The event queue polling is protected using spin-lock since
>>  concurrent access from different contexts is possible (e.g. device
>>  stop when polling alarm is running).
>>
>> [1] https://svnweb.freebsd.org/base/head/sys/dev/sfxge/common/
>> [2] 
>> https://github.com/illumos/illumos-gate/tree/master/usr/src/uts/common/io/sfxge/common/
>>
>> ---
>>
>> Andrew Rybchenko (49):
>>net/sfc: libefx-based PMD stub sufficient to build and init
>>net/sfc: import libefx base
>>net/sfc: import libefx register definitions
>>net/sfc: import libefx filters support
>>net/sfc: import libefx MCDI definition
>>net/sfc: import libefx MCDI implementation
>>net/sfc: import libefx MCDI logging support
>>net/sfc: import libefx MCDI proxy authorization support
>>net/sfc: import libefx 5xxx/6xxx family support
>>net/sfc: import libefx SFN7xxx family support
>>net/sfc: import libefx SFN8xxx family support
>>net/sfc: import libefx diagnostics support
>>net/sfc: import libefx built-in selftest support
>>net/sfc: import libefx software per-queue statistics support
>>net/sfc: import libefx PHY flags control support
>>net/sfc: import libefx PHY statistics support
>>net/sfc: import libefx PHY LEDs control support
>>net/sfc: import libefx MAC statistics support
>>net/sfc: import libefx event prefetch support
>>net/sfc: import libefx Rx scatter support
>>net/sfc: import libefx RSS support
>>net/sfc: import libefx loopback control support
>>net/sfc: import libefx monitors statistics support
>>net/sfc: import libefx support to access monitors via MCDI
>>net/sfc: import libefx support for Rx packed stream mode
>>net/sfc: import libefx NVRAM support
>>net/sfc: import libefx VPD support
>>net/sfc: import libefx bootrom configuration support
>>net/sfc: import libefx licensing support
>>net/sfc: implement dummy callback to get device information
>>net/sfc: implement driver operation to init device on attach
>>net/sfc: add device configure and close stubs
>>net/sfc: add device configuration checks
>>net/sfc: implement device start and stop operations
>>net/sfc: make available resources estimation and allocation
>>net/sfc: interrupts support sufficient for event queue init
>>net/sfc: implement event queue support
>>net/sfc: implement EVQ dummy exception handling
>>net/sfc: maintain management event queue
>>net/sfc: periodic management EVQ polling using alarm
>>net/sfc: minimum port control sufficient to receive traffic
>>net/sfc: implement Rx subsystem stubs
>>net/sfc: check configured rxmode
>>net/sfc: implement Rx queue setup release operations
>>net/sfc: calculate Rx buffer size which may be used
>>net/sfc: validate Rx queue buffers setup
>>net/sfc: implement Rx queue start and stop operations
>>net/sfc: 

[dpdk-dev] [PATCH 00/56] Solarflare libefx-based PMD

2016-11-23 Thread Mcnamara, John


> -Original Message-
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Andrew Rybchenko
> Sent: Wednesday, November 23, 2016 7:50 AM
> To: Yigit, Ferruh ; dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 00/56] Solarflare libefx-based PMD
> 
> On 11/23/2016 03:02 AM, Ferruh Yigit wrote:
> > On 11/21/2016 3:00 PM, Andrew Rybchenko wrote:
> >> The patch series adds Solarflare libefx-based network PMD.
> >>
> >> This version of the driver supports Solarflare SFN7xxx and SFN8xxx
> >> families of 10/40 Gbps adapters.
> >>
> >> ...
> 
> > 2- Got following compile issues, not investigated, directly sharing
> here:
> >
> > b) for icc getting following warnings:
> > ===
> > icc: command line warning #10006: ignoring unknown option '-Wno-empty-
> body'
> > icc: command line warning #10006: ignoring unknown option
> > '-Waggregate-return'
> > icc: command line warning #10006: ignoring unknown option
> > '-Wbad-function-cast'
> > icc: command line warning #10006: ignoring unknown option '-Wnested-
> externs'
> >
> >
> > c) icc compiler errors:
> > ===
> > In file included from
> > .../x86_64-native-linuxapp-icc/include/rte_ethdev.h(185),
> >   from .../drivers/net/sfc/efx/sfc.h(35),
> >   from .../drivers/net/sfc/efx/sfc.c(37):
> > .../x86_64-native-linuxapp-icc/include/rte_ether.h(258): warning #2203:
> > cast discards qualifiers from target type
> >  uint16_t *from_words = (uint16_t *)(ea_from->addr_bytes);
> > ^
> >
> > .../drivers/net/sfc/efx/base/efx_mcdi.c(1157): warning #3179:
> > deprecated conversion of string literal to char* (should be const
> > char*)
> > .../drivers/net/sfc/efx/base/ef10_filter.c(1276): warning #188:
> > enumerated type mixed with another type
> >  : "unknown assertion";
> >  ^
> >
> >  filter_flags = 0;
> >   ^
> >
> > .../drivers/net/sfc/efx/base/efx_mcdi.c(1426): warning #188:
> > enumerated type mixed with another type
> >  epp->ep_fixed_port_type =
> >  ^
> >
> > .../drivers/net/sfc/efx/base/efx_nic.c(556): warning #188: enumerated
> > type mixed with another type
> >  enp->en_family = 0;
> 
> Yes, I have no ICC compilers. I'll try to fix these warnings, but I can't
> be sure without checking it.
> Also we cannot claim ICC supported without building and testing the
> generated binary.

Hi,

You can get a copy of ICC with a 30 day evaluation license here: 
https://software.intel.com/en-us/try-buy-tools

John




[dpdk-dev] [PATCH 00/56] Solarflare libefx-based PMD

2016-11-23 Thread Ferruh Yigit
On 11/23/2016 12:02 AM, Ferruh Yigit wrote:
> On 11/21/2016 3:00 PM, Andrew Rybchenko wrote:
>> The patch series adds Solarflare libefx-based network PMD.
>>
>> This version of the driver supports Solarflare SFN7xxx and SFN8xxx
>> families of 10/40 Gbps adapters.
>>
>> libefx is a platform-independent library to implement drivers for
>> Solarflare network adapters. It provides unified adapter family
>> independent interface (if possible). FreeBSD [1] and illumos [2]
>> drivers are built on top of the library.
>>
>> The patch series could be logically structured into 5 sub-series:
>>  1. (1) add the driver skeleton including documentation
>>  2. (2-30) import libefx and include it in build with the latest patch
>>  3. (31-43) implement minimal device level operations in steps
>>  4. (44-51) implement Rx subsystem
>>  5. (52-56) implement Tx subsystem
>>
>> Functional driver with multi-queue support capable to send and receive
>> traffic appears with the last patch in the series.
>>
>> The following design decisions are made during development:
>>
>>  1. Since libefx uses positive errno return codes, positive errno
>> return codes are used inside the driver and coversion to negative
>> is done on return from eth_dev_ops callbacks. We think that it
>> is the less error-prone way.
>>
>>  2. Another Solarflare PMD with in-kernel part (for control operations)
>> is considered and could be added in the future. Code for data path
>> should be shared by these two drivers. libefx-based PMD is put into
>> 'efx' subdirectory to have a space for another PMD and shared code.
>>
>>  3. Own event queue (a way to deliver events from HW to host CPU) is
>> used for house-keeping (e.g. link status notifications), each Tx
>> and each Rx queue. No locks on datapath are requires in this case.
>>
>>  4. Alarm is used to periodically poll house-keeping event queue.
>> The event queue is used to deliver link status change notifications,
>> Rx/Tx queue flush events, SRAM events. It is not used on datapath.
>> The event queue polling is protected using spin-lock since
>> concurrent access from different contexts is possible (e.g. device
>> stop when polling alarm is running).
>>
>> [1] https://svnweb.freebsd.org/base/head/sys/dev/sfxge/common/
>> [2] 
>> https://github.com/illumos/illumos-gate/tree/master/usr/src/uts/common/io/sfxge/common/
>>
>> ---
>>
>> Andrew Rybchenko (49):
>>   net/sfc: libefx-based PMD stub sufficient to build and init
>>   net/sfc: import libefx base
>>   net/sfc: import libefx register definitions
>>   net/sfc: import libefx filters support
>>   net/sfc: import libefx MCDI definition
>>   net/sfc: import libefx MCDI implementation
>>   net/sfc: import libefx MCDI logging support
>>   net/sfc: import libefx MCDI proxy authorization support
>>   net/sfc: import libefx 5xxx/6xxx family support
>>   net/sfc: import libefx SFN7xxx family support
>>   net/sfc: import libefx SFN8xxx family support
>>   net/sfc: import libefx diagnostics support
>>   net/sfc: import libefx built-in selftest support
>>   net/sfc: import libefx software per-queue statistics support
>>   net/sfc: import libefx PHY flags control support
>>   net/sfc: import libefx PHY statistics support
>>   net/sfc: import libefx PHY LEDs control support
>>   net/sfc: import libefx MAC statistics support
>>   net/sfc: import libefx event prefetch support
>>   net/sfc: import libefx Rx scatter support
>>   net/sfc: import libefx RSS support
>>   net/sfc: import libefx loopback control support
>>   net/sfc: import libefx monitors statistics support
>>   net/sfc: import libefx support to access monitors via MCDI
>>   net/sfc: import libefx support for Rx packed stream mode
>>   net/sfc: import libefx NVRAM support
>>   net/sfc: import libefx VPD support
>>   net/sfc: import libefx bootrom configuration support
>>   net/sfc: import libefx licensing support
>>   net/sfc: implement dummy callback to get device information
>>   net/sfc: implement driver operation to init device on attach
>>   net/sfc: add device configure and close stubs
>>   net/sfc: add device configuration checks
>>   net/sfc: implement device start and stop operations
>>   net/sfc: make available resources estimation and allocation
>>   net/sfc: interrupts support sufficient for event queue init
>>   net/sfc: implement event queue support
>>   net/sfc: implement EVQ dummy exception handling
>>   net/sfc: maintain management event queue
>>   net/sfc: periodic management EVQ polling using alarm
>>   net/sfc: minimum port control sufficient to receive traffic
>>   net/sfc: implement Rx subsystem stubs
>>   net/sfc: check configured rxmode
>>   net/sfc: implement Rx queue setup release operations
>>   net/sfc: calculate Rx buffer size which may be used
>>   net/sfc: validate Rx queue buffers setup
>>   net/sfc: implement Rx queue start and stop operations
>>   net/sfc: implement device callback to Rx burst of packets
>>   net/sfc: discard 

[dpdk-dev] [PATCH 00/56] Solarflare libefx-based PMD

2016-11-23 Thread Ferruh Yigit
On 11/21/2016 3:00 PM, Andrew Rybchenko wrote:
> The patch series adds Solarflare libefx-based network PMD.
> 
> This version of the driver supports Solarflare SFN7xxx and SFN8xxx
> families of 10/40 Gbps adapters.
> 
> libefx is a platform-independent library to implement drivers for
> Solarflare network adapters. It provides unified adapter family
> independent interface (if possible). FreeBSD [1] and illumos [2]
> drivers are built on top of the library.
> 
> The patch series could be logically structured into 5 sub-series:
>  1. (1) add the driver skeleton including documentation
>  2. (2-30) import libefx and include it in build with the latest patch
>  3. (31-43) implement minimal device level operations in steps
>  4. (44-51) implement Rx subsystem
>  5. (52-56) implement Tx subsystem
> 
> Functional driver with multi-queue support capable to send and receive
> traffic appears with the last patch in the series.
> 
> The following design decisions are made during development:
> 
>  1. Since libefx uses positive errno return codes, positive errno
> return codes are used inside the driver and coversion to negative
> is done on return from eth_dev_ops callbacks. We think that it
> is the less error-prone way.
> 
>  2. Another Solarflare PMD with in-kernel part (for control operations)
> is considered and could be added in the future. Code for data path
> should be shared by these two drivers. libefx-based PMD is put into
> 'efx' subdirectory to have a space for another PMD and shared code.
> 
>  3. Own event queue (a way to deliver events from HW to host CPU) is
> used for house-keeping (e.g. link status notifications), each Tx
> and each Rx queue. No locks on datapath are requires in this case.
> 
>  4. Alarm is used to periodically poll house-keeping event queue.
> The event queue is used to deliver link status change notifications,
> Rx/Tx queue flush events, SRAM events. It is not used on datapath.
> The event queue polling is protected using spin-lock since
> concurrent access from different contexts is possible (e.g. device
> stop when polling alarm is running).
> 
> [1] https://svnweb.freebsd.org/base/head/sys/dev/sfxge/common/
> [2] 
> https://github.com/illumos/illumos-gate/tree/master/usr/src/uts/common/io/sfxge/common/
> 
> ---
> 
> Andrew Rybchenko (49):
>   net/sfc: libefx-based PMD stub sufficient to build and init
>   net/sfc: import libefx base
>   net/sfc: import libefx register definitions
>   net/sfc: import libefx filters support
>   net/sfc: import libefx MCDI definition
>   net/sfc: import libefx MCDI implementation
>   net/sfc: import libefx MCDI logging support
>   net/sfc: import libefx MCDI proxy authorization support
>   net/sfc: import libefx 5xxx/6xxx family support
>   net/sfc: import libefx SFN7xxx family support
>   net/sfc: import libefx SFN8xxx family support
>   net/sfc: import libefx diagnostics support
>   net/sfc: import libefx built-in selftest support
>   net/sfc: import libefx software per-queue statistics support
>   net/sfc: import libefx PHY flags control support
>   net/sfc: import libefx PHY statistics support
>   net/sfc: import libefx PHY LEDs control support
>   net/sfc: import libefx MAC statistics support
>   net/sfc: import libefx event prefetch support
>   net/sfc: import libefx Rx scatter support
>   net/sfc: import libefx RSS support
>   net/sfc: import libefx loopback control support
>   net/sfc: import libefx monitors statistics support
>   net/sfc: import libefx support to access monitors via MCDI
>   net/sfc: import libefx support for Rx packed stream mode
>   net/sfc: import libefx NVRAM support
>   net/sfc: import libefx VPD support
>   net/sfc: import libefx bootrom configuration support
>   net/sfc: import libefx licensing support
>   net/sfc: implement dummy callback to get device information
>   net/sfc: implement driver operation to init device on attach
>   net/sfc: add device configure and close stubs
>   net/sfc: add device configuration checks
>   net/sfc: implement device start and stop operations
>   net/sfc: make available resources estimation and allocation
>   net/sfc: interrupts support sufficient for event queue init
>   net/sfc: implement event queue support
>   net/sfc: implement EVQ dummy exception handling
>   net/sfc: maintain management event queue
>   net/sfc: periodic management EVQ polling using alarm
>   net/sfc: minimum port control sufficient to receive traffic
>   net/sfc: implement Rx subsystem stubs
>   net/sfc: check configured rxmode
>   net/sfc: implement Rx queue setup release operations
>   net/sfc: calculate Rx buffer size which may be used
>   net/sfc: validate Rx queue buffers setup
>   net/sfc: implement Rx queue start and stop operations
>   net/sfc: implement device callback to Rx burst of packets
>   net/sfc: discard scattered packet on Rx correctly
> 
> Artem Andreev (2):
>   net/sfc: include libefx in build
>   net/sfc: implement device operation 

[dpdk-dev] [PATCH 00/56] Solarflare libefx-based PMD

2016-11-21 Thread Andrew Rybchenko
The patch series adds Solarflare libefx-based network PMD.

This version of the driver supports Solarflare SFN7xxx and SFN8xxx
families of 10/40 Gbps adapters.

libefx is a platform-independent library to implement drivers for
Solarflare network adapters. It provides unified adapter family
independent interface (if possible). FreeBSD [1] and illumos [2]
drivers are built on top of the library.

The patch series could be logically structured into 5 sub-series:
 1. (1) add the driver skeleton including documentation
 2. (2-30) import libefx and include it in build with the latest patch
 3. (31-43) implement minimal device level operations in steps
 4. (44-51) implement Rx subsystem
 5. (52-56) implement Tx subsystem

Functional driver with multi-queue support capable to send and receive
traffic appears with the last patch in the series.

The following design decisions are made during development:

 1. Since libefx uses positive errno return codes, positive errno
return codes are used inside the driver and coversion to negative
is done on return from eth_dev_ops callbacks. We think that it
is the less error-prone way.

 2. Another Solarflare PMD with in-kernel part (for control operations)
is considered and could be added in the future. Code for data path
should be shared by these two drivers. libefx-based PMD is put into
'efx' subdirectory to have a space for another PMD and shared code.

 3. Own event queue (a way to deliver events from HW to host CPU) is
used for house-keeping (e.g. link status notifications), each Tx
and each Rx queue. No locks on datapath are requires in this case.

 4. Alarm is used to periodically poll house-keeping event queue.
The event queue is used to deliver link status change notifications,
Rx/Tx queue flush events, SRAM events. It is not used on datapath.
The event queue polling is protected using spin-lock since
concurrent access from different contexts is possible (e.g. device
stop when polling alarm is running).

[1] https://svnweb.freebsd.org/base/head/sys/dev/sfxge/common/
[2] 
https://github.com/illumos/illumos-gate/tree/master/usr/src/uts/common/io/sfxge/common/

---

Andrew Rybchenko (49):
  net/sfc: libefx-based PMD stub sufficient to build and init
  net/sfc: import libefx base
  net/sfc: import libefx register definitions
  net/sfc: import libefx filters support
  net/sfc: import libefx MCDI definition
  net/sfc: import libefx MCDI implementation
  net/sfc: import libefx MCDI logging support
  net/sfc: import libefx MCDI proxy authorization support
  net/sfc: import libefx 5xxx/6xxx family support
  net/sfc: import libefx SFN7xxx family support
  net/sfc: import libefx SFN8xxx family support
  net/sfc: import libefx diagnostics support
  net/sfc: import libefx built-in selftest support
  net/sfc: import libefx software per-queue statistics support
  net/sfc: import libefx PHY flags control support
  net/sfc: import libefx PHY statistics support
  net/sfc: import libefx PHY LEDs control support
  net/sfc: import libefx MAC statistics support
  net/sfc: import libefx event prefetch support
  net/sfc: import libefx Rx scatter support
  net/sfc: import libefx RSS support
  net/sfc: import libefx loopback control support
  net/sfc: import libefx monitors statistics support
  net/sfc: import libefx support to access monitors via MCDI
  net/sfc: import libefx support for Rx packed stream mode
  net/sfc: import libefx NVRAM support
  net/sfc: import libefx VPD support
  net/sfc: import libefx bootrom configuration support
  net/sfc: import libefx licensing support
  net/sfc: implement dummy callback to get device information
  net/sfc: implement driver operation to init device on attach
  net/sfc: add device configure and close stubs
  net/sfc: add device configuration checks
  net/sfc: implement device start and stop operations
  net/sfc: make available resources estimation and allocation
  net/sfc: interrupts support sufficient for event queue init
  net/sfc: implement event queue support
  net/sfc: implement EVQ dummy exception handling
  net/sfc: maintain management event queue
  net/sfc: periodic management EVQ polling using alarm
  net/sfc: minimum port control sufficient to receive traffic
  net/sfc: implement Rx subsystem stubs
  net/sfc: check configured rxmode
  net/sfc: implement Rx queue setup release operations
  net/sfc: calculate Rx buffer size which may be used
  net/sfc: validate Rx queue buffers setup
  net/sfc: implement Rx queue start and stop operations
  net/sfc: implement device callback to Rx burst of packets
  net/sfc: discard scattered packet on Rx correctly

Artem Andreev (2):
  net/sfc: include libefx in build
  net/sfc: implement device operation to retrieve link info

Ivan Malov (5):
  net/sfc: provide basic stubs for Tx subsystem
  net/sfc: add function to check configured Tx mode
  net/sfc: add callbacks to set up and release Tx queues
  net/sfc: implement transmit path start / stop