On 6/17/2020 4:13 AM, Pablo Neira Ayuso wrote: > On Tue, Jun 16, 2020 at 11:19:38AM +0800, we...@ucloud.cn wrote: >> From: wenxu <we...@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 <we...@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?