mbox series

[net-next,0/3] refactor duplicate codes in bind_class hook function

Message ID 20220927124855.252023-1-shaozhengchao@huawei.com (mailing list archive)
Headers show
Series refactor duplicate codes in bind_class hook function | expand

Message

shaozhengchao Sept. 27, 2022, 12:48 p.m. UTC
All the bind_class callback duplicate the same logic, so we can refactor
them. First, ensure n arg not empty before call bind_class hook function.
Then, add tc_cls_bind_class() helper. Last, use tc_cls_bind_class() in
filter.

Zhengchao Shao (3):
  net: sched: ensure n arg not empty before call bind_class
  net: sched: cls_api: introduce tc_cls_bind_class() helper
  net: sched: use tc_cls_bind_class() in filter

 include/net/pkt_cls.h    | 12 ++++++++++++
 net/sched/cls_basic.c    |  7 +------
 net/sched/cls_bpf.c      |  7 +------
 net/sched/cls_flower.c   |  7 +------
 net/sched/cls_fw.c       |  7 +------
 net/sched/cls_matchall.c |  7 +------
 net/sched/cls_route.c    |  7 +------
 net/sched/cls_rsvp.h     |  7 +------
 net/sched/cls_tcindex.c  |  7 +------
 net/sched/cls_u32.c      |  7 +------
 net/sched/sch_api.c      |  2 +-
 11 files changed, 22 insertions(+), 55 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Oct. 3, 2022, 6:50 a.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Tue, 27 Sep 2022 20:48:52 +0800 you wrote:
> All the bind_class callback duplicate the same logic, so we can refactor
> them. First, ensure n arg not empty before call bind_class hook function.
> Then, add tc_cls_bind_class() helper. Last, use tc_cls_bind_class() in
> filter.
> 
> Zhengchao Shao (3):
>   net: sched: ensure n arg not empty before call bind_class
>   net: sched: cls_api: introduce tc_cls_bind_class() helper
>   net: sched: use tc_cls_bind_class() in filter
> 
> [...]

Here is the summary with links:
  - [net-next,1/3] net: sched: ensure n arg not empty before call bind_class
    https://git.kernel.org/netdev/net-next/c/4e6263ec8bc9
  - [net-next,2/3] net: sched: cls_api: introduce tc_cls_bind_class() helper
    https://git.kernel.org/netdev/net-next/c/402963e34a70
  - [net-next,3/3] net: sched: use tc_cls_bind_class() in filter
    https://git.kernel.org/netdev/net-next/c/cc9039a13494

You are awesome, thank you!