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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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(-)

-- 
2.17.1




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux