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: <1304520260.3203.34.camel@localhost>
Date:	Wed, 04 May 2011 15:44:20 +0100
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Yevgeny Petrilin <yevgenyp@...lanox.co.il>
Cc:	davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH] mlx4_en: Setting RSS hash result to skb->rxhash field

On Wed, 2011-05-04 at 16:37 +0300, Yevgeny Petrilin wrote:
> Signed-off-by: Yevgeny Petrilin <yevgenyp@...lanox.co.il>
> ---
>  drivers/net/mlx4/en_rx.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/net/mlx4/en_rx.c b/drivers/net/mlx4/en_rx.c
> index 62dd21b..bb4d66a 100644
> --- a/drivers/net/mlx4/en_rx.c
> +++ b/drivers/net/mlx4/en_rx.c
> @@ -610,6 +610,8 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
>  					gro_skb->data_len = length;
>  					gro_skb->truesize += length;
>  					gro_skb->ip_summed = CHECKSUM_UNNECESSARY;
> +					gro_skb->rxhash = be32_to_cpu(cqe->immed_rss_invalid) << 24;
> +					skb_record_rx_queue(gro_skb, cq->ring);

An 8-bit hash is almost useless.  It's entirely useless if you then
shift it into the top bits of rxhash.

Ben.

>  					if (priv->vlgrp && (cqe->vlan_my_qpn &
>  							    cpu_to_be32(MLX4_CQE_VLAN_PRESENT_MASK)))
> @@ -643,6 +645,7 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
>  			goto next;
>  		}
>  
> +		skb->rxhash = be32_to_cpu(cqe->immed_rss_invalid) << 24;
>  		skb->ip_summed = ip_summed;
>  		skb->protocol = eth_type_trans(skb, dev);
>  		skb_record_rx_queue(skb, cq->ring);

-- 
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
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