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 29C52A056D for ; Thu, 12 Mar 2020 18:21:13 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 26EF11C05C; Thu, 12 Mar 2020 18:21:06 +0100 (CET) Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by dpdk.org (Postfix) with ESMTP id DFBE91C036 for ; Thu, 12 Mar 2020 18:21:01 +0100 (CET) Received: by mail-pf1-f194.google.com with SMTP id i13so3589208pfe.3 for ; Thu, 12 Mar 2020 10:21:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NSbxM1vchD+NHe5eMTr/oEXrivU0x2mi9+eBV5zkU+k=; b=qDJr+RwKX4J7VF53nVrmlyfBg5Z2AimwjLEkp3OWs0GiyrWZNxcxd3yjQ1kbdZEkA7 muGNxTLpBsd4o7xwSy27c+e8dZh519YLFQbU2wUXFJuLTt+lj37P7PaJJl4RQg0AXjye dtAZw/exeFTgax8cdpUDHQ2Kbd/oS1zbvgAdUlflkM7YEHldlqBpxzVGHbi4yuDAlZeG DjmlAQzfyxzkuNkE9rV4BghQMcNfY//Jk12rcdu1vn/TJUehIQbafoeNd3i+eP/cKNLy KGOGS76Y2EOdZk40QYT/5vYevDlzeKD8N3HlWY2sb0hqPL0qz/BqhlwqhJtam5ipEUI9 EfpQ== 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=NSbxM1vchD+NHe5eMTr/oEXrivU0x2mi9+eBV5zkU+k=; b=PqwVj2ED7TL183FAyHsyC1aLkrV1uFLoBjbNguNyzblJt1epmtcNMBnl997CV3Hlkx DJSbP/Ay6ldizZSwv4R4eXn8ndzfJjOwwTgJETLNZobizaz3EzrB+dTZu4UScW0Gu6N7 WvyqHaWvfZAGh6EEIbH/RLzUkxJQtTGvGqeZRt4uImL4xWMo7aTwYjyOYDJuqZWh9rPF DeEZEEPwXXo7vGEqAo4fWWSOpR8+rlSxUWzF0CJmVfdSacQf24y4cgBu8liveOZ2pq5H 9BYTwsg6L/krDMxQAW9dSA3McEhkaW1KAyX+r05SnutIA30HEvy8+FRgQcCF+mZGmlo7 cl/w== X-Gm-Message-State: ANhLgQ1Ct0V3w6ShbsKmE/ksDR7tAMTE/7ISUxpIR59a8R/fNAYqKM3U aaWmoaqPf5k8kPCj93Ad2zpndA== X-Google-Smtp-Source: ADFU+vvDNNHXI0wSNwgll97i1/R9fANFsrLZQ2kaTJcViy7qov30UV+x0VkmVoJijsswucVrM07+mg== X-Received: by 2002:a63:5847:: with SMTP id i7mr8681666pgm.127.1584033661122; Thu, 12 Mar 2020 10:21:01 -0700 (PDT) Received: from hermes.corp.microsoft.com (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id v1sm9447511pjy.35.2020.03.12.10.20.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Mar 2020 10:21:00 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , matan@mellanox.com, stable@dpdk.org Date: Thu, 12 Mar 2020 10:20:45 -0700 Message-Id: <20200312172047.19973-6-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200312172047.19973-1-stephen@networkplumber.org> References: <20200312172047.19973-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH 5/7] examples/l3fwd-power: block attempts to use owned ports 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" If a ethdev port is in use for a sub device, then it should not be allowed in the portmask of l3fwd. Fixes: 5b7ba31148a8 ("ethdev: add port ownership") Cc: matan@mellanox.com Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger --- examples/l3fwd-power/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index c7fe0ec03495..3a8a7277cb0a 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -1396,6 +1396,10 @@ check_port_config(void) portid); return -1; } + if (!rte_eth_dev_is_owned_by(portid, RTE_ETH_DEV_NO_OWNER)) { + printf("port %u is already in use\n", portid); + return -1; + } } return 0; } -- 2.20.1