From: wenxu <wenxu@ucloud.cn>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netdev@vger.kernel.org, davem@davemloft.net, vladbu@mellanox.com
Subject: Re: [PATCH net v3 2/4] flow_offload: fix incorrect cb_priv check for flow_block_cb
Date: Wed, 17 Jun 2020 10:42:19 +0800 [thread overview]
Message-ID: <7d21a0b5-9f90-7f66-ae7a-80b0d9bbf2a1@ucloud.cn> (raw)
In-Reply-To: <20200616201348.GB26932@salvia>
On 6/17/2020 4:13 AM, Pablo Neira Ayuso wrote:
> On Tue, Jun 16, 2020 at 11:19:38AM +0800, wenxu@ucloud.cn wrote:
>> From: wenxu <wenxu@ucloud.cn>
>>
>> In the function __flow_block_indr_cleanup, The match stataments
>> this->cb_priv == cb_priv is always false, the flow_block_cb->cb_priv
>> is totally different data with the flow_indr_dev->cb_priv.
>>
>> Store the representor cb_priv to the flow_block_cb->indr.cb_priv in
>> the driver.
>>
>> Fixes: 1fac52da5942 ("net: flow_offload: consolidate indirect flow_block infrastructure")
>> Signed-off-by: wenxu <wenxu@ucloud.cn>
>> ---
>> drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 1 +
>> drivers/net/ethernet/mellanox/mlx5/core/en/rep/tc.c | 2 +-
>> drivers/net/ethernet/netronome/nfp/flower/offload.c | 1 +
>> include/net/flow_offload.h | 1 +
>> net/core/flow_offload.c | 2 +-
>> 5 files changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
>> index ef7f6bc..042c285 100644
>> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
>> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
>> @@ -1918,6 +1918,7 @@ static int bnxt_tc_setup_indr_block(struct net_device *netdev, struct bnxt *bp,
>>
>> flow_block_cb_add(block_cb, f);
>> list_add_tail(&block_cb->driver_list, &bnxt_block_cb_list);
>> + block_cb->indr.cb_priv = bp;
> cb_indent ?
>
> Why are you splitting the fix in multiple patches? This makes it
> harder to review.
>
> I think patch 1/4, 2/4 and 4/4 belong to the same logical change?
> Collapse them.
I think patch 1/4, 2/4, 4/4 are different bugs, Although they are all in the new indirect
flow_block infrastructure.
patch1 fix the miss cleanup for flow_block_cb of flowtable
patch2 fix the incorrect check the cb_priv of flow_block_cb
patch4 fix the miss driver_list del in the cleanup callback
So maybe make them alone is better?
next prev parent reply other threads:[~2020-06-17 2:42 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-16 3:19 [PATCH net v3 0/4] several fixes for indirect flow_blocks offload wenxu
2020-06-16 3:19 ` [PATCH net v3 1/4] flow_offload: fix incorrect cleanup for flowtable indirect flow_blocks wenxu
2020-06-16 15:55 ` Simon Horman
2020-06-16 20:11 ` Pablo Neira Ayuso
2020-06-16 3:19 ` [PATCH net v3 2/4] flow_offload: fix incorrect cb_priv check for flow_block_cb wenxu
2020-06-16 10:51 ` Simon Horman
2020-06-16 14:20 ` wenxu
2020-06-16 14:34 ` Simon Horman
2020-06-16 15:18 ` wenxu
2020-06-16 15:47 ` Simon Horman
2020-06-16 20:38 ` Pablo Neira Ayuso
2020-06-17 3:36 ` wenxu
2020-06-17 8:38 ` Pablo Neira Ayuso
2020-06-17 10:09 ` wenxu
2020-06-17 2:47 ` wenxu
2020-06-16 20:13 ` Pablo Neira Ayuso
2020-06-17 2:42 ` wenxu [this message]
2020-06-17 9:03 ` Pablo Neira Ayuso
2020-06-16 3:19 ` [PATCH net v3 3/4] net/sched: cls_api: fix nooffloaddevcnt warning dmesg log wenxu
2020-06-16 20:17 ` Pablo Neira Ayuso
2020-06-16 20:30 ` Pablo Neira Ayuso
2020-06-17 2:34 ` wenxu
2020-06-17 2:29 ` wenxu
2020-06-16 3:19 ` [PATCH net v3 4/4] flow_offload: fix the list_del corruption in the driver list wenxu
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=7d21a0b5-9f90-7f66-ae7a-80b0d9bbf2a1@ucloud.cn \
--to=wenxu@ucloud.cn \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=vladbu@mellanox.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).