Commit cc9039a1 authored by Zhengchao Shao's avatar Zhengchao Shao Committed by David S. Miller
Browse files

net: sched: use tc_cls_bind_class() in filter



Use tc_cls_bind_class() in filter.

Signed-off-by: default avatarZhengchao Shao <shaozhengchao@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 402963e3
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -261,12 +261,7 @@ static void basic_bind_class(void *fh, u32 classid, unsigned long cl, void *q,
{
	struct basic_filter *f = fh;

	if (f && f->res.classid == classid) {
		if (cl)
			__tcf_bind_filter(q, &f->res, base);
		else
			__tcf_unbind_filter(q, &f->res);
	}
	tc_cls_bind_class(classid, cl, q, &f->res, base);
}

static int basic_dump(struct net *net, struct tcf_proto *tp, void *fh,
+1 −6
Original line number Diff line number Diff line
@@ -635,12 +635,7 @@ static void cls_bpf_bind_class(void *fh, u32 classid, unsigned long cl,
{
	struct cls_bpf_prog *prog = fh;

	if (prog && prog->res.classid == classid) {
		if (cl)
			__tcf_bind_filter(q, &prog->res, base);
		else
			__tcf_unbind_filter(q, &prog->res);
	}
	tc_cls_bind_class(classid, cl, q, &prog->res, base);
}

static void cls_bpf_walk(struct tcf_proto *tp, struct tcf_walker *arg,
+1 −6
Original line number Diff line number Diff line
@@ -3405,12 +3405,7 @@ static void fl_bind_class(void *fh, u32 classid, unsigned long cl, void *q,
{
	struct cls_fl_filter *f = fh;

	if (f && f->res.classid == classid) {
		if (cl)
			__tcf_bind_filter(q, &f->res, base);
		else
			__tcf_unbind_filter(q, &f->res);
	}
	tc_cls_bind_class(classid, cl, q, &f->res, base);
}

static bool fl_delete_empty(struct tcf_proto *tp)
+1 −6
Original line number Diff line number Diff line
@@ -416,12 +416,7 @@ static void fw_bind_class(void *fh, u32 classid, unsigned long cl, void *q,
{
	struct fw_filter *f = fh;

	if (f && f->res.classid == classid) {
		if (cl)
			__tcf_bind_filter(q, &f->res, base);
		else
			__tcf_unbind_filter(q, &f->res);
	}
	tc_cls_bind_class(classid, cl, q, &f->res, base);
}

static struct tcf_proto_ops cls_fw_ops __read_mostly = {
+1 −6
Original line number Diff line number Diff line
@@ -394,12 +394,7 @@ static void mall_bind_class(void *fh, u32 classid, unsigned long cl, void *q,
{
	struct cls_mall_head *head = fh;

	if (head && head->res.classid == classid) {
		if (cl)
			__tcf_bind_filter(q, &head->res, base);
		else
			__tcf_unbind_filter(q, &head->res);
	}
	tc_cls_bind_class(classid, cl, q, &head->res, base);
}

static struct tcf_proto_ops cls_mall_ops __read_mostly = {
Loading