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: <1401766922.3645.195.camel@edumazet-glaptop2.roam.corp.google.com>
Date:	Mon, 02 Jun 2014 20:42:02 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Simon Horman <horms@...ge.net.au>
Cc:	Jesse Gross <jesse@...ira.com>, Thomas Graf <tgraf@...g.ch>,
	David Miller <davem@...emloft.net>,
	netdev <netdev@...r.kernel.org>,
	YAMAMOTO Takashi <yamamoto@...inux.co.jp>,
	"dev@...nvswitch.org" <dev@...nvswitch.org>
Subject: Re: [PATCH v4 net-next] MPLS: Use mpls_features to activate
 software MPLS GSO segmentation

Hi Simon

On Tue, 2014-06-03 at 11:38 +0900, Simon Horman wrote:
> +/* If MPLS offload request, verify we are testing hardware MPLS features
> + * instead of standard features for the netdev.
> + */
> +#ifdef CONFIG_NET_MPLS_GSO
> +static netdev_features_t net_mpls_features(struct sk_buff *skb,
> +					   netdev_features_t features)
> +{
> +	int tmp;
> +	__be16 type;
> +
> +	type = skb_network_protocol(skb, &tmp);
> +	if (unlikely(type == cpu_to_be16(ETH_P_MPLS_UC) ||
> +		     type == cpu_to_be16(ETH_P_MPLS_MC)))

I believe net/core/dev.c prefers to use htons(ETH_P_MPLS_UC)

(check netif_skb_features())

> +		features &= skb->dev->mpls_features;
> +
> +	return features;
> +}
> +#else
> +static netdev_features_t net_mpls_features(struct sk_buff *skb,
> +					   netdev_features_t features)
> +{
> +	return features;
> +}
> +#endif
> +
>  static netdev_features_t harmonize_features(struct sk_buff *skb,
>  	netdev_features_t features)
>  {
>  	int tmp;

	_be16 type;

	type = skb_network_protocol(skb, &tmp);

>  
> +	features = net_mpls_features(skb, features);

	features = net_mpls_features(skb, features, type);

> +
>  	if (skb->ip_summed != CHECKSUM_NONE &&
>  	    !can_checksum_protocol(features, skb_network_protocol(skb, &tmp))) {

	!can_checksum_protocol(features, type)) {

>  		features &= ~NETIF_F_ALL_CSUM;



I guess CONFIG_NET_MPLS_GSO will be set by all distros, right ?



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