diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2017-03-15 20:39:18 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-03-16 01:20:27 +0300 |
commit | 2026fecf516bc04df20cb50874957cd8c364fb4e (patch) | |
tree | 17dff1ad69ed0f125ff2f93b83b1bcb3908e724b /include/uapi/linux/pkt_sched.h | |
parent | 5b7696499c68a6b84127018d063649597e31627a (diff) | |
download | linux-2026fecf516bc04df20cb50874957cd8c364fb4e.tar.xz |
mqprio: Change handling of hw u8 to allow for multiple hardware offload modes
This patch is meant to allow for support of multiple hardware offload type
for a single device. There is currently no bounds checking for the hw
member of the mqprio_qopt structure. This results in us being able to pass
values from 1 to 255 with all being treated the same. On retreiving the
value it is returned as 1 for anything 1 or greater being set.
With this change we are currently adding limited bounds checking by
defining an enum and using those values to limit the reported hardware
offloads.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/pkt_sched.h')
-rw-r--r-- | include/uapi/linux/pkt_sched.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h index df7451d35131..099bf5528fed 100644 --- a/include/uapi/linux/pkt_sched.h +++ b/include/uapi/linux/pkt_sched.h @@ -617,6 +617,14 @@ struct tc_drr_stats { #define TC_QOPT_BITMASK 15 #define TC_QOPT_MAX_QUEUE 16 +enum { + TC_MQPRIO_HW_OFFLOAD_NONE, /* no offload requested */ + TC_MQPRIO_HW_OFFLOAD_TCS, /* offload TCs, no queue counts */ + __TC_MQPRIO_HW_OFFLOAD_MAX +}; + +#define TC_MQPRIO_HW_OFFLOAD_MAX (__TC_MQPRIO_HW_OFFLOAD_MAX - 1) + struct tc_mqprio_qopt { __u8 num_tc; __u8 prio_tc_map[TC_QOPT_BITMASK + 1]; |