Thread (6 messages) flat view 6 messages, 5 authors, 2021-07-28

Re: [PATCH net-next] nfp: flower-ct: fix error return code in nfp_fl_ct_add_offload()

From: Louis Peens <hidden>
Date: 2021-07-28 09:37:38
Also in: lkml


On 2021/07/28 11:16, Yang Yingliang wrote:
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 <redacted>
Signed-off-by: Yang Yingliang <redacted>
Ah, thanks Yang, I was just preparing a patch for this myself. This was first reported by
Dan Carpenter [off-list ref] on 26 Jul 2021 (added to CC).

	'Hello Louis Peens,

	The patch 5a2b93041646: "nfp: flower-ct: compile match sections of
	flow_payload" from Jul 22, 2021, leads to the following static
	checker warning:
	.....'

I'm not sure what the usual procedure would be for this, I would think adding
another "Reported-by" line would be sufficient?

Anyway, for the patch itself the change looks good to me, thanks:
Signed-off-by: Louis Peens <redacted>
quoted hunk ↗ jump to hunk
---
 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 {
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help