From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 694144647B for ; Tue, 25 Mar 2025 15:08:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3C10240B9C; Tue, 25 Mar 2025 15:08:07 +0100 (CET) Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by mails.dpdk.org (Postfix) with ESMTP id EE46B4027C for ; Tue, 25 Mar 2025 15:08:05 +0100 (CET) Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-223fd89d036so113991285ad.1 for ; Tue, 25 Mar 2025 07:08:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1742911685; x=1743516485; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=QicWPFauuJBlDJCuP0qpoG+RhrBL6EyCzb36XNmKS1Q=; b=KBirRvA9lp4jXTb90zK2Odli6QH22tBujt8Ln5bZ1oEL7CoGnEgFomqfoddKGmsa1b SSPSMcQHm158ITrtZXz7p6l87bTaHLSyLGA5kWw77+btWW0nevWAlHklsPG9Z09fHTUG L8Azjm7XEvfNOgH+6C1rqcVGdnt57VTPif623yY42q5bB2la1qqbYA9obRHU2EJE61nd rWOTXNN0wLfkZYbLiyXZuA0qJKWY2XX4Pt+ZmzsbtggsQEn13Hd1sZGUPJyz7TadhNYV 1gqFrLpR04So70KErtK9+R0hRNpQfyPJZejYNIcO2wvA8CsDM1K9lD4Cgtifx4Ed4tTy PulQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742911685; x=1743516485; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-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/HJD3wXGkw== X-Received: by 2002:a05:6a20:ad0c:b0:1f5:75a9:5255 with SMTP id adf61e73a8af0-1fe43477ca6mr28238330637.39.1742911684911; Tue, 25 Mar 2025 07:08:04 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af8a28003b2sm9084443a12.28.2025.03.25.07.08.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Mar 2025 07:08:04 -0700 (PDT) Date: Tue, 25 Mar 2025 07:07:49 -0700 From: Stephen Hemminger To: =?UTF-8?B?THVrw6HFoSDFoGnFoW1pxaE=?= Cc: users@dpdk.org, dsosnowski@nvidia.com, viacheslavo@nvidia.com Subject: Re: Determining vendor and model from the port ID Message-ID: <20250325070749.0f2e3d93@hermes.local> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org On Tue, 25 Mar 2025 20:32:53 +0700 Luk=C3=A1=C5=A1 =C5=A0i=C5=A1mi=C5=A1 wrote: > Hello all, >=20 > I am trying to determine what is the vendor and model of the port ID=20 > that I am interacting with but all references lead me to an obsolete API. >=20 > The goal is to execute specific code only when I am dealing with=20 > Mellanox ConnectX-4-family cards. Longer explanation below. >=20 > I would like to access "struct rte_pci_id" but it always seems hidden=20 > only on the driver level. >=20 > Is there any way how to approach this? >=20 >=20 > Longer explanation of the problem: >=20 > In https://github.com/OISF/suricata/pull/12654 I am using dev_info to=20 > get the maximum number of allowed TX descriptors for the port that is=20 > advertised by the PMD. But when I set the actual number of TX=20 > descriptors then the driver complains "minimal data inline requirements=20 > (18) are not satisfied (12) on port 0, try the smaller Tx queue size=20 > (32768)". However, this problem occurs only on ConnectX-4 family and not= =20 > on CX5/6/7 (that's why I cannot limit this to just mlx5 PMD). >=20 > Alternatively, can this be fixed/addressed directly in the MLX5 PMD?=20 > MLX5 PMD needs to advertise 16384 TX descriptors as the maximum only for= =20 > ConnectX-4 family. > (Putting Darius, Viacheslav in the loop, please reassign if needed) >=20 > Thank you. >=20 > Best, >=20 > Lukas >=20 The device name contains the PCI id. Use rte_eth_dev_get_name_by_port(uint16_t port_id, char *name);