[dpdk-dev] Solarflare PMD submission question

Andrew Rybchenko arybchenko at solarflare.com
Fri Oct 28 12:50:55 CEST 2016


Thomas,

On 10/27/2016 01:37 PM, Thomas Monjalon wrote:
> First of all, welcome to DPDK!

Thanks!

> 2016-10-27 09:34, Andrew Rybchenko:
>> we would like to include Solarflare libefx-based PMD in the DPDK 17.02
>> and start the upstreaming process.
>> The driver supports Solarflare SFN7xxx and SFN8xxx families of 10/40
>> Gbps adapters.
>> The driver has base driver. It is just fresh version of the same code
>> which is used in the FreeBSD [1], illumos [2] and some other Solarflare
>> drivers.
> Unfortunately it is common to have some big base drivers in DPDK.
> Note that some PMD rely on their kernel counterpart for the control path.
> It is a way to avoid code duplication.

Linux kernel sfc driver has control path functionality, but technically
it is a different code.

> As far as I understand, it is easier to share queues with DPDK from kernel
> when the device supports an IOMMU.
>
>> The question is how to submit the base driver which is pretty big. Mail
>> size of the patch which imports it is about 2 Mb.
> First answer is a question:
> Have you thought about cooperating with the kernel driver for your PMD?

Yes, we considered it, but decided that we need pure userspace driver since
the approach has its advantages: no specific dependencies from kernel,
the same PMD for Linux and FreeBSD etc.

> If you really cannot use this approach, then we have to maintain this
> whole base driver in DPDK.
> It will be easier to read, understand and reference if it is a bit split.
> Could you try to send it as 10 to 20 patches explaining the role of each
> part and giving some design details?

First of all I'd like to double check that it is clear that we discuss 
libefx
(base driver in terms of DPDK) import here. The PMD itself is already split
in 20+ patches.
The only thing which comes to my mind is to split libefx import on subsystem
basis (few files per subsystem). It is artificial and added files will 
be abandoned
until the patch which adds them into build. It could be something like:
  1. External interfaces definition
  2. Internal interfaces definition
  3. Registers definition (hardware interface)
  4. Management CPU interface definition (it is one file, but still big 
650K)
  5. Management CPU interface implementation
and so on for NIC global controls, interrupts, event queue, transmit, 
receive,
  filtering etc.

> It would be also really appreciated to provide a design documentation
> in doc/guides/nics. Are the datasheets open? A link in the doc would help.

We have a documentation which grows together with supported features,
but it is rather for users. Important design decisions (not so many) are
documented nearby corresponding code. Unfortunately there is no open
datasheets. Management CPU interface definition has comments.

> Please be prepare to work on several iterations of the patch series.

We have already passed a number of iterations internally, so it will not 
frighten.

> PS: the mailing list put emails exceeding 300KB into a moderation queue.


Nice to know that it is not completely rejected, since even if we split as

described above, we still have one candidate which will end-up in moderation

queue.


Thanks,

Andrew.




More information about the dev mailing list