netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Amir Vadai <amirv@mellanox.com>
To: John Fastabend <john.r.fastabend@intel.com>
Cc: "David S. Miller" <davem@davemloft.net>, <netdev@vger.kernel.org>,
	Roland Dreier <roland@purestorage.com>,
	Oren Duer <oren@mellanox.com>, Amir Vadai <amirv@mellanox.co.il>
Subject: Re: [PATCH V1 5/6] net/mlx4_en: sk_prio <=> UP for untagged traffic
Date: Wed, 21 Mar 2012 17:18:43 +0200	[thread overview]
Message-ID: <4F69F153.1010703@mellanox.com> (raw)
In-Reply-To: <4F69E3AD.2000501@intel.com>

On 03/21/2012 04:20 PM, John Fastabend wrote:
> On 3/21/2012 2:25 AM, Amir Vadai wrote:
>> From: Amir Vadai<amirv@mellanox.co.il>
>>
>> Since vlan egress map is only good for tagged traffic, need to have other
>> mapping to be used by untagged traffic.
>> For that, the driver uses sch_mqprio mapping. This mapping could be set by
>> using tc tool from iproute2 package.
>> Mapped UP will be used by the HW for QoS purposes, but won't go out on the
>> wire.
>>
>> Signed-off-by: Amir Vadai<amirv@mellanox.com>
>> ---
>
> [...]
>
>> diff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
>> index 445a771..f228728 100644
>> --- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c
>> +++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
>> @@ -570,15 +570,15 @@ static void build_inline_wqe(struct mlx4_en_tx_desc *tx_desc, struct sk_buff *sk
>>
>>   u16 mlx4_en_select_queue(struct net_device *dev, struct sk_buff *skb)
>>   {
>> -	u16 vlan_tag = 0;
>> +	int up = -1;
>>
>> -	/* If we support per priority flow control and the packet contains
>> -	 * a vlan tag, send the packet to the TX ring assigned to that priority
>> -	 */
>> -	if (vlan_tx_tag_present(skb)) {
>> -		vlan_tag = vlan_tx_tag_get(skb);
>> -		return MLX4_EN_NUM_TX_RINGS + (vlan_tag>>  13);
>> -	}
>> +	if (vlan_tx_tag_present(skb))
>> +		up = (vlan_tx_tag_get(skb)>>  13);
>> +	else if (dev->num_tc)
>> +		up = netdev_get_prio_tc_map(dev, skb->priority);
>> +
>> +	if (up>= 0)
>> +		return MLX4_EN_NUM_TX_RINGS + up;
>
> I expected the else case covered by the netdev_set_tc_queue() setup above? Did
> I miss something.
>
It is me who missed something, will fix it in V2

>>
>>   	return __skb_tx_hash(dev, skb, MLX4_EN_NUM_TX_RINGS);
>>   }
>

- Amir

  reply	other threads:[~2012-03-21 15:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-21  9:24 [PATCH V1 0/6] net/mlx4_en: DCB QoS support Amir Vadai
2012-03-21  9:24 ` [PATCH V1 1/6] net/mlx4_en: Force user priority by QP attribute Amir Vadai
2012-03-21  9:24 ` [PATCH V1 2/6] net/mlx4_core: set port QoS attributes Amir Vadai
2012-03-21  9:25 ` [PATCH V1 3/6] net/mlx4_en: DCB QoS support Amir Vadai
2012-03-21  9:25 ` [PATCH V1 4/6] net/mlx4_en: Set max rate-limit for a TC Amir Vadai
2012-03-21 10:12   ` Eric Dumazet
2012-03-21 13:43     ` Amir Vadai
2012-03-21  9:25 ` [PATCH V1 5/6] net/mlx4_en: sk_prio <=> UP for untagged traffic Amir Vadai
2012-03-21 14:20   ` John Fastabend
2012-03-21 15:18     ` Amir Vadai [this message]
2012-03-21  9:25 ` [PATCH V1 6/6] IB/rdma_cm: TOS <=> UP mapping for IBoE Amir Vadai
2012-03-21 10:03   ` Eric Dumazet
2012-03-21 13:26     ` Amir Vadai

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=4F69F153.1010703@mellanox.com \
    --to=amirv@mellanox.com \
    --cc=amirv@mellanox.co.il \
    --cc=davem@davemloft.net \
    --cc=john.r.fastabend@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=oren@mellanox.com \
    --cc=roland@purestorage.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).