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 EBD42A0562 for ; Thu, 2 Apr 2020 19:20:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 128731BF57; Thu, 2 Apr 2020 19:20:12 +0200 (CEST) Received: from mail-pj1-f66.google.com (mail-pj1-f66.google.com [209.85.216.66]) by dpdk.org (Postfix) with ESMTP id A1D4D1BEE4 for ; Thu, 2 Apr 2020 19:20:09 +0200 (CEST) Received: by mail-pj1-f66.google.com with SMTP id q16so39161pje.1 for ; Thu, 02 Apr 2020 10:20:09 -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=WOoBkVa4caNZLFoqQs8rTBhk4L5yWAR7OIx+1YexLi8=; b=XvupP6Iv+IiPzem5eLyG0Mk7GG8aLa7hc/BhQznBid8jVvpf8ynETSPLAQqq3vRJ/J ZfjBxfR3arY7BoFI7LEO3ZDoPVPDiQlDP4bkxfDUbpHiLb5VpLO44l3PDVozOcAF3V0M d+pK0KsdWbCVzz+xZhMfr3EWsDf2SnOFXxNjjsO/eErL8TLTZukbFNmCOe2+A8NTGGTZ n/pAh+uAlAchz8VgZ3I5IrYN5rQ3Dpkp5+EgTgPh3CgeSCmlxQ8GmqbEjVFqCOEDVVlf 6oBOELqNq4561ruBRpCzog4Bb7rYXNPzyziGnqQiM+er0krOnoVeatBDp4tIk8vsvKOu blJg== 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=WOoBkVa4caNZLFoqQs8rTBhk4L5yWAR7OIx+1YexLi8=; b=BQYVEYzgvU6eWxKD6r5M93s7G/ECM15GSWBUrpBw44P4yLV0qygUrgt3FPglCnpE3T bpEQn2QrXM8EQFKcScXkGRQKCvdzPEgzCf61WTIuIuEtxZBDhnl89LWai6cO/sFa58nI 1qSri95rAfzWvOXde8Tf7f6Ke+8bjnmCfI2/JFl62M1fw8nP3hXwYn0TgmYKCdxfrfeI HgrNvFxumRAAsVUUlNw1KBKK9ffLpBNLHjAo1c8n9e79Anw+EHaBeyRtBRBMZnjdJ2YZ FbeqXZxPnV1EdoIvtvB+3CqXVyONimiCrzhOBx3OsBUCFoxsghrxdUXINqd5+4/EZLI7 MCNg== X-Gm-Message-State: AGi0PuaC5vUdvS8EEntEsHmWVrdk6Bt02N9wUO7KKlfSokR105W6sX8q rGZdIYN32b9k5R7fyrjQ6fPJDg== X-Google-Smtp-Source: APiQypKWvtU4rNRQ/6S8HB3zFUkCHtSAVOCf65isNVt3PNq8su6STicQAELrM0Jjk43JacKUYh6k+w== X-Received: by 2002:a17:90a:1b6b:: with SMTP id q98mr4917395pjq.107.1585848008654; Thu, 02 Apr 2020 10:20:08 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id y28sm4152347pfp.128.2020.04.02.10.20.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 10:20:07 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , matan@mellanox.com, stable@dpdk.org Date: Thu, 2 Apr 2020 10:19:52 -0700 Message-Id: <20200402171953.13356-6-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200402171953.13356-1-stephen@networkplumber.org> References: <20200312172047.19973-1-stephen@networkplumber.org> <20200402171953.13356-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH v3 5/6] examples/l3fwd-power: make applicaton aware of port ownership 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..186d6ac8e271 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_owner_get(portid, NULL) == 0) { + printf("port %u is already in use\n", portid); + return -1; + } } return 0; } -- 2.20.1