* [PATCH] net/enic: adjust memory check and use in proper order
@ 2022-01-25 12:00 Weiguo Li
2022-01-26 22:00 ` John Daley (johndale)
2022-02-03 8:26 ` Weiguo Li
0 siblings, 2 replies; 9+ messages in thread
From: Weiguo Li @ 2022-01-25 12:00 UTC (permalink / raw)
To: johndale; +Cc: dev
Fixes: bb66d562aefc ("net/enic: share flow actions with same signature")
Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
drivers/net/enic/enic_fm_flow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/enic/enic_fm_flow.c b/drivers/net/enic/enic_fm_flow.c
index bf04d714d0..d8718d17ef 100644
--- a/drivers/net/enic/enic_fm_flow.c
+++ b/drivers/net/enic/enic_fm_flow.c
@@ -2521,11 +2521,11 @@ enic_action_handle_get(struct enic_flowman *fm, struct fm_action *action_in,
memcpy(fma, action_in, sizeof(*fma));
ah = calloc(1, sizeof(*ah));
- memcpy(&ah->key, action_in, sizeof(struct fm_action));
if (ah == NULL)
return rte_flow_error_set(error, ENOMEM,
RTE_FLOW_ERROR_TYPE_HANDLE,
NULL, "enic: calloc(fm-action)");
+ memcpy(&ah->key, action_in, sizeof(struct fm_action));
args[0] = FM_ACTION_ALLOC;
args[1] = fm->cmd.pa;
ret = flowman_cmd(fm, args, 2);
--
2.25.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH] net/enic: adjust memory check and use in proper order
2022-01-25 12:00 [PATCH] net/enic: adjust memory check and use in proper order Weiguo Li
@ 2022-01-26 22:00 ` John Daley (johndale)
2022-01-28 14:47 ` Ferruh Yigit
2022-02-03 8:26 ` Weiguo Li
1 sibling, 1 reply; 9+ messages in thread
From: John Daley (johndale) @ 2022-01-26 22:00 UTC (permalink / raw)
To: Weiguo Li; +Cc: dev
Reviewed-by: John Daley <johndale@cisco.com>
Thanks,
John
-----Original Message-----
From: Weiguo Li <liwg06@foxmail.com>
Sent: Tuesday, January 25, 2022 4:01 AM
To: John Daley (johndale) <johndale@cisco.com>
Cc: dev@dpdk.org
Subject: [PATCH] net/enic: adjust memory check and use in proper order
Fixes: bb66d562aefc ("net/enic: share flow actions with same signature")
Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
drivers/net/enic/enic_fm_flow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/enic/enic_fm_flow.c b/drivers/net/enic/enic_fm_flow.c index bf04d714d0..d8718d17ef 100644
--- a/drivers/net/enic/enic_fm_flow.c
+++ b/drivers/net/enic/enic_fm_flow.c
@@ -2521,11 +2521,11 @@ enic_action_handle_get(struct enic_flowman *fm, struct fm_action *action_in,
memcpy(fma, action_in, sizeof(*fma));
ah = calloc(1, sizeof(*ah));
- memcpy(&ah->key, action_in, sizeof(struct fm_action));
if (ah == NULL)
return rte_flow_error_set(error, ENOMEM,
RTE_FLOW_ERROR_TYPE_HANDLE,
NULL, "enic: calloc(fm-action)");
+ memcpy(&ah->key, action_in, sizeof(struct fm_action));
args[0] = FM_ACTION_ALLOC;
args[1] = fm->cmd.pa;
ret = flowman_cmd(fm, args, 2);
--
2.25.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] net/enic: adjust memory check and use in proper order
2022-01-26 22:00 ` John Daley (johndale)
@ 2022-01-28 14:47 ` Ferruh Yigit
2022-02-02 11:50 ` Thomas Monjalon
0 siblings, 1 reply; 9+ messages in thread
From: Ferruh Yigit @ 2022-01-28 14:47 UTC (permalink / raw)
To: John Daley (johndale), Weiguo Li; +Cc: dev
On 1/26/2022 10:00 PM, John Daley (johndale) wrote:
<...>
> Thanks,
> John
>
> -----Original Message-----
> From: Weiguo Li <liwg06@foxmail.com>
> Sent: Tuesday, January 25, 2022 4:01 AM
> To: John Daley (johndale) <johndale@cisco.com>
> Cc: dev@dpdk.org
> Subject: [PATCH] net/enic: adjust memory check and use in proper order
>
> Fixes: bb66d562aefc ("net/enic: share flow actions with same signature")
>
> Signed-off-by: Weiguo Li <liwg06@foxmail.com>
>
> Reviewed-by: John Daley <johndale@cisco.com>
>
Applied to dpdk-next-net/main, thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] net/enic: adjust memory check and use in proper order
2022-01-28 14:47 ` Ferruh Yigit
@ 2022-02-02 11:50 ` Thomas Monjalon
2022-02-03 10:57 ` Ferruh Yigit
0 siblings, 1 reply; 9+ messages in thread
From: Thomas Monjalon @ 2022-02-02 11:50 UTC (permalink / raw)
To: John Daley (johndale), Weiguo Li; +Cc: dev, Ferruh Yigit
> > Subject: [PATCH] net/enic: adjust memory check and use in proper order
> >
> > Fixes: bb66d562aefc ("net/enic: share flow actions with same signature")
> >
> > Signed-off-by: Weiguo Li <liwg06@foxmail.com>
> >
> > Reviewed-by: John Daley <johndale@cisco.com>
> >
> Applied to dpdk-next-net/main, thanks.
Please could we have a little of explanation in the commit log?
The title says "adjust [...] and use in proper order"
but I see only a move of the check.
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE:[PATCH] net/enic: adjust memory check and use in proper order
2022-01-25 12:00 [PATCH] net/enic: adjust memory check and use in proper order Weiguo Li
2022-01-26 22:00 ` John Daley (johndale)
@ 2022-02-03 8:26 ` Weiguo Li
1 sibling, 0 replies; 9+ messages in thread
From: Weiguo Li @ 2022-02-03 8:26 UTC (permalink / raw)
To: thomas; +Cc: dev
Hi Monjalon,
This fix only moves the memcpy after to null check.
so the misplaced of memcpy and null check is reordered.
I thought maybe it's too trival a fix to add more explanation.
Sorry if it makes any confusion.
(last mail is garbled in format)
-Weiguo
> -----Original Message-----
> From: "Thomas Monjalon" <thomas@monjalon.net>;
> Date: Wed, Feb 2, 2022 07:50 PM
> To: "John Daley (johndale)"<johndale@cisco.com>;"Weiguo Li"<liwg06@foxmail.com>;
> Cc: "dev"<dev@dpdk.org>;"Ferruh Yigit"<ferruh.yigit@intel.com>;
> Subject: Re: [PATCH] net/enic: adjust memory check and use in proper order
>
> > > Subject: [PATCH] net/enic: adjust memory check and use in proper order
> > >
> > > Fixes: bb66d562aefc ("net/enic: share flow actions with same signature")
> > >
> > > Signed-off-by: Weiguo Li <liwg06@foxmail.com>
> > >
> > > Reviewed-by: John Daley <johndale@cisco.com>
> > >
> > > Applied to dpdk-next-net/main, thanks.
> Please could we have a little of explanation in the commit log?
> The title says "adjust [...] and use in proper order"
> but I see only a move of the check.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] net/enic: adjust memory check and use in proper order
2022-02-02 11:50 ` Thomas Monjalon
@ 2022-02-03 10:57 ` Ferruh Yigit
2022-02-03 11:11 ` Thomas Monjalon
0 siblings, 1 reply; 9+ messages in thread
From: Ferruh Yigit @ 2022-02-03 10:57 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev, John Daley (johndale), Weiguo Li
On 2/2/2022 11:50 AM, Thomas Monjalon wrote:
>>> Subject: [PATCH] net/enic: adjust memory check and use in proper order
>>>
>>> Fixes: bb66d562aefc ("net/enic: share flow actions with same signature")
>>>
>>> Signed-off-by: Weiguo Li <liwg06@foxmail.com>
>>>
>>> Reviewed-by: John Daley <johndale@cisco.com>
>>>
>> Applied to dpdk-next-net/main, thanks.
>
> Please could we have a little of explanation in the commit log?
> The title says "adjust [...] and use in proper order"
> but I see only a move of the check.
>
>
Is following good? If so I can update it in next-net.
net/enic: fix dereference before null check
Move memcpy to 'ah->key' after 'ah' null check
Fixes: bb66d562aefc ("net/enic: share flow actions with same signature")
Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] net/enic: adjust memory check and use in proper order
2022-02-03 10:57 ` Ferruh Yigit
@ 2022-02-03 11:11 ` Thomas Monjalon
2022-02-03 11:22 ` Ferruh Yigit
0 siblings, 1 reply; 9+ messages in thread
From: Thomas Monjalon @ 2022-02-03 11:11 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: dev, John Daley (johndale), Weiguo Li
03/02/2022 11:57, Ferruh Yigit:
> On 2/2/2022 11:50 AM, Thomas Monjalon wrote:
> >>> Subject: [PATCH] net/enic: adjust memory check and use in proper order
> >>>
> >>> Fixes: bb66d562aefc ("net/enic: share flow actions with same signature")
> >>>
> >>> Signed-off-by: Weiguo Li <liwg06@foxmail.com>
> >>>
> >>> Reviewed-by: John Daley <johndale@cisco.com>
> >>>
> >> Applied to dpdk-next-net/main, thanks.
> >
> > Please could we have a little of explanation in the commit log?
> > The title says "adjust [...] and use in proper order"
> > but I see only a move of the check.
> >
> >
>
> Is following good? If so I can update it in next-net.
>
> net/enic: fix dereference before null check
>
> Move memcpy to 'ah->key' after 'ah' null check
>
> Fixes: bb66d562aefc ("net/enic: share flow actions with same signature")
> Cc: stable@dpdk.org
Looks better to me, thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] net/enic: adjust memory check and use in proper order
2022-02-03 11:11 ` Thomas Monjalon
@ 2022-02-03 11:22 ` Ferruh Yigit
0 siblings, 0 replies; 9+ messages in thread
From: Ferruh Yigit @ 2022-02-03 11:22 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev, John Daley (johndale), Weiguo Li
On 2/3/2022 11:11 AM, Thomas Monjalon wrote:
> 03/02/2022 11:57, Ferruh Yigit:
>> On 2/2/2022 11:50 AM, Thomas Monjalon wrote:
>>>>> Subject: [PATCH] net/enic: adjust memory check and use in proper order
>>>>>
>>>>> Fixes: bb66d562aefc ("net/enic: share flow actions with same signature")
>>>>>
>>>>> Signed-off-by: Weiguo Li <liwg06@foxmail.com>
>>>>>
>>>>> Reviewed-by: John Daley <johndale@cisco.com>
>>>>>
>>>> Applied to dpdk-next-net/main, thanks.
>>>
>>> Please could we have a little of explanation in the commit log?
>>> The title says "adjust [...] and use in proper order"
>>> but I see only a move of the check.
>>>
>>>
>>
>> Is following good? If so I can update it in next-net.
>>
>> net/enic: fix dereference before null check
>>
>> Move memcpy to 'ah->key' after 'ah' null check
>>
>> Fixes: bb66d562aefc ("net/enic: share flow actions with same signature")
>> Cc: stable@dpdk.org
>
> Looks better to me, thanks.
>
>
Updated in next-net, thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] net/enic: adjust memory check and use in proper order
@ 2022-02-02 12:53 =?gb18030?B?wO7OrLn6?=
0 siblings, 0 replies; 9+ messages in thread
From: =?gb18030?B?wO7OrLn6?= @ 2022-02-02 12:53 UTC (permalink / raw)
To: =?gb18030?B?VGhvbWFzIE1vbmphbG9u?=
Cc: =?gb18030?B?ZGV2?=, =?gb18030?B?RmVycnVoIFlpZ2l0?=,
=?gb18030?B?Sm9obiBEYWxleSAoam9obmRhbGUp?=
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb18030", Size: 1287 bytes --]
This fix only moves the memcpy after null check.
so the misplaced of memcpy and null check is reordered.
I thought it's too trival a fix to add more explanation.
Sorry if makes any confusion.
-Weiguo
> -----Original Message-----
> From: "Thomas Monjalon" <thomas@monjalon.net>;
> Date: Wed, Feb 2, 2022 07:50 PM
> To: "John Daley (johndale)"<johndale@cisco.com>;"Weiguo Li"<liwg06@foxmail.com>;
> Cc: "dev"<dev@dpdk.org>;"Ferruh Yigit"<ferruh.yigit@intel.com>;
> Subject: Re: [PATCH] net/enic: adjust memory check and use in proper order
>
> > > Subject: [PATCH] net/enic: adjust memory check and use in proper order
> > >
> > > Fixes: bb66d562aefc ("net/enic: share flow actions with same signature")
> > >
> > > Signed-off-by: Weiguo Li <liwg06@foxmail.com>
> > >
> > > Reviewed-by: John Daley <johndale@cisco.com>
> > >
> > > Applied to dpdk-next-net/main, thanks.
> Please could we have a little of explanation in the commit log?
> The title says "adjust [...] and use in proper order"
> but I see only a move of the check.
[-- Attachment #2: Type: text/html, Size: 5433 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-02-03 11:22 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-25 12:00 [PATCH] net/enic: adjust memory check and use in proper order Weiguo Li
2022-01-26 22:00 ` John Daley (johndale)
2022-01-28 14:47 ` Ferruh Yigit
2022-02-02 11:50 ` Thomas Monjalon
2022-02-03 10:57 ` Ferruh Yigit
2022-02-03 11:11 ` Thomas Monjalon
2022-02-03 11:22 ` Ferruh Yigit
2022-02-03 8:26 ` Weiguo Li
2022-02-02 12:53 [PATCH] " =?gb18030?B?wO7OrLn6?=
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).