lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F69E3AD.2000501@intel.com>
Date:	Wed, 21 Mar 2012 07:20:29 -0700
From:	John Fastabend <john.r.fastabend@...el.com>
To:	Amir Vadai <amirv@...lanox.com>
CC:	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
	Roland Dreier <roland@...estorage.com>,
	Oren Duer <oren@...lanox.com>,
	Amir Vadai <amirv@...lanox.co.il>
Subject: Re: [PATCH V1 5/6] net/mlx4_en: sk_prio <=> UP for untagged traffic

On 3/21/2012 2:25 AM, Amir Vadai wrote:
> From: Amir Vadai <amirv@...lanox.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@...lanox.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.

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

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ