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: <1339611632.2612.17.camel@bwh-desktop.uk.solarflarecom.com>
Date:	Wed, 13 Jun 2012 19:20:32 +0100
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Merav Sicron <meravs@...adcom.com>
CC:	<eilong@...adcom.com>, <davem@...emloft.net>,
	<netdev@...r.kernel.org>
Subject: Re: [net-next patch 3/12] bnx2x: Add support for 4-tupple UDP RSS

On Wed, 2012-06-13 at 15:44 +0300, Merav Sicron wrote:
> This change enables to control via ethtool whether to do UDP RSS on 2-tupple
> (IP source / destination only) or on 4-tupple (include UDP source / destination
> port). It also enables to read back the RSS configuration.
[...]
> --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
> +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
> @@ -2600,6 +2600,52 @@ static int bnx2x_set_phys_id(struct net_device *dev,
>  	return 0;
>  }
>  
> +static int bnx2x_get_rss_flags(struct bnx2x *bp, struct ethtool_rxnfc *info)
> +{
> +
> +	switch (info->flow_type) {
> +	case TCP_V4_FLOW:
> +	case TCP_V6_FLOW:
> +		info->data = RXH_IP_SRC | RXH_IP_DST |
> +			     RXH_L4_B_0_1 | RXH_L4_B_2_3;
> +		break;
> +	case UDP_V4_FLOW:
> +		if (bp->rss_conf_obj.udp_rss_v4)
> +			info->data = RXH_IP_SRC | RXH_IP_DST |
> +				     RXH_L4_B_0_1 | RXH_L4_B_2_3;
> +		else
> +			info->data = RXH_IP_SRC | RXH_IP_DST;
> +		break;
> +	case UDP_V6_FLOW:
> +		if (bp->rss_conf_obj.udp_rss_v6)
> +			info->data = RXH_IP_SRC | RXH_IP_DST |
> +				     RXH_L4_B_0_1 | RXH_L4_B_2_3;
> +		else
> +			info->data = RXH_IP_SRC | RXH_IP_DST;
> +		break;
> +	case IPV4_FLOW:
> +	case IPV6_FLOW:
> +		info->data = RXH_IP_SRC | RXH_IP_DST;
> +		break;
> +	case SCTP_V4_FLOW:
> +	case AH_ESP_V4_FLOW:
> +	case AH_V4_FLOW:
> +	case ESP_V4_FLOW:
> +	case SCTP_V6_FLOW:
> +	case AH_ESP_V6_FLOW:
> +	case AH_V6_FLOW:
> +	case ESP_V6_FLOW:
> +	case IP_USER_FLOW:
> +	case ETHER_FLOW:
> +		info->data = 0;
> +		break;
> +	default:
> +		return -EINVAL;
> +	}
[...]

Don't try to enumerate all flow types; we may add others in future.  You
should set info->data = 0 for any type for which RSS is not supported.

Otherwise I think the ethtool bits are fine.

Ben.

-- 
Ben Hutchings, Staff 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