DPDK usage discussions
 help / color / mirror / Atom feed
From: "Lukáš Šišmiš" <sismis@cesnet.cz>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: users@dpdk.org, dsosnowski@nvidia.com, viacheslavo@nvidia.com
Subject: Re: Determining vendor and model from the port ID
Date: Tue, 25 Mar 2025 22:17:39 +0700	[thread overview]
Message-ID: <fb59d559-e77f-4f50-9421-7bf09b04caff@cesnet.cz> (raw)
In-Reply-To: <20250325070749.0f2e3d93@hermes.local>

[-- Attachment #1: Type: text/plain, Size: 1926 bytes --]


On 3/25/25 21:07, Stephen Hemminger wrote:
> On Tue, 25 Mar 2025 20:32:53 +0700
> Lukáš Šišmiš <sismis@cesnet.cz> wrote:
>
>> Hello all,
>>
>> I am trying to determine what is the vendor and model of the port ID
>> that I am interacting with but all references lead me to an obsolete API.
>>
>> The goal is to execute specific code only when I am dealing with
>> Mellanox ConnectX-4-family cards. Longer explanation below.
>>
>> I would like to access "struct rte_pci_id" but it always seems hidden
>> only on the driver level.
>>
>> Is there any way how to approach this?
>>
>>
>> Longer explanation of the problem:
>>
>> In https://github.com/OISF/suricata/pull/12654 I am using dev_info to
>> get the maximum number of allowed TX descriptors for the port that is
>> advertised by the PMD. But when I set the actual number of TX
>> descriptors then the driver complains "minimal data inline requirements
>> (18) are not satisfied (12) on port 0, try the smaller Tx queue size
>> (32768)". However, this problem occurs only on ConnectX-4 family and not
>> on CX5/6/7 (that's why I cannot limit this to just mlx5 PMD).
>>
>> Alternatively, can this be fixed/addressed directly in the MLX5 PMD?
>> MLX5 PMD needs to advertise 16384 TX descriptors as the maximum only for
>> ConnectX-4 family.
>> (Putting Darius, Viacheslav in the loop, please reassign if needed)
>>
>> Thank you.
>>
>> Best,
>>
>> Lukas
>>
> The device name contains the PCI id.
> Use rte_eth_dev_get_name_by_port(uint16_t port_id, char *name);

Not really, it also confused me but PCI ID is not the same as PCI 
address. PCI address changes as the system desires whereas PCI ID should 
be device-specific information that is the same across all instances of 
the same model. lspci -nn is a good example, look at the trailing 
numbers, the first one is the vendor ID and the second one is model number.


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5986 bytes --]

  reply	other threads:[~2025-03-25 15:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-25 13:32 Lukáš Šišmiš
2025-03-25 14:07 ` Stephen Hemminger
2025-03-25 15:17   ` Lukáš Šišmiš [this message]
2025-03-25 15:57 ` Slava Ovsiienko
2025-03-28 12:52   ` Lukáš Šišmiš
2025-03-31 13:54     ` Slava Ovsiienko

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=fb59d559-e77f-4f50-9421-7bf09b04caff@cesnet.cz \
    --to=sismis@cesnet.cz \
    --cc=dsosnowski@nvidia.com \
    --cc=stephen@networkplumber.org \
    --cc=users@dpdk.org \
    --cc=viacheslavo@nvidia.com \
    /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).