Netdev List
 help / color / mirror / Atom feed
* Re: [RFC PATCH 6/9] ethtool: Add support for toggling any of the GSO offloads
From: Alexander Duyck @ 2016-03-19  2:43 UTC (permalink / raw)
  To: Jesse Gross
  Cc: Ben Hutchings, Alexander Duyck, Edward Cree, Netdev, David Miller,
	Tom Herbert
In-Reply-To: <CAEh+42ihKJ30O_i9f7H0KzQBjNrBfQFXN=S3-ZsdYKssBkTSXg@mail.gmail.com>

On Fri, Mar 18, 2016 at 7:01 PM, Jesse Gross <jesse@kernel.org> wrote:
> On Fri, Mar 18, 2016 at 6:42 PM, Ben Hutchings <ben@decadent.org.uk> wrote:
>> On Fri, 2016-03-18 at 17:30 -0700, Alexander Duyck wrote:
>>> On Fri, Mar 18, 2016 at 5:18 PM, Ben Hutchings <ben@decadent.org.uk> wrote:
>>> > On Fri, 2016-03-18 at 16:25 -0700, Alexander Duyck wrote:
>>> > >       [NETIF_F_GSO_IPIP_BIT] =         "tx-ipip-segmentation",
>>> > >       [NETIF_F_GSO_SIT_BIT] =          "tx-sit-segmentation",
>>> > >       [NETIF_F_GSO_UDP_TUNNEL_BIT] =   "tx-udp_tnl-segmentation",
>>> > > +     [NETIF_F_GSO_UDP_TUNNEL_CSUM_BIT] = "tx-udp_tnl-csum-segmentation",
>>> > > +     [NETIF_F_GSO_TUNNEL_REMCSUM_BIT] = "tx-remcsum-segmentation",
>>> > I think this should be "tx-tunnel-remote-checksum-segmentation", though
>>> > that is getting quite unwieldy.
>>> Right.  As it is I think we might be coming up on the 32 character
>>> limit for the strings.  Replacing csum with checksum would probably
>>> push us over.
>>
>> Right, I wasn't even thinking about the static limit!  That does weigh
>> rather heavily in favour of abbreviation here.
>>
>> Please do at least hyphenate "remcsum" though.
>
> I think that remote checksum offload is just a purely internal feature
> - that is no device will ever expose support for it, since it is
> explicitly to work around lack of hardware support. As a result, I
> don't know if it makes sense to show it through ethtool at all.

That's true.  I can probably drop that.  The two I cared about where
the GRE and UDP bits anyway.

- Alex

^ permalink raw reply

* Re: [RFC PATCH 9/9] ixgbe/ixgbevf: Add support for GSO partial
From: Alexander Duyck @ 2016-03-19  2:42 UTC (permalink / raw)
  To: Jesse Gross
  Cc: Alexander Duyck, Edward Cree, Linux Kernel Network Developers,
	David Miller, Tom Herbert
In-Reply-To: <CAEh+42hwfx6EEbE9pf6RFdL9xkcc60CbguSFm+c+QDa63UMymA@mail.gmail.com>

On Fri, Mar 18, 2016 at 7:05 PM, Jesse Gross <jesse@kernel.org> wrote:
> On Fri, Mar 18, 2016 at 4:25 PM, Alexander Duyck <aduyck@mirantis.com> wrote:
>> This patch adds support for partial GSO segmentation in the case of GRE or
>> UDP encapsulated frames.
>>
>> The one bit in this patch that is a bit controversial is the fact that we
>> are leaving the inner IPv4 IP ID as a static value in the case of
>> segmentation.  As per RFC6864 this should be acceptable as TCP frames set
>> the DF bit so the IP ID should be ignored.  However this is not always the
>> case as header compression schemes for PPP and SLIP can end up taking a
>> performance hit as they have to record the fact that the ID didn't change
>> as expected.
>>
>> In addition GRO was examining the IP ID field as well.  As such on older
>> GRO implementations TSO frames from this driver may end up blocking GRO on
>> the other end which will likely hurt performance instead of helping it.
>>
>> Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
>
> I wasn't able to apply this patch, it seems like it might be based on
> some Intel driver patches that haven't been merged into net-next yet?

Yeah, I based it off of Jeff's Kirshers dev-queue branch of his
next-queue git repo.  Odds are it isn't working because net-next still
doesn't have the HW_CSUM patches I submitted a couple months ago.  I
ended up doing that as I needed to pull in that and a couple of other
fixes for i40e in order to apply the patches for those two drivers.

- Alex

^ permalink raw reply

* Re: [PATCH v2 net-next 0/2] lan78xx: patch series
From: David Miller @ 2016-03-19  2:28 UTC (permalink / raw)
  To: Woojung.Huh; +Cc: netdev, UNGLinuxDriver
In-Reply-To: <9235D6609DB808459E95D78E17F2E43D404C94B1@CHN-SV-EXMX02.mchp-main.com>


Series applied, thanks.

^ permalink raw reply

* Re: [RFC net-next 0/2] Create ancient subdirectories for old hardware
From: Joe Perches @ 2016-03-19  2:28 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linux-kernel
In-Reply-To: <20160318.221153.997255526626920777.davem@davemloft.net>

On Fri, 2016-03-18 at 22:11 -0400, David Miller wrote:
> From: Joe Perches <joe@perches.com>
> Date: Fri, 18 Mar 2016 17:33:29 -0700
> 
> > Maybe something like this:
> > 
> > Old, rare, and unsupported hardware should be exposed as ancient.
> > 
> > The drivers for these ancient hardwares are generally untested with
> > current kernels.
> 
> Moving drivers has a long term maintainence cost.
> 
> If they've moved into drivers/net proper, we have to maintain
> them there forever.

I don't doubt that.

All files are still in drivers/net, just possibly in
separate subdirectories for easier visibility to
determine if changes like what were proposed for cxgb
should actually be done or not.

^ permalink raw reply

* Re: [PATCH net-next v4 0/2] RDS: TCP: tunable socket buffer parameters
From: David Miller @ 2016-03-19  2:26 UTC (permalink / raw)
  To: sowmini.varadhan; +Cc: netdev, santosh.shilimkar, hannes, eric.dumazet
In-Reply-To: <cover.1458152608.git.sowmini.varadhan@oracle.com>

From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Date: Wed, 16 Mar 2016 11:38:11 -0700

> Patch 1 uses sysctl to create tunable socket buffer size parameters.
> 
> Patch 2 removes an unuused constant.
> 
> v2: use sysctl
> v3: review comments from Santosh Shilimkar, Eric Dumazet
> v4: review comments from Hannes Sowa

Series applied, thanks.

^ permalink raw reply

* Re: [PATCH v2] net: smc911x: convert pxa dma to dmaengine
From: David Miller @ 2016-03-19  2:25 UTC (permalink / raw)
  To: robert.jarzmik; +Cc: netdev, linux-kernel, fabio.estevam
In-Reply-To: <1458149162-11469-1-git-send-email-robert.jarzmik@free.fr>

From: Robert Jarzmik <robert.jarzmik@free.fr>
Date: Wed, 16 Mar 2016 18:26:02 +0100

> Convert the dma transfers to be dmaengine based, now pxa has a dmaengine
> slave driver. This makes this driver a bit more PXA agnostic.
> 
> The driver was only compile tested. The risk is quite small as no
> current PXA platform I'm aware of is using smc911x driver.
> 
> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
> Tested-by: Fabio Estevam <fabio.estevam@nxp.com>
> ---
> Since v1: added Fabio's Tested-by

Applied, thanks.

^ permalink raw reply

* Re: [PATCH] net: removes duplicate skb_mark_napi_id() calls.
From: David Miller @ 2016-03-19  2:21 UTC (permalink / raw)
  To: weongyo.linux; +Cc: netdev
In-Reply-To: <20160316170450.GA30365@jwg>

From: Weongyo Jeong <weongyo.linux@gmail.com>
Date: Wed, 16 Mar 2016 10:04:53 -0700

> Because napi_gro_receive() function calls skb_mark_napi_id() function,
> it doesn't need to set it twice.
> 
> Signed-off-by: Weongyo Jeong <weongyo.linux@gmail.com>

Unless you can show a significant performance argument, or other
significant improvement resulting from this patch, I am not applying
it.

^ permalink raw reply

* Re: [PATCH net-next] vxlan: fix too large pskb_may_pull with remote checksum
From: David Miller @ 2016-03-19  2:19 UTC (permalink / raw)
  To: jbenc; +Cc: netdev, tom
In-Reply-To: <fcf7ae744d2ab9fa8e560c37f50fc3f80ff20aa8.1458146074.git.jbenc@redhat.com>

From: Jiri Benc <jbenc@redhat.com>
Date: Wed, 16 Mar 2016 17:35:47 +0100

> The vxlan header is pulled at this point, don't include it again in the
> calculation.
> 
> Signed-off-by: Jiri Benc <jbenc@redhat.com>

Please update the commit log message to explain where that pull
happens.

Thanks.

^ permalink raw reply

* Re: [net-next 0/2] remove duplicate set of flag IFF_MULTICAST
From: David Miller @ 2016-03-19  2:15 UTC (permalink / raw)
  To: zhangshengju; +Cc: j.vosburgh, jiri, netdev
In-Reply-To: <1458122356-25021-1-git-send-email-zhangshengju@cmss.chinamobile.com>

From: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Date: Wed, 16 Mar 2016 09:59:14 +0000

> This patch series remove duplicate set of flag IFF_MULTICAST.

Series applied, thanks.

^ permalink raw reply

* Re: [RFC net-next 0/2] Create ancient subdirectories for old hardware
From: David Miller @ 2016-03-19  2:11 UTC (permalink / raw)
  To: joe; +Cc: netdev, linux-kernel
In-Reply-To: <cover.1458347329.git.joe@perches.com>

From: Joe Perches <joe@perches.com>
Date: Fri, 18 Mar 2016 17:33:29 -0700

> Maybe something like this:
> 
> Old, rare, and unsupported hardware should be exposed as ancient.
> 
> The drivers for these ancient hardwares are generally untested with
> current kernels.

Moving drivers has a long term maintainence cost.

If they've moved into drivers/net proper, we have to maintain
them there forever.

^ permalink raw reply

* Re: [RFC PATCH 9/9] ixgbe/ixgbevf: Add support for GSO partial
From: Jesse Gross @ 2016-03-19  2:05 UTC (permalink / raw)
  To: Alexander Duyck
  Cc: Edward Cree, Linux Kernel Network Developers, David Miller,
	Alexander Duyck, Tom Herbert
In-Reply-To: <20160318232535.14955.19028.stgit@localhost.localdomain>

On Fri, Mar 18, 2016 at 4:25 PM, Alexander Duyck <aduyck@mirantis.com> wrote:
> This patch adds support for partial GSO segmentation in the case of GRE or
> UDP encapsulated frames.
>
> The one bit in this patch that is a bit controversial is the fact that we
> are leaving the inner IPv4 IP ID as a static value in the case of
> segmentation.  As per RFC6864 this should be acceptable as TCP frames set
> the DF bit so the IP ID should be ignored.  However this is not always the
> case as header compression schemes for PPP and SLIP can end up taking a
> performance hit as they have to record the fact that the ID didn't change
> as expected.
>
> In addition GRO was examining the IP ID field as well.  As such on older
> GRO implementations TSO frames from this driver may end up blocking GRO on
> the other end which will likely hurt performance instead of helping it.
>
> Signed-off-by: Alexander Duyck <aduyck@mirantis.com>

I wasn't able to apply this patch, it seems like it might be based on
some Intel driver patches that haven't been merged into net-next yet?

^ permalink raw reply

* Re: [RFC PATCH 6/9] ethtool: Add support for toggling any of the GSO offloads
From: Jesse Gross @ 2016-03-19  2:01 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: Alexander Duyck, Alexander Duyck, Edward Cree, Netdev,
	David Miller, Tom Herbert
In-Reply-To: <1458351771.2953.22.camel@decadent.org.uk>

On Fri, Mar 18, 2016 at 6:42 PM, Ben Hutchings <ben@decadent.org.uk> wrote:
> On Fri, 2016-03-18 at 17:30 -0700, Alexander Duyck wrote:
>> On Fri, Mar 18, 2016 at 5:18 PM, Ben Hutchings <ben@decadent.org.uk> wrote:
>> > On Fri, 2016-03-18 at 16:25 -0700, Alexander Duyck wrote:
>> > >       [NETIF_F_GSO_IPIP_BIT] =         "tx-ipip-segmentation",
>> > >       [NETIF_F_GSO_SIT_BIT] =          "tx-sit-segmentation",
>> > >       [NETIF_F_GSO_UDP_TUNNEL_BIT] =   "tx-udp_tnl-segmentation",
>> > > +     [NETIF_F_GSO_UDP_TUNNEL_CSUM_BIT] = "tx-udp_tnl-csum-segmentation",
>> > > +     [NETIF_F_GSO_TUNNEL_REMCSUM_BIT] = "tx-remcsum-segmentation",
>> > I think this should be "tx-tunnel-remote-checksum-segmentation", though
>> > that is getting quite unwieldy.
>> Right.  As it is I think we might be coming up on the 32 character
>> limit for the strings.  Replacing csum with checksum would probably
>> push us over.
>
> Right, I wasn't even thinking about the static limit!  That does weigh
> rather heavily in favour of abbreviation here.
>
> Please do at least hyphenate "remcsum" though.

I think that remote checksum offload is just a purely internal feature
- that is no device will ever expose support for it, since it is
explicitly to work around lack of hardware support. As a result, I
don't know if it makes sense to show it through ethtool at all.

^ permalink raw reply

* Re: [RFC PATCH 6/9] ethtool: Add support for toggling any of the GSO offloads
From: Ben Hutchings @ 2016-03-19  1:42 UTC (permalink / raw)
  To: Alexander Duyck
  Cc: Alexander Duyck, Edward Cree, Netdev, David Miller, Tom Herbert
In-Reply-To: <CAKgT0UfTVCfTFgVTtA2sq1fZKVatAk=ciFG-dBtfU-oZmsAyiQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2657 bytes --]

On Fri, 2016-03-18 at 17:30 -0700, Alexander Duyck wrote:
> On Fri, Mar 18, 2016 at 5:18 PM, Ben Hutchings <ben@decadent.org.uk> wrote:
> > 
> > On Fri, 2016-03-18 at 16:25 -0700, Alexander Duyck wrote:
> > 
> > > 
> > > The strings were missing for several of the GSO offloads that are
> > > available.  This patch provides the missing strings so that we can toggle
> > > or query any of them via the ethtool command.
> > > 
> > > Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
> > > ---
> > >  net/core/ethtool.c |    3 +++
> > >  1 file changed, 3 insertions(+)
> > > 
> > > diff --git a/net/core/ethtool.c b/net/core/ethtool.c
> > > index 2966cd0d7c93..b3c39d531469 100644
> > > --- a/net/core/ethtool.c
> > > +++ b/net/core/ethtool.c
> > > @@ -82,9 +82,12 @@ static const char netdev_features_strings[NETDEV_FEATURE_COUNT][ETH_GSTRING_LEN]
> > >       [NETIF_F_TSO6_BIT] =             "tx-tcp6-segmentation",
> > >       [NETIF_F_FSO_BIT] =              "tx-fcoe-segmentation",
> > >       [NETIF_F_GSO_GRE_BIT] =          "tx-gre-segmentation",
> > > +     [NETIF_F_GSO_GRE_CSUM_BIT] =     "tx-gre-csum-segmentation",
> > All of the existing checksum offload names include the word "checksum"
> > in full, so I think the new names should do the same.
> It isn't a checksum offload though, it is a segmentation offload for a
> tunnel that has an outer checksum.  I was hoping to avoid using the
> word checksum as that might make it confusing as it is a segmentation
> offload, not a checksum offload.

Yes, but my point is that we haven't used the abbreviation "csum".

> > > 
> > >       [NETIF_F_GSO_IPIP_BIT] =         "tx-ipip-segmentation",
> > >       [NETIF_F_GSO_SIT_BIT] =          "tx-sit-segmentation",
> > >       [NETIF_F_GSO_UDP_TUNNEL_BIT] =   "tx-udp_tnl-segmentation",
> > > +     [NETIF_F_GSO_UDP_TUNNEL_CSUM_BIT] = "tx-udp_tnl-csum-segmentation",
> > > +     [NETIF_F_GSO_TUNNEL_REMCSUM_BIT] = "tx-remcsum-segmentation",
> > I think this should be "tx-tunnel-remote-checksum-segmentation", though
> > that is getting quite unwieldy.
> Right.  As it is I think we might be coming up on the 32 character
> limit for the strings.  Replacing csum with checksum would probably
> push us over.

Right, I wasn't even thinking about the static limit!  That does weigh
rather heavily in favour of abbreviation here.

Please do at least hyphenate "remcsum" though.

Ben.

-- 
Ben Hutchings
To err is human; to really foul things up requires a computer.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply

* [net-next:master 386/609] include/net/vxlan.h:302:17: sparse: cast to restricted __be64
From: kbuild test robot @ 2016-03-19  0:57 UTC (permalink / raw)
  To: Jiri Benc; +Cc: kbuild-all, netdev

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head:   93e68cd6115f67d8363c94dae8206af36f6d3b00
commit: 07dabf20d9867710b90b91108b2adcd448773e25 [386/609] vxlan: tun_id is 64bit, not 32bit
reproduce:
        # apt-get install sparse
        git checkout 07dabf20d9867710b90b91108b2adcd448773e25
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

   include/net/checksum.h:177:43: sparse: incorrect type in argument 2 (different base types)
   include/net/checksum.h:177:43:    expected restricted __wsum [usertype] addend
   include/net/checksum.h:177:43:    got restricted __sum16 [usertype] <noident>
   include/net/inet_ecn.h:131:58: sparse: incorrect type in argument 2 (different base types)
   include/net/inet_ecn.h:131:58:    expected restricted __wsum [usertype] addend
   include/net/inet_ecn.h:131:58:    got restricted __be32 [assigned] [usertype] from
   include/net/inet_ecn.h:131:65: sparse: incorrect type in argument 2 (different base types)
   include/net/inet_ecn.h:131:65:    expected restricted __wsum [usertype] addend
   include/net/inet_ecn.h:131:65:    got restricted __be32 [assigned] [usertype] to
   include/net/inet_ecn.h:131:58: sparse: incorrect type in argument 2 (different base types)
   include/net/inet_ecn.h:131:58:    expected restricted __wsum [usertype] addend
   include/net/inet_ecn.h:131:58:    got restricted __be32 [assigned] [usertype] from
   include/net/inet_ecn.h:131:65: sparse: incorrect type in argument 2 (different base types)
   include/net/inet_ecn.h:131:65:    expected restricted __wsum [usertype] addend
   include/net/inet_ecn.h:131:65:    got restricted __be32 [assigned] [usertype] to
   include/net/vxlan.h:275:27: sparse: restricted __be32 degrades to integer
   include/net/vxlan.h:275:45: sparse: incorrect type in return expression (different base types)
   include/net/vxlan.h:275:45:    expected restricted __be32
   include/net/vxlan.h:275:45:    got unsigned int
>> include/net/vxlan.h:302:17: sparse: cast to restricted __be64
>> include/net/vxlan.h:302:17: sparse: cast from restricted __be32
   include/net/vxlan.h:302:17: sparse: restricted __be64 degrades to integer
>> include/net/vxlan.h:302:28: sparse: incorrect type in return expression (different base types)
   include/net/vxlan.h:302:28:    expected restricted __be64
   include/net/vxlan.h:302:28:    got unsigned long long
   include/net/vxlan.h:275:27: sparse: restricted __be32 degrades to integer
   include/net/vxlan.h:275:45: sparse: incorrect type in return expression (different base types)
   include/net/vxlan.h:275:45:    expected restricted __be32
   include/net/vxlan.h:275:45:    got unsigned int
   include/net/vxlan.h:284:16: sparse: restricted __be32 degrades to integer
   include/net/vxlan.h:284:20: sparse: incorrect type in return expression (different base types)
   include/net/vxlan.h:284:20:    expected restricted __be32
   include/net/vxlan.h:284:20:    got unsigned int
   include/net/vxlan.h:293:16: sparse: restricted __be64 degrades to integer
   include/net/vxlan.h:293:23: sparse: incorrect type in return expression (different base types)
   include/net/vxlan.h:293:23:    expected restricted __be32
   include/net/vxlan.h:293:23:    got unsigned long long

vim +302 include/net/vxlan.h

   269	
   270	static inline __be32 vxlan_vni(__be32 vni_field)
   271	{
   272	#if defined(__BIG_ENDIAN)
   273		return vni_field >> 8;
   274	#else
 > 275		return (vni_field & VXLAN_VNI_MASK) << 8;
   276	#endif
   277	}
   278	
   279	static inline __be32 vxlan_vni_field(__be32 vni)
   280	{
   281	#if defined(__BIG_ENDIAN)
   282		return vni << 8;
   283	#else
   284		return vni >> 8;
   285	#endif
   286	}
   287	
   288	static inline __be32 vxlan_tun_id_to_vni(__be64 tun_id)
   289	{
   290	#if defined(__BIG_ENDIAN)
   291		return tun_id;
   292	#else
   293		return tun_id >> 32;
   294	#endif
   295	}
   296	
   297	static inline __be64 vxlan_vni_to_tun_id(__be32 vni)
   298	{
   299	#if defined(__BIG_ENDIAN)
   300		return (__be64)vni;
   301	#else
 > 302		return (__be64)vni << 32;
   303	#endif
   304	}
   305	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

^ permalink raw reply

* [PATCH iproute2 2/2] geneve: Add support for configuring UDP checksums.
From: Jesse Gross @ 2016-03-19  0:51 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev
In-Reply-To: <1458348669-48437-1-git-send-email-jesse@kernel.org>

Enable support for configuring outer UDP checksums on Geneve tunnels:

ip link add type geneve id 10 remote 10.0.0.2 udpcsum

Signed-off-by: Jesse Gross <jesse@kernel.org>
---
 ip/iplink_geneve.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/ip/iplink_geneve.c b/ip/iplink_geneve.c
index 30b16b9..13a6d80 100644
--- a/ip/iplink_geneve.c
+++ b/ip/iplink_geneve.c
@@ -20,6 +20,7 @@ static void print_explain(FILE *f)
 	fprintf(f, "Usage: ... geneve id VNI remote ADDR\n");
 	fprintf(f, "                 [ ttl TTL ] [ tos TOS ]\n");
 	fprintf(f, "                 [ dstport PORT ] [ [no]external ]\n");
+	fprintf(f, "                 [ [no]udpcsum ] [ [no]udp6zerocsumtx ] [ [no]udp6zerocsumrx ]\n");
 	fprintf(f, "\n");
 	fprintf(f, "Where: VNI  := 0-16777215\n");
 	fprintf(f, "       ADDR := IP_ADDRESS\n");
@@ -43,6 +44,12 @@ static int geneve_parse_opt(struct link_util *lu, int argc, char **argv,
 	__u8 tos = 0;
 	__u16 dstport = 0;
 	bool metadata = 0;
+	__u8 udpcsum = 0;
+	bool udpcsum_set = false;
+	__u8 udp6zerocsumtx = 0;
+	bool udp6zerocsumtx_set = false;
+	__u8 udp6zerocsumrx = 0;
+	bool udp6zerocsumrx_set = false;
 
 	while (argc > 0) {
 		if (!matches(*argv, "id") ||
@@ -91,6 +98,24 @@ static int geneve_parse_opt(struct link_util *lu, int argc, char **argv,
 			metadata = true;
 		} else if (!matches(*argv, "noexternal")) {
 			metadata = false;
+		} else if (!matches(*argv, "udpcsum")) {
+			udpcsum = 1;
+			udpcsum_set = true;
+		} else if (!matches(*argv, "noudpcsum")) {
+			udpcsum = 0;
+			udpcsum_set = true;
+		} else if (!matches(*argv, "udp6zerocsumtx")) {
+			udp6zerocsumtx = 1;
+			udp6zerocsumtx_set = true;
+		} else if (!matches(*argv, "noudp6zerocsumtx")) {
+			udp6zerocsumtx = 0;
+			udp6zerocsumtx_set = true;
+		} else if (!matches(*argv, "udp6zerocsumrx")) {
+			udp6zerocsumrx = 1;
+			udp6zerocsumrx_set = true;
+		} else if (!matches(*argv, "noudp6zerocsumrx")) {
+			udp6zerocsumrx = 0;
+			udp6zerocsumrx_set = true;
 		} else if (matches(*argv, "help") == 0) {
 			explain();
 			return -1;
@@ -131,6 +156,12 @@ static int geneve_parse_opt(struct link_util *lu, int argc, char **argv,
 		addattr16(n, 1024, IFLA_GENEVE_PORT, htons(dstport));
 	if (metadata)
 		addattr(n, 1024, IFLA_GENEVE_COLLECT_METADATA);
+	if (udpcsum_set)
+		addattr8(n, 1024, IFLA_GENEVE_UDP_CSUM, udpcsum);
+	if (udp6zerocsumtx_set)
+		addattr8(n, 1024, IFLA_GENEVE_UDP_ZERO_CSUM6_TX, udp6zerocsumtx);
+	if (udp6zerocsumrx_set)
+		addattr8(n, 1024, IFLA_GENEVE_UDP_ZERO_CSUM6_RX, udp6zerocsumrx);
 
 	return 0;
 }
@@ -187,6 +218,23 @@ static void geneve_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
 	if (tb[IFLA_GENEVE_COLLECT_METADATA])
 		fputs("external ", f);
 
+	if (tb[IFLA_GENEVE_UDP_CSUM]) {
+		if (!rta_getattr_u8(tb[IFLA_GENEVE_UDP_CSUM]))
+			fputs("no", f);
+		fputs("udpcsum ", f);
+	}
+
+	if (tb[IFLA_GENEVE_UDP_ZERO_CSUM6_TX]) {
+		if (!rta_getattr_u8(tb[IFLA_GENEVE_UDP_ZERO_CSUM6_TX]))
+			fputs("no", f);
+		fputs("udp6zerocsumtx ", f);
+	}
+
+	if (tb[IFLA_GENEVE_UDP_ZERO_CSUM6_RX]) {
+		if (!rta_getattr_u8(tb[IFLA_GENEVE_UDP_ZERO_CSUM6_RX]))
+			fputs("no", f);
+		fputs("udp6zerocsumrx ", f);
+	}
 }
 
 static void geneve_print_help(struct link_util *lu, int argc, char **argv,
-- 
2.5.0

^ permalink raw reply related

* [PATCH iproute2 1/2] vxlan: Follow kernel defaults for outer UDP checksum.
From: Jesse Gross @ 2016-03-19  0:51 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev

On recent kernels, UDP checksum computation has become more efficient and
the default behavior was changed, however, the ip command overrides this
by always specifying a particular behavior.

If the user does not specify that UDP checksums should either be computed
or not then we don't need to send an explicit netlink message - the kernel
can just use its default behavior.

Signed-off-by: Jesse Gross <jesse@kernel.org>
---
 ip/iplink_vxlan.c | 35 +++++++++++++++++++++++++++--------
 1 file changed, 27 insertions(+), 8 deletions(-)

diff --git a/ip/iplink_vxlan.c b/ip/iplink_vxlan.c
index ede8482..be5636f 100644
--- a/ip/iplink_vxlan.c
+++ b/ip/iplink_vxlan.c
@@ -68,8 +68,11 @@ static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv,
 	__u32 maxaddr = 0;
 	__u16 dstport = 0;
 	__u8 udpcsum = 0;
+	bool udpcsum_set = false;
 	__u8 udp6zerocsumtx = 0;
+	bool udp6zerocsumtx_set = false;
 	__u8 udp6zerocsumrx = 0;
+	bool udp6zerocsumrx_set = false;
 	__u8 remcsumtx = 0;
 	__u8 remcsumrx = 0;
 	__u8 metadata = 0;
@@ -193,16 +196,22 @@ static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv,
 			l3miss = 1;
 		} else if (!matches(*argv, "udpcsum")) {
 			udpcsum = 1;
+			udpcsum_set = true;
 		} else if (!matches(*argv, "noudpcsum")) {
 			udpcsum = 0;
+			udpcsum_set = true;
 		} else if (!matches(*argv, "udp6zerocsumtx")) {
 			udp6zerocsumtx = 1;
+			udp6zerocsumtx_set = true;
 		} else if (!matches(*argv, "noudp6zerocsumtx")) {
 			udp6zerocsumtx = 0;
+			udp6zerocsumtx_set = true;
 		} else if (!matches(*argv, "udp6zerocsumrx")) {
 			udp6zerocsumrx = 1;
+			udp6zerocsumrx_set = true;
 		} else if (!matches(*argv, "noudp6zerocsumrx")) {
 			udp6zerocsumrx = 0;
+			udp6zerocsumrx_set = true;
 		} else if (!matches(*argv, "remcsumtx")) {
 			remcsumtx = 1;
 		} else if (!matches(*argv, "noremcsumtx")) {
@@ -277,13 +286,16 @@ static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv,
 	addattr8(n, 1024, IFLA_VXLAN_RSC, rsc);
 	addattr8(n, 1024, IFLA_VXLAN_L2MISS, l2miss);
 	addattr8(n, 1024, IFLA_VXLAN_L3MISS, l3miss);
-	addattr8(n, 1024, IFLA_VXLAN_UDP_CSUM, udpcsum);
-	addattr8(n, 1024, IFLA_VXLAN_UDP_ZERO_CSUM6_TX, udp6zerocsumtx);
-	addattr8(n, 1024, IFLA_VXLAN_UDP_ZERO_CSUM6_RX, udp6zerocsumrx);
 	addattr8(n, 1024, IFLA_VXLAN_REMCSUM_TX, remcsumtx);
 	addattr8(n, 1024, IFLA_VXLAN_REMCSUM_RX, remcsumrx);
 	addattr8(n, 1024, IFLA_VXLAN_COLLECT_METADATA, metadata);
 
+	if (udpcsum_set)
+		addattr8(n, 1024, IFLA_VXLAN_UDP_CSUM, udpcsum);
+	if (udp6zerocsumtx_set)
+		addattr8(n, 1024, IFLA_VXLAN_UDP_ZERO_CSUM6_TX, udp6zerocsumtx);
+	if (udp6zerocsumrx_set)
+		addattr8(n, 1024, IFLA_VXLAN_UDP_ZERO_CSUM6_RX, udp6zerocsumrx);
 	if (noage)
 		addattr32(n, 1024, IFLA_VXLAN_AGEING, 0);
 	else if (age)
@@ -420,16 +432,23 @@ static void vxlan_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
 	    ((maxaddr = rta_getattr_u32(tb[IFLA_VXLAN_LIMIT])) != 0))
 		    fprintf(f, "maxaddr %u ", maxaddr);
 
-	if (tb[IFLA_VXLAN_UDP_CSUM] && rta_getattr_u8(tb[IFLA_VXLAN_UDP_CSUM]))
+	if (tb[IFLA_VXLAN_UDP_CSUM]) {
+		if (!rta_getattr_u8(tb[IFLA_VXLAN_UDP_CSUM]))
+			fputs("no", f);
 		fputs("udpcsum ", f);
+	}
 
-	if (tb[IFLA_VXLAN_UDP_ZERO_CSUM6_TX] &&
-	    rta_getattr_u8(tb[IFLA_VXLAN_UDP_ZERO_CSUM6_TX]))
+	if (tb[IFLA_VXLAN_UDP_ZERO_CSUM6_TX]) {
+		if (!rta_getattr_u8(tb[IFLA_VXLAN_UDP_ZERO_CSUM6_TX]))
+			fputs("no", f);
 		fputs("udp6zerocsumtx ", f);
+	}
 
-	if (tb[IFLA_VXLAN_UDP_ZERO_CSUM6_RX] &&
-	    rta_getattr_u8(tb[IFLA_VXLAN_UDP_ZERO_CSUM6_RX]))
+	if (tb[IFLA_VXLAN_UDP_ZERO_CSUM6_RX]) {
+		if (!rta_getattr_u8(tb[IFLA_VXLAN_UDP_ZERO_CSUM6_RX]))
+			fputs("no", f);
 		fputs("udp6zerocsumrx ", f);
+	}
 
 	if (tb[IFLA_VXLAN_REMCSUM_TX] &&
 	    rta_getattr_u8(tb[IFLA_VXLAN_REMCSUM_TX]))
-- 
2.5.0

^ permalink raw reply related

* [RFC net-next 2/2] chelsio: Move original cxgb driver into ancient subdirectory
From: Joe Perches @ 2016-03-19  0:33 UTC (permalink / raw)
  To: linux-kernel; +Cc: netdev
In-Reply-To: <cover.1458347329.git.joe@perches.com>

This hardware is no longer sold or supported by Chelsio.
The hardware is relatively rare, so move it to an ancient subdirectory.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/ethernet/chelsio/Kconfig                                | 2 +-
 drivers/net/ethernet/chelsio/Makefile                               | 2 +-
 drivers/net/ethernet/chelsio/ancient/Makefile                       | 1 +
 drivers/net/ethernet/chelsio/{ => ancient}/cxgb/Makefile            | 0
 drivers/net/ethernet/chelsio/{ => ancient}/cxgb/common.h            | 0
 drivers/net/ethernet/chelsio/{ => ancient}/cxgb/cphy.h              | 0
 drivers/net/ethernet/chelsio/{ => ancient}/cxgb/cpl5_cmd.h          | 0
 drivers/net/ethernet/chelsio/{ => ancient}/cxgb/cxgb2.c             | 0
 drivers/net/ethernet/chelsio/{ => ancient}/cxgb/elmer0.h            | 0
 drivers/net/ethernet/chelsio/{ => ancient}/cxgb/espi.c              | 0
 drivers/net/ethernet/chelsio/{ => ancient}/cxgb/espi.h              | 0
 drivers/net/ethernet/chelsio/{ => ancient}/cxgb/fpga_defs.h         | 0
 drivers/net/ethernet/chelsio/{ => ancient}/cxgb/gmac.h              | 0
 drivers/net/ethernet/chelsio/{ => ancient}/cxgb/mv88e1xxx.c         | 0
 drivers/net/ethernet/chelsio/{ => ancient}/cxgb/mv88e1xxx.h         | 0
 drivers/net/ethernet/chelsio/{ => ancient}/cxgb/mv88x201x.c         | 0
 drivers/net/ethernet/chelsio/{ => ancient}/cxgb/my3126.c            | 0
 drivers/net/ethernet/chelsio/{ => ancient}/cxgb/pm3393.c            | 0
 drivers/net/ethernet/chelsio/{ => ancient}/cxgb/regs.h              | 0
 drivers/net/ethernet/chelsio/{ => ancient}/cxgb/sge.c               | 0
 drivers/net/ethernet/chelsio/{ => ancient}/cxgb/sge.h               | 0
 drivers/net/ethernet/chelsio/{ => ancient}/cxgb/subr.c              | 0
 drivers/net/ethernet/chelsio/{ => ancient}/cxgb/suni1x10gexp_regs.h | 0
 drivers/net/ethernet/chelsio/{ => ancient}/cxgb/tp.c                | 0
 drivers/net/ethernet/chelsio/{ => ancient}/cxgb/tp.h                | 0
 drivers/net/ethernet/chelsio/{ => ancient}/cxgb/vsc7326.c           | 0
 drivers/net/ethernet/chelsio/{ => ancient}/cxgb/vsc7326_reg.h       | 0
 27 files changed, 3 insertions(+), 2 deletions(-)
 create mode 100644 drivers/net/ethernet/chelsio/ancient/Makefile
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/Makefile (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/common.h (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/cphy.h (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/cpl5_cmd.h (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/cxgb2.c (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/elmer0.h (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/espi.c (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/espi.h (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/fpga_defs.h (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/gmac.h (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/mv88e1xxx.c (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/mv88e1xxx.h (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/mv88x201x.c (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/my3126.c (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/pm3393.c (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/regs.h (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/sge.c (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/sge.h (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/subr.c (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/suni1x10gexp_regs.h (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/tp.c (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/tp.h (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/vsc7326.c (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/vsc7326_reg.h (100%)

diff --git a/drivers/net/ethernet/chelsio/Kconfig b/drivers/net/ethernet/chelsio/Kconfig
index 4d187f2..25f4931 100644
--- a/drivers/net/ethernet/chelsio/Kconfig
+++ b/drivers/net/ethernet/chelsio/Kconfig
@@ -18,7 +18,7 @@ if NET_VENDOR_CHELSIO
 
 config CHELSIO_T1
 	tristate "Chelsio 10Gb Ethernet support"
-	depends on PCI
+	depends on PCI && ANCIENT_NETDEVICES
 	select CRC32
 	select MDIO
 	---help---
diff --git a/drivers/net/ethernet/chelsio/Makefile b/drivers/net/ethernet/chelsio/Makefile
index 390510b..10a8f92 100644
--- a/drivers/net/ethernet/chelsio/Makefile
+++ b/drivers/net/ethernet/chelsio/Makefile
@@ -2,7 +2,7 @@
 # Makefile for the Chelsio network device drivers.
 #
 
-obj-$(CONFIG_CHELSIO_T1) += cxgb/
+obj-y += ancient/
 obj-$(CONFIG_CHELSIO_T3) += cxgb3/
 obj-$(CONFIG_CHELSIO_T4) += cxgb4/
 obj-$(CONFIG_CHELSIO_T4VF) += cxgb4vf/
diff --git a/drivers/net/ethernet/chelsio/ancient/Makefile b/drivers/net/ethernet/chelsio/ancient/Makefile
new file mode 100644
index 0000000..f60dbde
--- /dev/null
+++ b/drivers/net/ethernet/chelsio/ancient/Makefile
@@ -0,0 +1 @@
+obj-$(CONFIG_CHELSIO_T1) += cxgb/
diff --git a/drivers/net/ethernet/chelsio/cxgb/Makefile b/drivers/net/ethernet/chelsio/ancient/cxgb/Makefile
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/Makefile
rename to drivers/net/ethernet/chelsio/ancient/cxgb/Makefile
diff --git a/drivers/net/ethernet/chelsio/cxgb/common.h b/drivers/net/ethernet/chelsio/ancient/cxgb/common.h
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/common.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/common.h
diff --git a/drivers/net/ethernet/chelsio/cxgb/cphy.h b/drivers/net/ethernet/chelsio/ancient/cxgb/cphy.h
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/cphy.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/cphy.h
diff --git a/drivers/net/ethernet/chelsio/cxgb/cpl5_cmd.h b/drivers/net/ethernet/chelsio/ancient/cxgb/cpl5_cmd.h
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/cpl5_cmd.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/cpl5_cmd.h
diff --git a/drivers/net/ethernet/chelsio/cxgb/cxgb2.c b/drivers/net/ethernet/chelsio/ancient/cxgb/cxgb2.c
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/cxgb2.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/cxgb2.c
diff --git a/drivers/net/ethernet/chelsio/cxgb/elmer0.h b/drivers/net/ethernet/chelsio/ancient/cxgb/elmer0.h
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/elmer0.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/elmer0.h
diff --git a/drivers/net/ethernet/chelsio/cxgb/espi.c b/drivers/net/ethernet/chelsio/ancient/cxgb/espi.c
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/espi.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/espi.c
diff --git a/drivers/net/ethernet/chelsio/cxgb/espi.h b/drivers/net/ethernet/chelsio/ancient/cxgb/espi.h
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/espi.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/espi.h
diff --git a/drivers/net/ethernet/chelsio/cxgb/fpga_defs.h b/drivers/net/ethernet/chelsio/ancient/cxgb/fpga_defs.h
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/fpga_defs.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/fpga_defs.h
diff --git a/drivers/net/ethernet/chelsio/cxgb/gmac.h b/drivers/net/ethernet/chelsio/ancient/cxgb/gmac.h
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/gmac.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/gmac.h
diff --git a/drivers/net/ethernet/chelsio/cxgb/mv88e1xxx.c b/drivers/net/ethernet/chelsio/ancient/cxgb/mv88e1xxx.c
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/mv88e1xxx.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/mv88e1xxx.c
diff --git a/drivers/net/ethernet/chelsio/cxgb/mv88e1xxx.h b/drivers/net/ethernet/chelsio/ancient/cxgb/mv88e1xxx.h
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/mv88e1xxx.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/mv88e1xxx.h
diff --git a/drivers/net/ethernet/chelsio/cxgb/mv88x201x.c b/drivers/net/ethernet/chelsio/ancient/cxgb/mv88x201x.c
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/mv88x201x.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/mv88x201x.c
diff --git a/drivers/net/ethernet/chelsio/cxgb/my3126.c b/drivers/net/ethernet/chelsio/ancient/cxgb/my3126.c
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/my3126.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/my3126.c
diff --git a/drivers/net/ethernet/chelsio/cxgb/pm3393.c b/drivers/net/ethernet/chelsio/ancient/cxgb/pm3393.c
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/pm3393.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/pm3393.c
diff --git a/drivers/net/ethernet/chelsio/cxgb/regs.h b/drivers/net/ethernet/chelsio/ancient/cxgb/regs.h
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/regs.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/regs.h
diff --git a/drivers/net/ethernet/chelsio/cxgb/sge.c b/drivers/net/ethernet/chelsio/ancient/cxgb/sge.c
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/sge.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/sge.c
diff --git a/drivers/net/ethernet/chelsio/cxgb/sge.h b/drivers/net/ethernet/chelsio/ancient/cxgb/sge.h
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/sge.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/sge.h
diff --git a/drivers/net/ethernet/chelsio/cxgb/subr.c b/drivers/net/ethernet/chelsio/ancient/cxgb/subr.c
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/subr.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/subr.c
diff --git a/drivers/net/ethernet/chelsio/cxgb/suni1x10gexp_regs.h b/drivers/net/ethernet/chelsio/ancient/cxgb/suni1x10gexp_regs.h
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/suni1x10gexp_regs.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/suni1x10gexp_regs.h
diff --git a/drivers/net/ethernet/chelsio/cxgb/tp.c b/drivers/net/ethernet/chelsio/ancient/cxgb/tp.c
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/tp.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/tp.c
diff --git a/drivers/net/ethernet/chelsio/cxgb/tp.h b/drivers/net/ethernet/chelsio/ancient/cxgb/tp.h
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/tp.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/tp.h
diff --git a/drivers/net/ethernet/chelsio/cxgb/vsc7326.c b/drivers/net/ethernet/chelsio/ancient/cxgb/vsc7326.c
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/vsc7326.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/vsc7326.c
diff --git a/drivers/net/ethernet/chelsio/cxgb/vsc7326_reg.h b/drivers/net/ethernet/chelsio/ancient/cxgb/vsc7326_reg.h
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/vsc7326_reg.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/vsc7326_reg.h
-- 
2.6.3.368.gf34be46

^ permalink raw reply related

* [RFC net-next 1/2] drivers/net: Create an ANCIENT_NETDEVICES symbol
From: Joe Perches @ 2016-03-19  0:33 UTC (permalink / raw)
  To: linux-kernel; +Cc: netdev
In-Reply-To: <cover.1458347329.git.joe@perches.com>

Many drivers are ancient and written for hardware that is no longer
available.  These drivers are effectively untested under current
kernels.  Add a symbol that could guard inclusions of these drivers
into modern kernels unless specifically requested.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/Kconfig | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 2a1ba62b..0878363 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -21,6 +21,25 @@ menuconfig NETDEVICES
 
 	  If unsure, say Y.
 
+menuconfig ANCIENT_NETDEVICES
+	   default n
+	   depends on NET && NETDEVICES
+	   bool "Network ancient device support"
+	   ---help---
+	   Many old devices are no longer manufactured.
+
+	   The drivers for these devices likely worked with the original
+	   kernel version when the devices were manufactured, but do not
+	   necessarily function well today.
+
+	   If these devices still exist and are still functional, the drivers
+	   for these devices get scant testing.
+
+	   The drivers for these devices are unmaintained and not supported by
+	   the vendor.
+
+	   If you are unsure that you need drivers for old hardware, say N.
+
 # All the following symbols are dependent on NETDEVICES - do not repeat
 # that for each of the symbols.
 if NETDEVICES
-- 
2.6.3.368.gf34be46

^ permalink raw reply related

* [RFC net-next 0/2] Create ancient subdirectories for old hardware
From: Joe Perches @ 2016-03-19  0:33 UTC (permalink / raw)
  To: netdev; +Cc: linux-kernel
In-Reply-To: <1458340518.26915.30.camel@perches.com>

Maybe something like this:

Old, rare, and unsupported hardware should be exposed as ancient.

The drivers for these ancient hardwares are generally untested with
current kernels.

Joe Perches (2):
  drivers/net: Create an ANCIENT_NETDEVICES symbol
  chelsio: Move original cxgb driver into ancient subdirectory

 drivers/net/Kconfig                                   | 19 +++++++++++++++++++
 drivers/net/ethernet/chelsio/Kconfig                  |  2 +-
 drivers/net/ethernet/chelsio/Makefile                 |  2 +-
 drivers/net/ethernet/chelsio/ancient/Makefile         |  1 +
 .../net/ethernet/chelsio/{ => ancient}/cxgb/Makefile  |  0
 .../net/ethernet/chelsio/{ => ancient}/cxgb/common.h  |  0
 .../net/ethernet/chelsio/{ => ancient}/cxgb/cphy.h    |  0
 .../ethernet/chelsio/{ => ancient}/cxgb/cpl5_cmd.h    |  0
 .../net/ethernet/chelsio/{ => ancient}/cxgb/cxgb2.c   |  0
 .../net/ethernet/chelsio/{ => ancient}/cxgb/elmer0.h  |  0
 .../net/ethernet/chelsio/{ => ancient}/cxgb/espi.c    |  0
 .../net/ethernet/chelsio/{ => ancient}/cxgb/espi.h    |  0
 .../ethernet/chelsio/{ => ancient}/cxgb/fpga_defs.h   |  0
 .../net/ethernet/chelsio/{ => ancient}/cxgb/gmac.h    |  0
 .../ethernet/chelsio/{ => ancient}/cxgb/mv88e1xxx.c   |  0
 .../ethernet/chelsio/{ => ancient}/cxgb/mv88e1xxx.h   |  0
 .../ethernet/chelsio/{ => ancient}/cxgb/mv88x201x.c   |  0
 .../net/ethernet/chelsio/{ => ancient}/cxgb/my3126.c  |  0
 .../net/ethernet/chelsio/{ => ancient}/cxgb/pm3393.c  |  0
 .../net/ethernet/chelsio/{ => ancient}/cxgb/regs.h    |  0
 drivers/net/ethernet/chelsio/{ => ancient}/cxgb/sge.c |  0
 drivers/net/ethernet/chelsio/{ => ancient}/cxgb/sge.h |  0
 .../net/ethernet/chelsio/{ => ancient}/cxgb/subr.c    |  0
 .../chelsio/{ => ancient}/cxgb/suni1x10gexp_regs.h    |  0
 drivers/net/ethernet/chelsio/{ => ancient}/cxgb/tp.c  |  0
 drivers/net/ethernet/chelsio/{ => ancient}/cxgb/tp.h  |  0
 .../net/ethernet/chelsio/{ => ancient}/cxgb/vsc7326.c |  0
 .../ethernet/chelsio/{ => ancient}/cxgb/vsc7326_reg.h |  0
 28 files changed, 22 insertions(+), 2 deletions(-)
 create mode 100644 drivers/net/ethernet/chelsio/ancient/Makefile
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/Makefile (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/common.h (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/cphy.h (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/cpl5_cmd.h (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/cxgb2.c (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/elmer0.h (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/espi.c (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/espi.h (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/fpga_defs.h (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/gmac.h (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/mv88e1xxx.c (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/mv88e1xxx.h (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/mv88x201x.c (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/my3126.c (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/pm3393.c (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/regs.h (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/sge.c (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/sge.h (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/subr.c (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/suni1x10gexp_regs.h (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/tp.c (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/tp.h (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/vsc7326.c (100%)
 rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/vsc7326_reg.h (100%)

-- 
2.6.3.368.gf34be46

^ permalink raw reply

* Re: [RFC PATCH 6/9] ethtool: Add support for toggling any of the GSO offloads
From: Alexander Duyck @ 2016-03-19  0:30 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: Alexander Duyck, Edward Cree, Netdev, David Miller, Tom Herbert
In-Reply-To: <1458346684.2953.16.camel@decadent.org.uk>

On Fri, Mar 18, 2016 at 5:18 PM, Ben Hutchings <ben@decadent.org.uk> wrote:
> On Fri, 2016-03-18 at 16:25 -0700, Alexander Duyck wrote:
>
>> The strings were missing for several of the GSO offloads that are
>> available.  This patch provides the missing strings so that we can toggle
>> or query any of them via the ethtool command.
>>
>> Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
>> ---
>>  net/core/ethtool.c |    3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/net/core/ethtool.c b/net/core/ethtool.c
>> index 2966cd0d7c93..b3c39d531469 100644
>> --- a/net/core/ethtool.c
>> +++ b/net/core/ethtool.c
>> @@ -82,9 +82,12 @@ static const char netdev_features_strings[NETDEV_FEATURE_COUNT][ETH_GSTRING_LEN]
>>       [NETIF_F_TSO6_BIT] =             "tx-tcp6-segmentation",
>>       [NETIF_F_FSO_BIT] =              "tx-fcoe-segmentation",
>>       [NETIF_F_GSO_GRE_BIT] =          "tx-gre-segmentation",
>> +     [NETIF_F_GSO_GRE_CSUM_BIT] =     "tx-gre-csum-segmentation",
>
> All of the existing checksum offload names include the word "checksum"
> in full, so I think the new names should do the same.

It isn't a checksum offload though, it is a segmentation offload for a
tunnel that has an outer checksum.  I was hoping to avoid using the
word checksum as that might make it confusing as it is a segmentation
offload, not a checksum offload.

>>       [NETIF_F_GSO_IPIP_BIT] =         "tx-ipip-segmentation",
>>       [NETIF_F_GSO_SIT_BIT] =          "tx-sit-segmentation",
>>       [NETIF_F_GSO_UDP_TUNNEL_BIT] =   "tx-udp_tnl-segmentation",
>> +     [NETIF_F_GSO_UDP_TUNNEL_CSUM_BIT] = "tx-udp_tnl-csum-segmentation",
>> +     [NETIF_F_GSO_TUNNEL_REMCSUM_BIT] = "tx-remcsum-segmentation",
>
> I think this should be "tx-tunnel-remote-checksum-segmentation", though
> that is getting quite unwieldy.

Right.  As it is I think we might be coming up on the 32 character
limit for the strings.  Replacing csum with checksum would probably
push us over.

- Alex

^ permalink raw reply

* Re: [RFC PATCH 6/9] ethtool: Add support for toggling any of the GSO offloads
From: Ben Hutchings @ 2016-03-19  0:18 UTC (permalink / raw)
  To: Alexander Duyck, ecree, netdev, davem, alexander.duyck, tom
In-Reply-To: <20160318232516.14955.2907.stgit@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 1728 bytes --]

On Fri, 2016-03-18 at 16:25 -0700, Alexander Duyck wrote:

> The strings were missing for several of the GSO offloads that are
> available.  This patch provides the missing strings so that we can toggle
> or query any of them via the ethtool command.
> 
> Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
> ---
>  net/core/ethtool.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/net/core/ethtool.c b/net/core/ethtool.c
> index 2966cd0d7c93..b3c39d531469 100644
> --- a/net/core/ethtool.c
> +++ b/net/core/ethtool.c
> @@ -82,9 +82,12 @@ static const char netdev_features_strings[NETDEV_FEATURE_COUNT][ETH_GSTRING_LEN]
>  	[NETIF_F_TSO6_BIT] =             "tx-tcp6-segmentation",
>  	[NETIF_F_FSO_BIT] =              "tx-fcoe-segmentation",
>  	[NETIF_F_GSO_GRE_BIT] =		 "tx-gre-segmentation",
> +	[NETIF_F_GSO_GRE_CSUM_BIT] =	 "tx-gre-csum-segmentation",

All of the existing checksum offload names include the word "checksum"
in full, so I think the new names should do the same.

>  	[NETIF_F_GSO_IPIP_BIT] =	 "tx-ipip-segmentation",
>  	[NETIF_F_GSO_SIT_BIT] =		 "tx-sit-segmentation",
>  	[NETIF_F_GSO_UDP_TUNNEL_BIT] =	 "tx-udp_tnl-segmentation",
> +	[NETIF_F_GSO_UDP_TUNNEL_CSUM_BIT] = "tx-udp_tnl-csum-segmentation",
> +	[NETIF_F_GSO_TUNNEL_REMCSUM_BIT] = "tx-remcsum-segmentation",

I think this should be "tx-tunnel-remote-checksum-segmentation", though
that is getting quite unwieldy.

Ben.

>  	[NETIF_F_FCOE_CRC_BIT] =         "tx-checksum-fcoe-crc",
>  	[NETIF_F_SCTP_CRC_BIT] =        "tx-checksum-sctp",
> 
-- 
Ben Hutchings
To err is human; to really foul things up requires a computer.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply

* Re: [net-next] net: fix a comment typo
From: David Miller @ 2016-03-18 23:40 UTC (permalink / raw)
  To: zhangshengju; +Cc: netdev
In-Reply-To: <1458119566-22304-1-git-send-email-zhangshengju@cmss.chinamobile.com>

From: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Date: Wed, 16 Mar 2016 09:12:46 +0000

> Fix a comment typo.
> 
> Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>

Applied.

^ permalink raw reply

* Re: [patch] ethernet: micrel: fix some error codes
From: David Miller @ 2016-03-18 23:40 UTC (permalink / raw)
  To: dan.carpenter; +Cc: richard.rojfors, netdev, kernel-janitors
In-Reply-To: <20160316074510.GF12860@mwanda>

From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Wed, 16 Mar 2016 10:45:10 +0300

> There were two issues here:
> 1) dma_mapping_error() return true/false but we want to return -ENOMEM
> 2) If dmaengine_prep_slave_sg() failed then "err" wasn't set but
>    presumably that should be -ENOMEM as well.
> 
> I changed the success path to "return 0;" instead of "return ret;" for
> clarity.
> 
> Fixes: 94fe8c683cea ('ks8842: Support DMA when accessed via timberdale')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next 0/3] Minor BPF follow-ups
From: David Miller @ 2016-03-18 23:40 UTC (permalink / raw)
  To: daniel; +Cc: alexei.starovoitov, netdev
In-Reply-To: <cover.1458085814.git.daniel@iogearbox.net>

From: Daniel Borkmann <daniel@iogearbox.net>
Date: Wed, 16 Mar 2016 01:42:48 +0100

> Some minor last follow-ups I still had in my queue. The first one adds
> readability support for __sk_buff's tc_classid member, the remaining
> two are some minor cleanups. For details please see individual patches.

Series applied.

^ permalink raw reply

* Re: [PATCH] net: mvneta: bm: clarify dependencies
From: David Miller @ 2016-03-18 23:37 UTC (permalink / raw)
  To: arnd; +Cc: netdev, gregory.clement, mw, linux-kernel
In-Reply-To: <1458078449-635940-1-git-send-email-arnd@arndb.de>

From: Arnd Bergmann <arnd@arndb.de>
Date: Tue, 15 Mar 2016 22:47:14 +0100

> MVNETA_BM has a dependency on MVNETA, so we can only select the former
> if the latter is enabled. However, the code dependency is the reverse:
> The mvneta module can call into the mvneta_bm module, so mvneta cannot
> be a built-in if mvneta_bm is a module, or we get a link error:
> 
> drivers/net/built-in.o: In function `mvneta_remove':
> drivers/net/ethernet/marvell/mvneta.c:4211: undefined reference to `mvneta_bm_pool_destroy'
> drivers/net/built-in.o: In function `mvneta_bm_update_mtu':
> drivers/net/ethernet/marvell/mvneta.c:1034: undefined reference to `mvneta_bm_bufs_free'
> 
> This avoids the problem by further clarifying the dependency so that
> MVNETA_BM is a silent Kconfig option that gets turned on by the
> new MVNETA_BM_ENABLE option. This way both the core HWBM module and
> the MVNETA_BM code are always built-in when needed.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: dc35a10f68d3 ("net: mvneta: bm: add support for hardware buffer management")

Applied.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox