On 9/15/2023 7:37 PM, Morten Brørup wrote:
>> From: Ferruh Yigit [mailto:ferruh.yi...@amd.com]
>> Sent: Friday, 15 September 2023 17.55
>>
>> On 9/8/2023 5:07 PM, Mykola Kostenok wrote:
>>> From: Christian Koue Muf <c...@napatech.com>
>>>
>>> The NTNIC PMD does not rely on a kernel space Napatech driver,
>>> thus all defines related to the register layout is part of the PMD
>>> code, which will be added in later commits.
>>>
>>> Signed-off-by: Christian Koue Muf <c...@napatech.com>
>>> Reviewed-by: Mykola Kostenok <mko-...@napatech.com>
>>>
>>
>> Hi Mykola, Christiam,
>>
>> This PMD scares me, overall it is a big drop:
>> "249 files changed, 87128 insertions(+)"
>>
>> I think it is not possible to review all in one release cycle, and it is
>> not even possible to say if all code used or not.
>>
>> I can see code is already developed, and it is difficult to restructure
>> developed code, but restructure it into small pieces really helps for
>> reviews.
>>
>>
>> Driver supports good list of features, can it be possible to distribute
>> upstream effort into multiple release.
>> Starting from basic functionality and add features gradually.
>> Target for this release can be providing datapath, and add more if we
>> have time in the release, what do you think?
>>
>>
>> Also there are large amount of base code (HAL / FPGA code), instead of
>> adding them as a bulk, relevant ones with a feature can be added with
>> the feature patch, this eliminates dead code in the base code layer,
>> also helps user/review to understand the link between driver code and
>> base code.
> 
> Jumping in here with an opinion about welcoming new NIC vendors to the 
> community:
> 
> Generally, if a NIC vendor supplies a PMD for their NIC, I expect the vendor 
> to take responsibility for the quality of the PMD, including providing a 
> maintainer and support backporting of fixes to the PMD in LTS releases. This 
> should align with the vendor's business case for upstreaming their driver.
> 
> If the vendor provides one big patch series, which may be difficult to 
> understand/review, the fallout mainly hits the vendor's customers (and thus 
> the vendor's support organization), not the community as a whole.
> 

Hi Morten,

I was thinking same before making my above comment, what happens if
vendors submit as one big patch and when a problem occurs we can ask
owner to fix. Probably this makes vendor happy and makes my life (or any
other maintainer's life) easier, it is always easier to say yes.


But I come up with two main reasons to ask for a rework:

1- Technically any vendor can deliver their software to their customers
via a public git repository, they don't have to upstream to dpdk.org,
but upstreaming has many benefits.

One of those benefits is upstreaming provides a quality assurance for
vendor's customers (that is why customer can be asking for this, as we
are having in many cases), and this quality assurance comes from
additional eyes reviewing the code and guiding vendors for the DPDK
quality standards (some vendors already doing pretty good, but new ones
sometimes requires hand-holding).

If driver is one big patch series, it is practically not possible to
review it, I can catch a few bits here or there, you may some others,
but practically it will be merged without review, and we will fail on
our quality assurance task.

2- Make code more accessible to the rest of the world.

When it is a big patch, code can be functional but lots of details,
reasoning, relation between components gets lost, which makes it even
harder for an external developer, like me, to understand it (I am a mere
guinea pig here :).

If a customer would like to add a feature themselves, or fix something,
even after vendor no more working on that product anymore, customer
needs to understand the code or some reasoning in the code.
Or if someone wants to backport the driver to rust, or a DPDK developer
wants to do a rework that requires updating all drivers, or a tester
would like to analyze the code to figure out behavior difference of the
devices. I think I have witness all above cases in real life.

If driver is split into more patches, it makes patch easier to
understand which makes code practically more accessible to other
developers that are not expert in driver.


Overall, yes splitting patch takes time and effort, and yes this is an
overhead for a code that is already developed, but I think benefit is
big so it worth doing the task.


> We, the community, should not make it too difficult for vendors trying to 
> upstream their drivers. I certainly consider it unreasonable to ask a vendor 
> to postpone the release of some existing features by effectively an entire 
> year (considering that only LTS releases are relevant for most of us) because 
> we want the vendor to refactor the patch series to match our preferences 
> within an unrealistic timeframe.
> 

Agree to not make upstreaming difficult for new vendors, and indeed we
are encouraging more vendors to be upstream their code, this is in best
interest of both sides.

Distributing upstreaming effort to a year was just a suggestion, it can
go in earlier as it is becomes ready but I can see it will take time to
split driver into features and upstream them.

As I am from a vendor too, I can understand the product/customer
pressure, but I hope this approach can encourage vendors start
upstreaming early or even better upstream as they develop the code.


>>
>>
>> As far as I understand last patch opens a socket interface and an
>> external application can sent control commands via this interface.
>> I am not sure about this side control channel, what is missing in the
>> DPDK API? Can we try to address them in the DPDK layer instead of a
>> driver specific solution?
> 
> That would be great.
> 
> AFAIK, other vendors also has a bunch of out-of-band communication, e.g. 
> magical EAL parameters to the MLX drivers. So let's not be too hard on the 
> newcomers. ;-)
> 

I did some thinking for this one too,

As we are in userspace, it is easy to have side control channel, and
this can make users life easy, so this is a practical thing to do.
(Indeed there are already some ways to do this, without PMD exposing a
socket interface.)

But this also reduces effort developers putting on DPDK layer solution,
because it is always easier to add more support to the driver only.
And overall this reduces portability of the DPDK application, each
application becomes unique to a device (This is a bad thing, but I also
need some feedback how bad it is in real life.)

To balance this, we said if a feature is too specific to a device, it
can add device specific API and this is better than device specific
features pollute the common, most used code. And push back to introduce
more new PMD specific APIs unless it is really needed.

But creating a socket interface directly from the driver is more than
PMD specific API. Technically application control interface can rely
completely to this. Even we assume this is not for control, but just for
debug, I can see it can be useful for debug and again practical thing to
do, I am still not sure how much it hurts if each driver has a custom
socket interface for their debug needs.

Overall it makes more sense to me to have a unified/common interface
from drivers to DPDK applications, which is through the ethdev layer.
And improve and extend the ethdev layer to satisfy driver needs.

In this specific example, I am for rejecting the socket interface patch,
but I would like to get more feedback from @techboard.


And related to not being too hard on the newcomers, unrelated to being a
newcomer or not, if a process/feature/approach approved once, some
others will point to it and will ask to do the same which is fair in
their perspective. I had multiple instance of this in the past.

Of course we are being easy to newcomers but not in a way to allow code
that we believe is not good thing to do, but going easy on process may be :)


>>
>>
>> Thanks,
>> ferruh
> 
> Thank you, Ferruh, for taking good care of the community by providing 
> constructive feedback like this to new NIC vendors!
> 
> Please note that my feedback is entirely process related. I didn’t review the 
> driver, so I have no technical comments to the patch series.
> 
> -Morten
> 

Reply via email to