linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] nfp: flower-ct: fix error return code in nfp_fl_ct_add_offload()
@ 2021-07-28  9:16 Yang Yingliang
  2021-07-28  9:36 ` Louis Peens
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Yang Yingliang @ 2021-07-28  9:16 UTC (permalink / raw)
  To: netdev, linux-kernel; +Cc: simon.horman, kuba, davem, louis.peens, yinjun.zhang

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] nfp: flower-ct: fix error return code in nfp_fl_ct_add_offload()
  2021-07-28  9:16 [PATCH net-next] nfp: flower-ct: fix error return code in nfp_fl_ct_add_offload() Yang Yingliang
@ 2021-07-28  9:36 ` Louis Peens
  2021-07-28  9:56   ` Dan Carpenter
  2021-07-28 11:48 ` Simon Horman
  2021-07-28 12:00 ` patchwork-bot+netdevbpf
  2 siblings, 1 reply; 6+ messages in thread
From: Louis Peens @ 2021-07-28  9:36 UTC (permalink / raw)
  To: Yang Yingliang, netdev, linux-kernel
  Cc: simon.horman, kuba, davem, yinjun.zhang, dan.carpenter



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 <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Ah, thanks Yang, I was just preparing a patch for this myself. This was first reported by
Dan Carpenter <dan.carpenter@oracle.com> 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 <louis.peens@corigine.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 {
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] nfp: flower-ct: fix error return code in nfp_fl_ct_add_offload()
  2021-07-28  9:36 ` Louis Peens
@ 2021-07-28  9:56   ` Dan Carpenter
  2021-07-28 10:08     ` Louis Peens
  0 siblings, 1 reply; 6+ messages in thread
From: Dan Carpenter @ 2021-07-28  9:56 UTC (permalink / raw)
  To: Louis Peens
  Cc: Yang Yingliang, netdev, linux-kernel, simon.horman, kuba, davem,
	yinjun.zhang

On Wed, Jul 28, 2021 at 11:36:43AM +0200, Louis Peens wrote:
> 
> 
> 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 <hulkci@huawei.com>
> > Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> Ah, thanks Yang, I was just preparing a patch for this myself. This was first reported by
> Dan Carpenter <dan.carpenter@oracle.com> 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?'

Just leave it, it's fine.

> 
> Anyway, for the patch itself the change looks good to me, thanks:
> Signed-off-by: Louis Peens <louis.peens@corigine.com>

Normally it would be Acked-by.  Signed-off-by means you handled the
patch and it's like signing a legal document that you didn't violate
SCO copyrights etc.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] nfp: flower-ct: fix error return code in nfp_fl_ct_add_offload()
  2021-07-28  9:56   ` Dan Carpenter
@ 2021-07-28 10:08     ` Louis Peens
  0 siblings, 0 replies; 6+ messages in thread
From: Louis Peens @ 2021-07-28 10:08 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Yang Yingliang, netdev, linux-kernel, simon.horman, kuba, davem,
	yinjun.zhang



On 2021/07/28 11:56, Dan Carpenter wrote:
> On Wed, Jul 28, 2021 at 11:36:43AM +0200, Louis Peens wrote:
>>
>>
>> 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 <hulkci@huawei.com>
>>> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
>> Ah, thanks Yang, I was just preparing a patch for this myself. This was first reported by
>> Dan Carpenter <dan.carpenter@oracle.com> 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?'
> 
> Just leave it, it's fine.
> 
>>
>> Anyway, for the patch itself the change looks good to me, thanks:
>> Signed-off-by: Louis Peens <louis.peens@corigine.com>
> 
> Normally it would be Acked-by.  Signed-off-by means you handled the
> patch and it's like signing a legal document that you didn't violate
> SCO copyrights etc.
ack :) Thanks for the clarification, the distinction does confuse me,
thinking about it this way would definitely help.

Regards
Louis Peens
> 
> regards,
> dan carpenter
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] nfp: flower-ct: fix error return code in nfp_fl_ct_add_offload()
  2021-07-28  9:16 [PATCH net-next] nfp: flower-ct: fix error return code in nfp_fl_ct_add_offload() Yang Yingliang
  2021-07-28  9:36 ` Louis Peens
@ 2021-07-28 11:48 ` Simon Horman
  2021-07-28 12:00 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2021-07-28 11:48 UTC (permalink / raw)
  To: Yang Yingliang
  Cc: netdev, linux-kernel, kuba, davem, louis.peens, yinjun.zhang

On Wed, Jul 28, 2021 at 05:16:31PM +0800, 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 <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>

Reviewed-by: Simon Horman <simon.horman@corigine.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] nfp: flower-ct: fix error return code in nfp_fl_ct_add_offload()
  2021-07-28  9:16 [PATCH net-next] nfp: flower-ct: fix error return code in nfp_fl_ct_add_offload() Yang Yingliang
  2021-07-28  9:36 ` Louis Peens
  2021-07-28 11:48 ` Simon Horman
@ 2021-07-28 12:00 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-07-28 12:00 UTC (permalink / raw)
  To: Yang Yingliang
  Cc: netdev, linux-kernel, simon.horman, kuba, davem, louis.peens,
	yinjun.zhang

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Wed, 28 Jul 2021 17:16:31 +0800 you 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 <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> 
> [...]

Here is the summary with links:
  - [net-next] nfp: flower-ct: fix error return code in nfp_fl_ct_add_offload()
    https://git.kernel.org/netdev/net-next/c/d80f6d6665a6

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-07-28 12:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-28  9:16 [PATCH net-next] nfp: flower-ct: fix error return code in nfp_fl_ct_add_offload() Yang Yingliang
2021-07-28  9:36 ` 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

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).