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 AE333A0093 for ; Fri, 22 May 2020 11:42:08 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A37961D945; Fri, 22 May 2020 11:42:08 +0200 (CEST) Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by dpdk.org (Postfix) with ESMTP id D17841D96A for ; Fri, 22 May 2020 11:42:06 +0200 (CEST) Received: by mail-wm1-f66.google.com with SMTP id u188so9202588wmu.1 for ; Fri, 22 May 2020 02:42:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=thKepgdyTGCpphNtdp6FVX3C8VFLJCZJf1dPx38efpE=; b=twP7ZWB3cz9ltTDlTOq0sLK7vd4IvWWKL9KnWY0OJufC5nzlscJnYbcTy5VOkjD1pl 5S15b6j39J5LVeCKcbrRaof4kKNbIdqyGmtbJYJJEeSVxnDiYn26xuWlW99nfG5TVfKg 8OKSofgEpM8eZtgomjEmeeIqcrvzzbmtxJcVYKaNVnBbT4i48VevxNwYD3V27hiS+gl9 FGOjDBXcZMMGG8G3APUFoT77rZuFpuJx7POKVS8KsrzSsIT9mtuwQdLbJgOFO+HyIT8W YlYkwh9Q9R+LDdu/cS1sQs1z9lmY16tx0D4LmV148iPpj4+cq0n0eAraJS7gL7RCGWvk 6yOQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=thKepgdyTGCpphNtdp6FVX3C8VFLJCZJf1dPx38efpE=; b=r2UFwbKy/RxmeYcCsiUduV3zGpWx0HrDH9v3S2C07LAQKJBewui6+BkZ/cETBZoFLe ly3SnVw/kEhS8sHnT0CNRFCbHnOtyWMYWB9GEnqMNuHVw1WSIUA+RbzvtHrRofELt14B FjlGA2KXKd4C4Hhe0W4qyFCkKP/6iX0s1uxJG9VxQ0x+R0pkQJCNU1jNel5LVEfsfIMu gpq79iD++z2EkxqhAxiw2H8yuHwjJSTB8Ytd57z28TCZG/1Al6DlMr1KRn8VvCzM6Uu8 gqL2yoOSYpN39q9WhT6aHdT4nghoHZi+d8OOmDMsBmQIVkRdEy+yRxdvuY3lXdAibuml +EKA== X-Gm-Message-State: AOAM532nv0sMFv0J4Q4tA+p+6CFpMpL4p+mRLdDs1imX0TO0blt0F2YZ 93xsy9fkXAsOd7Vn0o5HQns= X-Google-Smtp-Source: ABdhPJxikjmHokhvCx7b0E8VAI3a/iRAqPRWPAiThK+VEafB5W3Ztj+NbZ2nkz3yyRz5siCsw1Ju+g== X-Received: by 2002:a7b:c0d7:: with SMTP id s23mr12589827wmh.18.1590140526537; Fri, 22 May 2020 02:42:06 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id b65sm9563057wmc.30.2020.05.22.02.42.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 02:42:06 -0700 (PDT) From: luca.boccassi@gmail.com To: Darek Stojaczyk Cc: Gaetan Rivet , dpdk stable Date: Fri, 22 May 2020 10:40:12 +0100 Message-Id: <20200522094022.1025696-33-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200522094022.1025696-1-luca.boccassi@gmail.com> References: <20200519130549.112823-214-luca.boccassi@gmail.com> <20200522094022.1025696-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'pci: accept 32-bit domain numbers' has been queued to stable release 19.11.3 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/24/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From c4d58cd40cf7d8114ccdda5f62999b4a8c52d32f Mon Sep 17 00:00:00 2001 From: Darek Stojaczyk Date: Tue, 12 May 2020 15:30:57 +0200 Subject: [PATCH] pci: accept 32-bit domain numbers [ upstream commit 26cfc20feddd9fc5b87842d4c9bda6b9453e2c46 ] The parsing code was bailing on domains greater than UINT16_MAX, but domain numbers like that are still valid and present on some systems. One example is Intel VMD (Volume Management Device), which acts somewhat as a software-managed PCI switch and its upstream linux driver assigns all downstream devices a PCI domain of 0x10000. Parsing a BDF like 10000:01:00.0 was failing before. To fix it, increase the upper limit of domain number to UINT32_MAX. This matches the size of struct rte_pci_addr->domain (uint32). Fixes: af75078fece3 ("first public release") Signed-off-by: Darek Stojaczyk Acked-by: Gaetan Rivet --- lib/librte_pci/rte_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_pci/rte_pci.c b/lib/librte_pci/rte_pci.c index d1ab6b414d..ad2cdfebb2 100644 --- a/lib/librte_pci/rte_pci.c +++ b/lib/librte_pci/rte_pci.c @@ -72,9 +72,9 @@ pci_dbdf_parse(const char *input, struct rte_pci_addr *dev_addr) errno = 0; val = strtoul(in, &end, 16); - if (errno != 0 || end[0] != ':' || val > UINT16_MAX) + if (errno != 0 || end[0] != ':' || val > UINT32_MAX) return -EINVAL; - dev_addr->domain = (uint16_t)val; + dev_addr->domain = (uint32_t)val; in = end + 1; in = get_u8_pciaddr_field(in, &dev_addr->bus, ':'); if (in == NULL) -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-22 10:37:40.562013852 +0100 +++ 0033-pci-accept-32-bit-domain-numbers.patch 2020-05-22 10:37:39.240414721 +0100 @@ -1,8 +1,10 @@ -From 26cfc20feddd9fc5b87842d4c9bda6b9453e2c46 Mon Sep 17 00:00:00 2001 +From c4d58cd40cf7d8114ccdda5f62999b4a8c52d32f Mon Sep 17 00:00:00 2001 From: Darek Stojaczyk Date: Tue, 12 May 2020 15:30:57 +0200 Subject: [PATCH] pci: accept 32-bit domain numbers +[ upstream commit 26cfc20feddd9fc5b87842d4c9bda6b9453e2c46 ] + The parsing code was bailing on domains greater than UINT16_MAX, but domain numbers like that are still valid and present on some systems. One example is Intel VMD (Volume Management Device), which acts somewhat @@ -14,7 +16,6 @@ struct rte_pci_addr->domain (uint32). Fixes: af75078fece3 ("first public release") -Cc: stable@dpdk.org Signed-off-by: Darek Stojaczyk Acked-by: Gaetan Rivet