From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 128C0A09E9; Fri, 11 Dec 2020 20:15:20 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2D0B7AC9E; Fri, 11 Dec 2020 20:15:18 +0100 (CET) Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) by dpdk.org (Postfix) with ESMTP id 94DB1AC9A; Fri, 11 Dec 2020 20:15:15 +0100 (CET) Received: by mail-lf1-f67.google.com with SMTP id a12so14809002lfl.6; Fri, 11 Dec 2020 11:15:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=DrInh6vZ12e1L3tRD4F6Cx4ek9+tOnFkHeLdzhC2vyY=; b=C9F7zMT2VUg7XVa4qyu68X3RaFUJAt44Jtxnr93X6mrvkrAho9mdxRyvNJ6Ew7Xhsy yLVz+/27V3IpeuaUBi69jE1+U1r4kUdeEsfIpZpSW/MFWqDH/ENBrhW5hoabfbaMp4Fg gF0U9/QKleGaFh4n4B4qWp9NwbhkhlSi8SolId96qbm+yUbeyc77fUyIz+G947Q2mZvK yf5v5mud1RvrbvGNYTcNZF/dA3vaRJVgrIMcxOUyBrqjX55p4NjHn09axWSGjllcGwLw imQI98g91P2tfMg+O2U3qDmFsLxvKCsCsYh+GD6WwcEKdIBontahddoApSbWM1gWkUg0 PZxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=DrInh6vZ12e1L3tRD4F6Cx4ek9+tOnFkHeLdzhC2vyY=; b=QvyWAe+kPTapvGfxxYfqjyXpfhUh2J22E71IGU9d57ab9Hxt5qPhSzJuHDnYsoLvje ebxWo6Wr3IRy71PTa3FHy3psLBGZiXHusrMgO3SQ5Ux03JTLq4OyNNTIs19pPhJOKnJi /jj/+njY22tXE4IkXYWuKAH81WemGUch9zo6ULdcstJG9hf35FK1/67VranzswkPy2MR YnWBoMMHzXQUcw4LKzWfqZD9E8WxpZR4T0lxX44Q98NNKO1vrmWOZShHfNIqv2vqGjmO tv6JEZhT4YqhmkErI0uA0tE2LYkkG4bQmm862rh2nbBMi0pKDYfzAAemtvA0K3KT5xT7 J7Gg== X-Gm-Message-State: AOAM532b+T/6SgPYmbaovkcLnFmFPCS8S9TLUcm7RlEmL5FijucampLj Yupdbd7CDw6KwULYvF5K/TpwYFN1mwUF0g== X-Google-Smtp-Source: ABdhPJzIGV8BJ9szWPVs3IPYca07GscmtlxI2uJjt5BEftkeEuUQUIsGH5oaQpn9SsWcKXC7l0+oWA== X-Received: by 2002:a05:6512:504:: with SMTP id o4mr5748106lfb.398.1607714113827; Fri, 11 Dec 2020 11:15:13 -0800 (PST) Received: from localhost.localdomain (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id t5sm983428lfc.79.2020.12.11.11.15.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Dec 2020 11:15:13 -0800 (PST) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Dmitry Kozlyuk , stable@dpdk.org, Tal Shnaiderman Date: Fri, 11 Dec 2020 22:15:04 +0300 Message-Id: <20201211191505.11693-1-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] pci/windows: fix limit for hardware ID X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hardware ID length is limited by MAX_DEVICE_ID_LEN [1]. No functional change is intended: new value is 200, and previous one has been 260. However, it's now correct and creates no bogus dependency on path limit. [1]: https://docs.microsoft.com/en-us/windows-hardware/drivers/install/hardware-ids Fixes: b762221ac24f ("bus/pci: support Windows with bifurcated drivers") Cc: stable@dpdk.org Cc: Tal Shnaiderman Signed-off-by: Dmitry Kozlyuk --- drivers/bus/pci/windows/pci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c index 33a5fb1d8..7130979e8 100644 --- a/drivers/bus/pci/windows/pci.c +++ b/drivers/bus/pci/windows/pci.c @@ -9,6 +9,7 @@ #include "private.h" #include "pci_netuio.h" +#include #include #if defined RTE_TOOLCHAIN_GCC && (__MINGW64_VERSION_MAJOR < 8) @@ -303,7 +304,7 @@ pci_scan_one(HDEVINFO dev_info, PSP_DEVINFO_DATA device_info_data) { struct rte_pci_device *dev; int ret = -1; - char pci_device_info[PATH_MAX]; + char pci_device_info[MAX_DEVICE_ID_LEN]; struct rte_pci_addr addr; struct rte_pci_id pci_id; @@ -314,7 +315,7 @@ pci_scan_one(HDEVINFO dev_info, PSP_DEVINFO_DATA device_info_data) memset(dev, 0, sizeof(*dev)); ret = get_pci_hardware_id(dev_info, device_info_data, - pci_device_info, PATH_MAX); + pci_device_info, sizeof(pci_device_info)); if (ret != 0) goto end; -- 2.29.2