@@ -515,6 +515,7 @@ struct tc_cls_flower_offload {
struct fl_flow_key *key;
struct tcf_exts *exts;
bool egress_dev;
+ u32 classid;
};
enum tc_matchall_command {
@@ -241,6 +241,7 @@ static int fl_hw_replace_filter(struct tcf_proto *tp,
cls_flower.mask = mask;
cls_flower.key = &f->mkey;
cls_flower.exts = &f->exts;
+ cls_flower.classid = f->res.classid;
err = dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_CLSFLOWER,
&cls_flower);
@@ -264,6 +265,7 @@ static void fl_hw_update_stats(struct tcf_proto *tp, struct cls_fl_filter *f)
cls_flower.command = TC_CLSFLOWER_STATS;
cls_flower.cookie = (unsigned long) f;
cls_flower.exts = &f->exts;
+ cls_flower.classid = f->res.classid;
dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_CLSFLOWER,
&cls_flower);
The classid on a filter is used to match a packet to a class. tcf_result structure contains the class ID of the class to which the packet belongs. This patch enables offloading the classid to the hardware. Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com> --- include/net/pkt_cls.h | 1 + net/sched/cls_flower.c | 2 ++ 2 files changed, 3 insertions(+)