-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'lan966x-mqprio-taprio'
Horatiu Vultur says: ==================== net: lan966x: Add mqprio and taprio support Add support for offloading QoS features with tc command to lan966x. The offloaded QoS features are mqprio and taprio. v1->v2: - fix compilation warning - rename lan966x_taprio_enable/disable to lan966x_taprio_add/del ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
- Loading branch information
Showing
9 changed files
with
792 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// SPDX-License-Identifier: GPL-2.0+ | ||
|
||
#include "lan966x_main.h" | ||
|
||
int lan966x_mqprio_add(struct lan966x_port *port, u8 num_tc) | ||
{ | ||
u8 i; | ||
|
||
if (num_tc != NUM_PRIO_QUEUES) { | ||
netdev_err(port->dev, "Only %d tarffic classes supported\n", | ||
NUM_PRIO_QUEUES); | ||
return -EINVAL; | ||
} | ||
|
||
netdev_set_num_tc(port->dev, num_tc); | ||
|
||
for (i = 0; i < num_tc; ++i) | ||
netdev_set_tc_queue(port->dev, i, 1, i); | ||
|
||
return 0; | ||
} | ||
|
||
int lan966x_mqprio_del(struct lan966x_port *port) | ||
{ | ||
netdev_reset_tc(port->dev); | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.