[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1592277580-5524-1-git-send-email-wenxu@ucloud.cn>
Date: Tue, 16 Jun 2020 11:19:36 +0800
From: wenxu@...oud.cn
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, pablo@...filter.org, vladbu@...lanox.com
Subject: [PATCH net v3 0/4] several fixes for indirect flow_blocks offload
From: wenxu <wenxu@...oud.cn>
v2:
patch2: store the cb_priv of representor to the flow_block_cb->indr.cb_priv
in the driver. And make the correct check with the statments
this->indr.cb_priv == cb_priv
patch4: del the driver list only in the indriect cleanup callbacks
v3:
add the cover letter and changlogs.
This series fixes commit 1fac52da5942 ("net: flow_offload: consolidate
indirect flow_block infrastructure") that revists the flow_block
infrastructure.
The first patch fix the miss cleanup for flowtable indirect flow_block.
The cleanup operation based on the setup callback. But in the mlx5e
driver there are tc and flowtable indrict setup callback and shared
the same release callbacks. So when the representor is removed,
then identify the indirect flow_blocks that need to be removed by
the release callback.
The second patch fix the incorrect cb_priv check in flow_block_cb.
In the function __flow_block_indr_cleanup, 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). So there
will always miss cleanup when the HW goaway and lead the memory leak.
After fix the first two patches. When the HW goaway, the indirect
flow_block can be cleanup. But It takes another two problem.
The third patch fix block->nooffloaddevcnt warning dmesg log.
When a indr device add in offload success. The block->nooffloaddevcnt
should be 0. After the representor go away. When the dir device go away
the flow_block UNBIND operation with -EOPNOTSUPP which lead the warning
demesg log.
The block->nooffloaddevcnt should always count for indr block.
even the indr block offload successful. The representor maybe
gone away and the ingress qdisc can work in software mode.
The last patch fix the list_del corruption in the driver list.
When a indr device add in offload success. After the representor
go away. All the flow_block_cb cleanup but miss del form driver
list.
All the problem can be reproduce through making real hw go away
after setup the block offoaded.
wenxu (4):
flow_offload: fix incorrect cleanup for indirect flow_blocks
flow_offload: fix incorrect cb_priv check for flow_block_cb
net/sched: cls_api: fix nooffloaddevcnt warning dmesg log
flow_offload: fix the list_del corruption in the driver list
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 3 ++-
.../net/ethernet/mellanox/mlx5/core/en/rep/tc.c | 4 ++--
drivers/net/ethernet/netronome/nfp/flower/main.c | 2 +-
drivers/net/ethernet/netronome/nfp/flower/main.h | 3 +--
.../net/ethernet/netronome/nfp/flower/offload.c | 7 +++---
include/net/flow_offload.h | 3 ++-
net/core/flow_offload.c | 11 +++++-----
net/netfilter/nf_flow_table_offload.c | 1 +
net/netfilter/nf_tables_offload.c | 1 +
net/sched/cls_api.c | 25 +++++++++++++---------
10 files changed, 35 insertions(+), 25 deletions(-)
--
1.8.3.1
Powered by blists - more mailing lists