Skip to content

Commit

Permalink
net_sch: mqprio: Change TC_SETUP_MQPRIO to TC_SETUP_QDISC_MQPRIO
Browse files Browse the repository at this point in the history
Change TC_SETUP_MQPRIO to TC_SETUP_QDISC_MQPRIO to match the new
convention.

Signed-off-by: Nogah Frankel <nogahf@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Nogah Frankel authored and David S. Miller committed Nov 8, 2017
1 parent 602f3ba commit 575ed7d
Show file tree
Hide file tree
Showing 15 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/amd/xgbe/xgbe-drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -2206,7 +2206,7 @@ static int xgbe_setup_tc(struct net_device *netdev, enum tc_setup_type type,
struct tc_mqprio_qopt *mqprio = type_data;
u8 tc;

if (type != TC_SETUP_MQPRIO)
if (type != TC_SETUP_QDISC_MQPRIO)
return -EOPNOTSUPP;

mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -4289,7 +4289,7 @@ int __bnx2x_setup_tc(struct net_device *dev, enum tc_setup_type type,
{
struct tc_mqprio_qopt *mqprio = type_data;

if (type != TC_SETUP_MQPRIO)
if (type != TC_SETUP_QDISC_MQPRIO)
return -EOPNOTSUPP;

mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/broadcom/bnxt/bnxt.c
Original file line number Diff line number Diff line change
Expand Up @@ -7388,7 +7388,7 @@ static int bnxt_setup_tc(struct net_device *dev, enum tc_setup_type type,
switch (type) {
case TC_SETUP_BLOCK:
return bnxt_setup_tc_block(dev, type_data);
case TC_SETUP_MQPRIO: {
case TC_SETUP_QDISC_MQPRIO: {
struct tc_mqprio_qopt *mqprio = type_data;

mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ static int dpaa_setup_tc(struct net_device *net_dev, enum tc_setup_type type,
u8 num_tc;
int i;

if (type != TC_SETUP_MQPRIO)
if (type != TC_SETUP_QDISC_MQPRIO)
return -EOPNOTSUPP;

mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1252,7 +1252,7 @@ static int hns3_setup_tc(struct net_device *netdev, void *type_data)
static int hns3_nic_setup_tc(struct net_device *dev, enum tc_setup_type type,
void *type_data)
{
if (type != TC_SETUP_MQPRIO)
if (type != TC_SETUP_QDISC_MQPRIO)
return -EOPNOTSUPP;

return hns3_setup_tc(dev, type_data);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,7 @@ static int __fm10k_setup_tc(struct net_device *dev, enum tc_setup_type type,
{
struct tc_mqprio_qopt *mqprio = type_data;

if (type != TC_SETUP_MQPRIO)
if (type != TC_SETUP_QDISC_MQPRIO)
return -EOPNOTSUPP;

mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/intel/i40e/i40e_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -7550,7 +7550,7 @@ static int __i40e_setup_tc(struct net_device *netdev, enum tc_setup_type type,
void *type_data)
{
switch (type) {
case TC_SETUP_MQPRIO:
case TC_SETUP_QDISC_MQPRIO:
return i40e_setup_tc(netdev, type_data);
case TC_SETUP_BLOCK:
return i40e_setup_tc_block(netdev, type_data);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -9431,7 +9431,7 @@ static int __ixgbe_setup_tc(struct net_device *dev, enum tc_setup_type type,
switch (type) {
case TC_SETUP_BLOCK:
return ixgbe_setup_tc_block(dev, type_data);
case TC_SETUP_MQPRIO:
case TC_SETUP_QDISC_MQPRIO:
return ixgbe_setup_tc_mqprio(dev, type_data);
default:
return -EOPNOTSUPP;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/mellanox/mlx4/en_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ static int __mlx4_en_setup_tc(struct net_device *dev, enum tc_setup_type type,
{
struct tc_mqprio_qopt *mqprio = type_data;

if (type != TC_SETUP_MQPRIO)
if (type != TC_SETUP_QDISC_MQPRIO)
return -EOPNOTSUPP;

if (mqprio->num_tc && mqprio->num_tc != MLX4_EN_NUM_UP_HIGH)
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/mellanox/mlx5/core/en_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3146,7 +3146,7 @@ int mlx5e_setup_tc(struct net_device *dev, enum tc_setup_type type,
case TC_SETUP_BLOCK:
return mlx5e_setup_tc_block(dev, type_data);
#endif
case TC_SETUP_MQPRIO:
case TC_SETUP_QDISC_MQPRIO:
return mlx5e_setup_tc_mqprio(dev, type_data);
default:
return -EOPNOTSUPP;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/sfc/falcon/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ int ef4_setup_tc(struct net_device *net_dev, enum tc_setup_type type,
unsigned tc, num_tc;
int rc;

if (type != TC_SETUP_MQPRIO)
if (type != TC_SETUP_QDISC_MQPRIO)
return -EOPNOTSUPP;

num_tc = mqprio->num_tc;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/sfc/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ int efx_setup_tc(struct net_device *net_dev, enum tc_setup_type type,
unsigned tc, num_tc;
int rc;

if (type != TC_SETUP_MQPRIO)
if (type != TC_SETUP_QDISC_MQPRIO)
return -EOPNOTSUPP;

num_tc = mqprio->num_tc;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/ti/netcp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1887,7 +1887,7 @@ static int netcp_setup_tc(struct net_device *dev, enum tc_setup_type type,
/* setup tc must be called under rtnl lock */
ASSERT_RTNL();

if (type != TC_SETUP_MQPRIO)
if (type != TC_SETUP_QDISC_MQPRIO)
return -EOPNOTSUPP;

mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS;
Expand Down
2 changes: 1 addition & 1 deletion include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
struct sk_buff *skb);

enum tc_setup_type {
TC_SETUP_MQPRIO,
TC_SETUP_QDISC_MQPRIO,
TC_SETUP_CLSU32,
TC_SETUP_CLSFLOWER,
TC_SETUP_CLSMATCHALL,
Expand Down
5 changes: 3 additions & 2 deletions net/sched/sch_mqprio.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ static void mqprio_destroy(struct Qdisc *sch)
switch (priv->mode) {
case TC_MQPRIO_MODE_DCB:
case TC_MQPRIO_MODE_CHANNEL:
dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_MQPRIO,
dev->netdev_ops->ndo_setup_tc(dev,
TC_SETUP_QDISC_MQPRIO,
&mqprio);
break;
default:
Expand Down Expand Up @@ -265,7 +266,7 @@ static int mqprio_init(struct Qdisc *sch, struct nlattr *opt)
return -EINVAL;
}
err = dev->netdev_ops->ndo_setup_tc(dev,
TC_SETUP_MQPRIO,
TC_SETUP_QDISC_MQPRIO,
&mqprio);
if (err)
return err;
Expand Down

0 comments on commit 575ed7d

Please sign in to comment.