Message ID | 20211126112056.849123-2-maxime.chevallier@bootlin.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 75fa71e3acadbb4ab5eda18505277eb9a1f69b23 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: mvneta: mqprio cleanups and shaping support | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Clearly marked for net-next |
netdev/fixes_present | success | Fixes tag not required for -next series |
netdev/subject_prefix | success | Link |
netdev/cover_letter | success | Series has a cover letter |
netdev/patch_count | success | Link |
netdev/header_inline | success | No static functions without inline keyword in header files |
netdev/build_32bit | success | Errors and warnings before: 2 this patch: 2 |
netdev/cc_maintainers | success | CCed 4 of 4 maintainers |
netdev/build_clang | success | Errors and warnings before: 0 this patch: 0 |
netdev/module_param | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Signed-off-by tag matches author and committer |
netdev/verify_fixes | success | No Fixes tag |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 2 this patch: 2 |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 43 lines checked |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/source_inline | success | Was 0 now: 0 |
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c index 80e4b500695e..46b7604805f7 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c @@ -38,6 +38,7 @@ #include <net/ipv6.h> #include <net/tso.h> #include <net/page_pool.h> +#include <net/pkt_cls.h> #include <linux/bpf_trace.h> /* Registers */ @@ -4908,14 +4909,14 @@ static void mvneta_setup_rx_prio_map(struct mvneta_port *pp) } static int mvneta_setup_mqprio(struct net_device *dev, - struct tc_mqprio_qopt *qopt) + struct tc_mqprio_qopt_offload *mqprio) { struct mvneta_port *pp = netdev_priv(dev); u8 num_tc; int i; - qopt->hw = TC_MQPRIO_HW_OFFLOAD_TCS; - num_tc = qopt->num_tc; + mqprio->qopt.hw = TC_MQPRIO_HW_OFFLOAD_TCS; + num_tc = mqprio->qopt.num_tc; if (num_tc > rxq_number) return -EINVAL; @@ -4926,13 +4927,15 @@ static int mvneta_setup_mqprio(struct net_device *dev, return 0; } - memcpy(pp->prio_tc_map, qopt->prio_tc_map, sizeof(pp->prio_tc_map)); + memcpy(pp->prio_tc_map, mqprio->qopt.prio_tc_map, + sizeof(pp->prio_tc_map)); mvneta_setup_rx_prio_map(pp); - netdev_set_num_tc(dev, qopt->num_tc); - for (i = 0; i < qopt->num_tc; i++) - netdev_set_tc_queue(dev, i, qopt->count[i], qopt->offset[i]); + netdev_set_num_tc(dev, mqprio->qopt.num_tc); + for (i = 0; i < mqprio->qopt.num_tc; i++) + netdev_set_tc_queue(dev, i, mqprio->qopt.count[i], + mqprio->qopt.offset[i]); return 0; }
The struct tc_mqprio_qopt_offload is a container for struct tc_mqprio_qopt, that allows passing extra parameters, such as traffic shaping. This commit converts the current mqprio code to that new struct. Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> --- V2 : No changes drivers/net/ethernet/marvell/mvneta.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)