From: Yang Yingliang <yangyingliang@huawei.com>
To: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <simon.horman@corigine.com>, <kuba@kernel.org>,
<davem@davemloft.net>, <louis.peens@corigine.com>,
<yinjun.zhang@corigine.com>
Subject: [PATCH net-next] nfp: flower-ct: fix error return code in nfp_fl_ct_add_offload()
Date: Wed, 28 Jul 2021 17:16:31 +0800 [thread overview]
Message-ID: <20210728091631.2421865-1-yangyingliang@huawei.com> (raw)
If nfp_tunnel_add_ipv6_off() fails, it should return error code
in nfp_fl_ct_add_offload().
Fixes: 5a2b93041646 ("nfp: flower-ct: compile match sections of flow_payload")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
drivers/net/ethernet/netronome/nfp/flower/conntrack.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/netronome/nfp/flower/conntrack.c b/drivers/net/ethernet/netronome/nfp/flower/conntrack.c
index 1ac3b65df600..bfd7d1c35076 100644
--- a/drivers/net/ethernet/netronome/nfp/flower/conntrack.c
+++ b/drivers/net/ethernet/netronome/nfp/flower/conntrack.c
@@ -710,8 +710,10 @@ static int nfp_fl_ct_add_offload(struct nfp_fl_nft_tc_merge *m_entry)
dst = &gre_match->ipv6.dst;
entry = nfp_tunnel_add_ipv6_off(priv->app, dst);
- if (!entry)
+ if (!entry) {
+ err = -ENOMEM;
goto ct_offload_err;
+ }
flow_pay->nfp_tun_ipv6 = entry;
} else {
@@ -760,8 +762,10 @@ static int nfp_fl_ct_add_offload(struct nfp_fl_nft_tc_merge *m_entry)
dst = &udp_match->ipv6.dst;
entry = nfp_tunnel_add_ipv6_off(priv->app, dst);
- if (!entry)
+ if (!entry) {
+ err = -ENOMEM;
goto ct_offload_err;
+ }
flow_pay->nfp_tun_ipv6 = entry;
} else {
--
2.25.1
next reply other threads:[~2021-07-28 9:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-28 9:16 Yang Yingliang [this message]
2021-07-28 9:36 ` [PATCH net-next] nfp: flower-ct: fix error return code in nfp_fl_ct_add_offload() Louis Peens
2021-07-28 9:56 ` Dan Carpenter
2021-07-28 10:08 ` Louis Peens
2021-07-28 11:48 ` Simon Horman
2021-07-28 12:00 ` patchwork-bot+netdevbpf
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=20210728091631.2421865-1-yangyingliang@huawei.com \
--to=yangyingliang@huawei.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=louis.peens@corigine.com \
--cc=netdev@vger.kernel.org \
--cc=simon.horman@corigine.com \
--cc=yinjun.zhang@corigine.com \
/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).