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 134DEA04A6 for ; Thu, 6 Aug 2020 15:43:35 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C0FEA1C036; Thu, 6 Aug 2020 15:43:34 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id 7679D2BB5; Thu, 6 Aug 2020 15:43:31 +0200 (CEST) Received: from mx1-us1.ppe-hosted.com (unknown [10.7.65.61]) by dispatch1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id BC9086004D; Thu, 6 Aug 2020 13:43:30 +0000 (UTC) Received: from us4-mdac16-60.ut7.mdlocal (unknown [10.7.66.51]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id BA2238009E; Thu, 6 Aug 2020 13:43:30 +0000 (UTC) X-Virus-Scanned: Proofpoint Essentials engine Received: from mx1-us1.ppe-hosted.com (unknown [10.7.66.37]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 720F980066; Thu, 6 Aug 2020 13:43:28 +0000 (UTC) Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 29610B4005A; Thu, 6 Aug 2020 13:43:28 +0000 (UTC) Received: from ukex01.SolarFlarecom.com (10.17.10.4) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 6 Aug 2020 14:43:24 +0100 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 6 Aug 2020 14:43:24 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (ukv-loginhost.uk.solarflarecom.com [10.17.10.39]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id 076DhOfI029213; Thu, 6 Aug 2020 14:43:24 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 541841616AE; Thu, 6 Aug 2020 14:43:24 +0100 (BST) From: Andrew Rybchenko To: CC: Igor Romanov , Date: Thu, 6 Aug 2020 14:43:21 +0100 Message-ID: <1596721401-12884-1-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.6.1012-25586.005 X-TM-AS-Result: No-5.597600-8.000000-10 X-TMASE-MatchedRID: m/bVzrXIIFn6C0RbcP9ApomR/mpCAiHdRzUPAqhCjtiEWB8iuyGqCcAS M1FbRaAi9a/QQt4uldVguiLyoYfZO5GlJ5QKyUiCuwdUMMznEA+FUOeR/MPu5pGhAvBSa2i/2yT G00/Sv02t2gtuWr1Lmvjqo53XHXOqT71gom+NFIOqNnzrkU+2mm7BSyDZmAnxuBNE2onCLJtMEe qL4x8+9+LzNWBegCW2wgn7iDBesS0gBwKKRHe+r6bvr1RTkj5Tm+IdmCQsfKcmYBX985vcA/axA xBepnKUriCYJT/tzR8= X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--5.597600-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.6.1012-25586.005 X-MDID: 1596721408-yWQ7zfjAs1Ca Subject: [dpdk-stable] [PATCH] net/sfc/base: fix tunnel configuration failure 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" From: Igor Romanov Tunnel configuration may fail because of insufficient access rights on a virtual function. Ignore the failure if a tunnel configuration with empty UDP ports is requrested. Fixes: 17551f6dffcc ("net/sfc/base: add API to control UDP tunnel ports") Cc: stable@dpdk.org Signed-off-by: Igor Romanov Signed-off-by: Andrew Rybchenko --- drivers/net/sfc/base/efx_tunnel.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/net/sfc/base/efx_tunnel.c b/drivers/net/sfc/base/efx_tunnel.c index 3a03441..1cc072f 100644 --- a/drivers/net/sfc/base/efx_tunnel.c +++ b/drivers/net/sfc/base/efx_tunnel.c @@ -421,7 +421,7 @@ { efx_tunnel_cfg_t *etcp = &enp->en_tunnel_cfg; efx_rc_t rc; - boolean_t resetting; + boolean_t resetting = B_FALSE; efsys_lock_state_t state; efx_tunnel_cfg_t etc; @@ -446,8 +446,14 @@ */ rc = efx_mcdi_set_tunnel_encap_udp_ports(enp, &etc, B_FALSE, &resetting); - if (rc != 0) - goto fail2; + if (rc != 0) { + /* + * Do not fail if the access is denied when no + * tunnel encap UDP ports are configured. + */ + if (rc != EACCES || etc.etc_udp_entries_num != 0) + goto fail2; + } /* * Although the caller should be able to handle MC reboot, -- 1.8.3.1