All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Fastabend <john.fastabend@gmail.com>
To: Saeed Mahameed <saeedm@mellanox.com>,
	"David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Or Gerlitz <ogerlitz@mellanox.com>,
	Tal Alon <talal@mellanox.com>,
	Eran Ben Elisha <eranbe@mellanox.com>,
	Tariq Toukan <tariqt@mellanox.com>,
	Rana Shahout <ranas@mellanox.com>,
	Yevgeny Petrilin <yevgenyp@mellanox.com>,
	Matthew Finlay <matt@mellanox.com>
Subject: Re: [PATCH net-next V1 04/12] net/mlx5e: Support DCBNL IEEE ETS
Date: Thu, 18 Feb 2016 07:30:03 -0800	[thread overview]
Message-ID: <56C5E37B.20207@gmail.com> (raw)
In-Reply-To: <1455791573-5270-5-git-send-email-saeedm@mellanox.com>

On 16-02-18 02:32 AM, Saeed Mahameed wrote:
> Support the ndo_setup_tc callback and the needed methods
> for multi TC/UP support, and removed the default_vlan_prio
> from mlx5e_priv which is always 0, it was replaced with
> hardcoded "0" in the new select queue method.
> 
> For that we now create MAX_NUM_TC num of TISs (one per prio)
> on netdevice creation instead of priv->params.num_tc which
> was always 1.
> 
> So far each channel had a single TXQ, Now each channel has a
> TXQ per TC (Traffic Class).
> 
> Added en_dcbnl.c which implements the set/get DCBNL IEEE ETS,
> set/get dcbx and registers the mlx5e dcbnl ops.
> 
> We still use the kernel's default TXQ selection method to select the
> channel to transmit through but now we use our own method to select
> the TXQ inside the channel based on VLAN priority.
> 
> In mlx5, as opposed to mlx4, tc group N gets lower priority than
> tc group N+1.
> 
> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
> Signed-off-by: Rana Shahout <ranas@mellanox.com>
> ---


[...]

>  
> +static int mlx5e_setup_tc(struct net_device *netdev, u8 tc)
> +{
> +	struct mlx5e_priv *priv = netdev_priv(netdev);
> +	bool was_opened;
> +	int err = 0;
> +
> +	if (tc && tc != MLX5E_MAX_NUM_TC)
> +		return -EINVAL;
> +
> +	mutex_lock(&priv->state_lock);
> +
> +	was_opened = test_bit(MLX5E_STATE_OPENED, &priv->state);
> +	if (was_opened)
> +		mlx5e_close_locked(priv->netdev);
> +
> +	priv->params.num_tc = tc ? tc : 1;
> +
> +	if (was_opened)
> +		err = mlx5e_open_locked(priv->netdev);
> +
> +	mutex_unlock(&priv->state_lock);
> +
> +	return err;
> +}
> +

Hi Saeed,

I just changed the signature on the setup_tc ndo hook so you will
need to change this to something like,

static int __mlx5e_setup_tc(struct net_device *dev, u32 handle,
			    __be16 proto, struct tc_to_netdev *tc)
{
	if (handle != TC_H_ROOT || tc->type != TC_SETUP_MQPRIO)
		return -EINVAL;
	return mlx5e_setup_tc(dev, tc->tc)
}


and then use __mlx5e_setup_tc() to populate the ndo op hook. If you
look at the mlx4 drivers I did this change there already.

Other than that nice to see another dcb supporting driver.

Thanks,
John

  reply	other threads:[~2016-02-18 15:30 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-18 10:32 [PATCH net-next V1 00/12] QoS and VxLAN offloads support for Mellanox 100G mlx5 driver Saeed Mahameed
2016-02-18 10:32 ` [PATCH net-next V1 01/12] net/mlx5: Introduce a new header file for physical port functions Saeed Mahameed
2016-02-18 10:32 ` [PATCH net-next V1 02/12] net/mlx5: Introduce physical port PFC access functions Saeed Mahameed
2016-02-18 10:32 ` [PATCH net-next V1 03/12] net/mlx5: Introduce physical port TC/prio " Saeed Mahameed
2016-02-18 10:32 ` [PATCH net-next V1 04/12] net/mlx5e: Support DCBNL IEEE ETS Saeed Mahameed
2016-02-18 15:30   ` John Fastabend [this message]
2016-02-18 15:58     ` Saeed Mahameed
2016-02-18 17:02   ` Or Gerlitz
2016-02-21 12:16     ` Saeed Mahameed
2016-02-18 10:32 ` [PATCH net-next V1 05/12] net/mlx5e: Support DCBNL IEEE PFC Saeed Mahameed
2016-02-18 10:32 ` [PATCH net-next V1 06/12] net/mlx5e: Implement DCBNL IEEE max rate Saeed Mahameed
2016-02-18 10:32 ` [PATCH net-next V1 07/12] net/mlx5e: Wake On LAN support Saeed Mahameed
2016-02-18 10:32 ` [PATCH net-next V1 08/12] net/mlx5e: Move to checksum complete Saeed Mahameed
2016-02-19  2:25   ` Tom Herbert
2016-02-19  8:20     ` Or Gerlitz
2016-02-19  8:21     ` Or Gerlitz
2016-02-18 10:32 ` [PATCH net-next V1 09/12] net/mlx5e: Protect en header file from redefinitions Saeed Mahameed
2016-02-18 10:32 ` [PATCH net-next V1 10/12] net/mlx5e: Add netdev support for VXLAN tunneling Saeed Mahameed
2016-02-18 10:32 ` [PATCH net-next V1 11/12] net/mlx5e: Add TX stateless offloads for tunneling Saeed Mahameed
2016-02-18 10:32 ` [PATCH net-next V1 12/12] net/mlx5e: Add tx inner packet counters Saeed Mahameed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56C5E37B.20207@gmail.com \
    --to=john.fastabend@gmail.com \
    --cc=davem@davemloft.net \
    --cc=eranbe@mellanox.com \
    --cc=matt@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=ranas@mellanox.com \
    --cc=saeedm@mellanox.com \
    --cc=talal@mellanox.com \
    --cc=tariqt@mellanox.com \
    --cc=yevgenyp@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.