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 2CAE8A0C41 for ; Tue, 30 Nov 2021 17:40:28 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 25E1541190; Tue, 30 Nov 2021 17:40:28 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id 262B541186 for ; Tue, 30 Nov 2021 17:40:27 +0100 (CET) Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 014373FFE1 for ; Tue, 30 Nov 2021 16:40:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638290427; bh=Ur6W/f8NuYC2Ywj11SkpbUINZsfX++kjGBHYad5lyt8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=G8RuRRg8XLHDk68bUGpEQ3XsuTbx7zzf3kSpNgnqSXJEoOKrZA2ah8Z8jkf7QvY/0 jYBVE9MnyHuG5j/+5Xq0NVAXIJjjUgYOTalaaEOB1y6kJuEwct3sAtwXSl1IP+dyWK GyDDq3Ja06pxngPZDQjlKR00h01mEQAUOI9F7DJt86Z2T+EJzWrBlgNSaHXgc9WJCa R3HJwAmezti7d1fPVTB3Keuf7VVgjpME6WLYHc4eCs0tE8W/FWrEgYL2BHeBYjsctw MZqLgsUay7phfQxV+SabTl/KnKx1DTgLI3EXJnwopBtUUuPp+2ZhDpypaFN/9vi/ZC F6mutLs1XqGRg== Received: by mail-ed1-f70.google.com with SMTP id 30-20020a508e5e000000b003f02e458b17so10722617edx.17 for ; Tue, 30 Nov 2021 08:40:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ur6W/f8NuYC2Ywj11SkpbUINZsfX++kjGBHYad5lyt8=; b=yDqdR0ql1GqmJMFT3moKISGpdcpfxb1gQ0b2ZX17KT/FZEFEFvs4oMaLKuP2KO4agG OlNQGwJ/TP22jabtTyrQstoRFXe7W7e912Tw1PjWmUHbeqofeF2/DSX2y8Ke9WJOf/WF vJlOcCJY2y4857mbKdQ90ViypcyIAyo4a/JS+AxdlVIQ2ZEJRF3ml3H1vudbxIqykpFV lTwX3cbFy7e38A3lxVdvu0XCn69nPbwOv5v39grOd3BPRhWJZXlJZUdTSE73GTYi1dGf R9UkbDeTB5415H9+FWeRX+OpoHJyU+wBspmDkJWUQeQGwVAu4PomvbBYFnTJh2wjA+zN +2LQ== X-Gm-Message-State: AOAM533abnvKHjTpxFJyy6Pa0GbV5BdAKqRsbO1e+/1okBdEpfaHFVAN a/Lo7ocQq+VoMQatAQJSjeOEydgIjf8sDmTvLX/blYQUStpW1SLPxIUpTHVGHSwRVnCGxutaPaX EL6jRSo2ZpUGu5pGr7b8lJZf8 X-Received: by 2002:a17:907:98f6:: with SMTP id ke22mr218859ejc.500.1638290426681; Tue, 30 Nov 2021 08:40:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJxaHd3H+sWOzwxuPUX3kykJd+it7EE/MpTKXX+55WaQUrh1PN0GvGZUZFvdHhe6azTZcmLJSw== X-Received: by 2002:a17:907:98f6:: with SMTP id ke22mr218829ejc.500.1638290426471; Tue, 30 Nov 2021 08:40:26 -0800 (PST) Received: from localhost.localdomain ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id c7sm9711627ejd.91.2021.11.30.08.40.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 08:40:25 -0800 (PST) From: christian.ehrhardt@canonical.com To: Hyong Youb Kim Cc: John Daley , dpdk stable Subject: patch 'net/enic: fix filter mode detection' has been queued to stable release 19.11.11 Date: Tue, 30 Nov 2021 17:34:48 +0100 Message-Id: <20211130163605.2460997-84-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> References: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Hi, FYI, your patch has been queued to stable release 19.11.11 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before December 10th 2021. 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. Queued patches are on a temporary branch at: https://github.com/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/72dd22208019fd848d18883a955376c68a59e385 Thanks. Christian Ehrhardt --- >From 72dd22208019fd848d18883a955376c68a59e385 Mon Sep 17 00:00:00 2001 From: Hyong Youb Kim Date: Tue, 12 Oct 2021 18:21:23 -0700 Subject: [PATCH] net/enic: fix filter mode detection [ upstream commit fb9274546120898933f225742d9e37530504e8f9 ] vnic_dev_capable_filter_mode() currently fails when CMD_CAPABILITY(CMD_ADD_FILTER) returns ERR_EPERM. In turn, this failure causes the driver initialization to fail. But, firmware may legitimately return ERR_EPERM. For example, VF vNIC returns ERR_EPERM when it does not support filtering at all. So, treat ERR_EPERM as "no filtering available" instead of an unexpected error. Fixes: 322b355f2183 ("net/enic/base: bring NIC interface functions up to date") Signed-off-by: Hyong Youb Kim Reviewed-by: John Daley --- drivers/net/enic/base/vnic_dev.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/net/enic/base/vnic_dev.c b/drivers/net/enic/base/vnic_dev.c index 899df07df7..5535aa8774 100644 --- a/drivers/net/enic/base/vnic_dev.c +++ b/drivers/net/enic/base/vnic_dev.c @@ -570,8 +570,8 @@ static int vnic_dev_flowman_enable(struct vnic_dev *vdev, u32 *mode, return 1; } -/* Determine the "best" filtering mode VIC is capaible of. Returns one of 4 - * value or 0 on error: +/* Determine the "best" filtering mode VIC is capable of. Returns one of 4 + * value or 0 if filtering is unavailble: * FILTER_FLOWMAN- flowman api capable * FILTER_DPDK_1- advanced filters availabile * FILTER_USNIC_IP_FLAG - advanced filters but with the restriction that @@ -606,6 +606,14 @@ int vnic_dev_capable_filter_mode(struct vnic_dev *vdev, u32 *mode, args[0] = CMD_ADD_FILTER; args[1] = 0; err = vnic_dev_cmd_args(vdev, CMD_CAPABILITY, args, 2, 1000); + /* + * ERR_EPERM may be returned if, for example, vNIC is + * on a VF. It simply means no filtering is available + */ + if (err == -ERR_EPERM) { + *mode = 0; + return 0; + } if (err) return err; max_level = args[1]; -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-30 16:50:10.827337237 +0100 +++ 0084-net-enic-fix-filter-mode-detection.patch 2021-11-30 16:50:05.862874058 +0100 @@ -1 +1 @@ -From fb9274546120898933f225742d9e37530504e8f9 Mon Sep 17 00:00:00 2001 +From 72dd22208019fd848d18883a955376c68a59e385 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit fb9274546120898933f225742d9e37530504e8f9 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index ab6e05739b..9c42595ced 100644 +index 899df07df7..5535aa8774 100644 @@ -27 +28 @@ -@@ -644,8 +644,8 @@ static int vnic_dev_flowman_enable(struct vnic_dev *vdev, uint32_t *mode, +@@ -570,8 +570,8 @@ static int vnic_dev_flowman_enable(struct vnic_dev *vdev, u32 *mode, @@ -38 +39 @@ -@@ -680,6 +680,14 @@ int vnic_dev_capable_filter_mode(struct vnic_dev *vdev, uint32_t *mode, +@@ -606,6 +606,14 @@ int vnic_dev_capable_filter_mode(struct vnic_dev *vdev, u32 *mode,