Commit 86c55361 authored by Vlad Buslov's avatar Vlad Buslov Committed by David S. Miller
Browse files

net: sched: cls_flower: dump offload count value



Change flower in_hw_count type to fixed-size u32 and dump it as
TCA_FLOWER_IN_HW_COUNT. This change is necessary to properly test shared
blocks and re-offload functionality.

Signed-off-by: default avatarVlad Buslov <vladbu@mellanox.com>
Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fd2b803f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -362,7 +362,7 @@ static inline void tcf_block_offload_dec(struct tcf_block *block, u32 *flags)
}

static inline void
tc_cls_offload_cnt_update(struct tcf_block *block, unsigned int *cnt,
tc_cls_offload_cnt_update(struct tcf_block *block, u32 *cnt,
			  u32 *flags, bool add)
{
	if (add) {
+2 −0
Original line number Diff line number Diff line
@@ -483,6 +483,8 @@ enum {
	TCA_FLOWER_KEY_ENC_OPTS,
	TCA_FLOWER_KEY_ENC_OPTS_MASK,

	TCA_FLOWER_IN_HW_COUNT,

	__TCA_FLOWER_MAX,
};

+4 −1
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ struct cls_fl_filter {
	struct list_head list;
	u32 handle;
	u32 flags;
	unsigned int in_hw_count;
	u32 in_hw_count;
	struct rcu_work rwork;
	struct net_device *hw_dev;
};
@@ -1880,6 +1880,9 @@ static int fl_dump(struct net *net, struct tcf_proto *tp, void *fh,
	if (f->flags && nla_put_u32(skb, TCA_FLOWER_FLAGS, f->flags))
		goto nla_put_failure;

	if (nla_put_u32(skb, TCA_FLOWER_IN_HW_COUNT, f->in_hw_count))
		goto nla_put_failure;

	if (tcf_exts_dump(skb, &f->exts))
		goto nla_put_failure;