DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@amd.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org, Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Subject: Re: [PATCH v2] ethdev: add Linux ethtool link mode conversion
Date: Fri, 1 Mar 2024 17:16:41 +0000	[thread overview]
Message-ID: <86341b1e-a20f-4ab3-84ac-a9d912fe5ff8@amd.com> (raw)
In-Reply-To: <1743963.yIU609i1g2@thomas>

On 3/1/2024 3:20 PM, Thomas Monjalon wrote:
> 01/03/2024 16:08, Ferruh Yigit:
>> On 3/1/2024 1:37 PM, Thomas Monjalon wrote:
>>> 01/03/2024 14:12, Ferruh Yigit:
>>>> On 2/29/2024 3:42 PM, Thomas Monjalon wrote:
>>>>> Speed capabilities of a NIC may be discovered through its Linux
>>>>> kernel driver. It is especially useful for bifurcated drivers,
>>>>> so they don't have to duplicate the same logic in the DPDK driver.
>>>>>
>>>>> Parsing ethtool speed capabilities is made easy thanks to
>>>>> the functions added in ethdev for internal usage only.
>>>>> Of course these functions work only on Linux,
>>>>> so they are not compiled in other environments.
>>>>>
>>>>> In order to ease parsing, the ethtool macro names are parsed
>>>>> externally in a shell command which generates a C array
>>>>> included in this patch.
>>>>> It also avoids to depend on a kernel version.
>>>>> This C array should be updated in future to get latest ethtool bits.
>>>>> Note it is easier to update this array than adding new cases
>>>>> in a parsing code.
>>>>>
>>>>> The types in the functions are following the ethtool type:
>>>>> uint32_t for bitmaps, and int8_t for the number of 32-bitmaps.
>>>>>
>>>>> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
>>>>> ---
>>>>>
>>>>> A follow-up patch will be sent to use these functions in mlx5.
>>>>> I suspect mana could use this parsing as well.
>>>>>
>>>>
>>>> Is the usecase driver get link info via ibverbs and convert it to DPDK
>>>> link info?
>>>
>>> The use case is to get capabilities from the kernel driver via ethtool ioctl.
>>>
>>
>> Sure, as it is adding kernel ethtool conversion, DPDK driver will get
>> link from kernel driver, thanks for clarification.
> 
> Yes the PMD uses ethtool API to get device capabilies.
> 
>>>> How complex or duplicated effort to get link info directly via DPDK
>>>> functions?
>>>
>>> This is done by the driver.
>>> This is how mlx5 driver is getting speed capabilities.
>>>
>>>> Because this approach is can be applied to only limited devices in DPDK
>>>> and solving an issue DPDK already has a solution, does it worth to the
>>>> code it adds?
>>>
>>> It is going to replace code in mlx5 driver.
>>> I could add this code in mlx5 driver,
>>> but it could help other drivers in future like mana.
>>
>> Why replace, is there anything to fix in the DPDK link get code?
> 
> There is nothing to fix in ethdev layer.
> I want to replace PMD code doing ethtool queries
> with something cleaner and easier to update.
> 

ack, I will proceed with the patch for -rc2


  reply	other threads:[~2024-03-01 17:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-29 12:34 [PATCH v1] " Thomas Monjalon
2024-02-29 15:42 ` [PATCH v2] " Thomas Monjalon
2024-02-29 16:45   ` Stephen Hemminger
2024-02-29 16:58     ` Morten Brørup
2024-02-29 17:38       ` Stephen Hemminger
2024-03-01 10:27         ` Thomas Monjalon
2024-03-01 13:12   ` Ferruh Yigit
2024-03-01 13:37     ` Thomas Monjalon
2024-03-01 15:08       ` Ferruh Yigit
2024-03-01 15:20         ` Thomas Monjalon
2024-03-01 17:16           ` Ferruh Yigit [this message]
2024-03-01 18:00           ` Stephen Hemminger
2024-03-03  9:36             ` Thomas Monjalon
2024-03-03  9:56 ` [PATCH v3] " Thomas Monjalon
2024-03-04 15:58   ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86341b1e-a20f-4ab3-84ac-a9d912fe5ff8@amd.com \
    --to=ferruh.yigit@amd.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).