From: Andrew Rybchenko <arybchenko@solarflare.com>
To: <dev@dpdk.org>
Cc: Igor Romanov <igor.romanov@oktetlabs.ru>, <stable@dpdk.org>
Subject: [dpdk-dev] [PATCH] net/sfc/base: fix tunnel configuration failure
Date: Thu, 6 Aug 2020 14:43:21 +0100 [thread overview]
Message-ID: <1596721401-12884-1-git-send-email-arybchenko@solarflare.com> (raw)
From: Igor Romanov <igor.romanov@oktetlabs.ru>
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 <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
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
next reply other threads:[~2020-08-06 13:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-06 13:43 Andrew Rybchenko [this message]
2020-09-08 9:20 ` [dpdk-dev] [PATCH v2] " Andrew Rybchenko
2020-09-18 12:02 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1596721401-12884-1-git-send-email-arybchenko@solarflare.com \
--to=arybchenko@solarflare.com \
--cc=dev@dpdk.org \
--cc=igor.romanov@oktetlabs.ru \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).