On Sat, Aug 5, 2017 at 5:53 PM, Jiri Pirko <j...@resnulli.us> wrote: > From: Jiri Pirko <j...@mellanox.com> > > Let mlx5e_setup_tc (former mlx5e_ndo_setup_tc) be a splitter for specific > setup_tc types and push out cls_flower and mqprio specific codes into > separate functions. Also change the return values so they are the same > as in the rest of the drivers. > > Signed-off-by: Jiri Pirko <j...@mellanox.com> > --- > drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 56 > +++++++++++++---------- > 1 file changed, 31 insertions(+), 25 deletions(-) > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c > b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c > index 4052e225f..adf35da 100644 > --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c > @@ -2998,12 +2998,16 @@ static int mlx5e_modify_channels_vsd(struct > mlx5e_channels *chs, bool vsd) > return 0; > } > > -static int mlx5e_setup_tc(struct net_device *netdev, u8 tc) > +static int mlx5e_setup_tc_mqprio(struct net_device *netdev, > + struct tc_mqprio_qopt *mqprio) > { > struct mlx5e_priv *priv = netdev_priv(netdev); > struct mlx5e_channels new_channels = {}; > + u8 tc = mqprio->num_tc; > int err = 0; > > + mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS; > + > if (tc && tc != MLX5E_MAX_NUM_TC) > return -EINVAL; > > @@ -3027,39 +3031,41 @@ static int mlx5e_setup_tc(struct net_device *netdev, > u8 tc) > return err; > } > Hi Jiri,
Great change, looks very good. I am going to post a pull request tomorrow based on 4.13-rc4 "for-next" to both net-next and rdma, it [1] will most certainly conflict with your change, so to avoid inconvenience, can we hold this change a bit and rebase it on top of my pull request ? [1] https://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux.git/diff/drivers/net/ethernet/mellanox/mlx5/core/en_main.c?h=mlx5-shared-4.13&id=b90d9bba17e2c9bee5b2e3f7bd46b77bd6f43c91 Thanks, Saeed. [...]