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 C953BA04AA for ; Tue, 8 Sep 2020 11:20:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BFE35255; Tue, 8 Sep 2020 11:20:29 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 53F9E255; Tue, 8 Sep 2020 11:20:28 +0200 (CEST) Received: from mx1-us1.ppe-hosted.com (unknown [10.110.50.137]) by dispatch1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id E5DAD20076; Tue, 8 Sep 2020 09:20:27 +0000 (UTC) Received: from us4-mdac16-32.at1.mdlocal (unknown [10.110.49.216]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id E38B76009B; Tue, 8 Sep 2020 09:20:27 +0000 (UTC) X-Virus-Scanned: Proofpoint Essentials engine Received: from mx1-us1.ppe-hosted.com (unknown [10.110.49.102]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 6A6B3220070; Tue, 8 Sep 2020 09:20:27 +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 3349B6C0073; Tue, 8 Sep 2020 09:20:27 +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; Tue, 8 Sep 2020 10:20:23 +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; Tue, 8 Sep 2020 10:20:23 +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 0889KNgY009126; Tue, 8 Sep 2020 10:20:23 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id BA09B1613A9; Tue, 8 Sep 2020 10:20:23 +0100 (BST) From: Andrew Rybchenko To: CC: Igor Romanov , Date: Tue, 8 Sep 2020 10:20:22 +0100 Message-ID: <1599556822-32659-1-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1596721401-12884-1-git-send-email-arybchenko@solarflare.com> References: <1596721401-12884-1-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.6.1012-25652.003 X-TM-AS-Result: No-6.291200-8.000000-10 X-TMASE-MatchedRID: V/bRRvA2kMD6C0RbcP9ApomR/mpCAiHdRzUPAqhCjtiEWB8iuyGqCcAS M1FbRaAi9a/QQt4uldVguiLyoYfZO5XZBccONAXsGi6hW8XaLRnpVMb1xnESMo5JUK9UdYknrr5 TE4GLzk1Kp2trhZa6PI9CL1e45ag42Q9WnckGdj7C+o4YGuB7ewZyESFXAljfGlbrk2ODhoN8B7 N3YJDWDpxpF2s6sm8wgDLqnrRlXrZ8nn9tnqel2DsAVzN+Ov/sNcz1n4PoqpCxAWysHcDC588Cn 3Rix18MYlimZll6ZmQl6+06+cnZpg== X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--6.291200-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.6.1012-25652.003 X-MDID: 1599556828-8rjyuF4lvF-7 Subject: [dpdk-stable] [PATCH v2] 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 requested. 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 3a034412cd..1cc072f0d9 100644 --- a/drivers/net/sfc/base/efx_tunnel.c +++ b/drivers/net/sfc/base/efx_tunnel.c @@ -421,7 +421,7 @@ ef10_tunnel_reconfigure( { 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 @@ ef10_tunnel_reconfigure( */ 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, -- 2.17.1