All of lore.kernel.org
 help / color / mirror / Atom feed
* [net-next PATCH v2 0/3] Feature tweaks/fixes follow-up to GSO partial patches
@ 2016-04-20 14:49 Alexander Duyck
  2016-04-20 14:49 ` [net-next PATCH v2 1/3] netdev_features: Fold NETIF_F_ALL_TSO into NETIF_F_GSO_SOFTWARE Alexander Duyck
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Alexander Duyck @ 2016-04-20 14:49 UTC (permalink / raw)
  To: netdev, davem, alexander.duyck

This patch series is a set of minor fix-ups and tweaks following the GSO
partial and TSO with IPv4 ID mangling patches.  It mostly is just meant to
make certain that if we have GSO partial support at the device we can make
use of it from the far end of the tunnel.

v2: Added cover page which was forgotten with first submission.
    Added patch that enables TSOv4 IP ID mangling w/ tunnels and/or VLANs.

---

Alexander Duyck (3):
      netdev_features: Fold NETIF_F_ALL_TSO into NETIF_F_GSO_SOFTWARE
      veth: Update features to include all tunnel GSO types
      net: Add support for IP ID mangling TSO in cases that require encapsulation


 drivers/net/veth.c              |    7 +++----
 include/linux/netdev_features.h |    8 +++-----
 net/core/dev.c                  |   11 +++++++++++
 3 files changed, 17 insertions(+), 9 deletions(-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [net-next PATCH v2 1/3] netdev_features: Fold NETIF_F_ALL_TSO into NETIF_F_GSO_SOFTWARE
  2016-04-20 14:49 [net-next PATCH v2 0/3] Feature tweaks/fixes follow-up to GSO partial patches Alexander Duyck
@ 2016-04-20 14:49 ` Alexander Duyck
  2016-04-20 14:49 ` [net-next PATCH v2 2/3] veth: Update features to include all tunnel GSO types Alexander Duyck
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Alexander Duyck @ 2016-04-20 14:49 UTC (permalink / raw)
  To: netdev, davem, alexander.duyck

This patch folds NETIF_F_ALL_TSO into the bitmask for NETIF_F_GSO_SOFTWARE.
The idea is to avoid duplication of defines since the only difference
between the two was the GSO_UDP bit.

Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
---
 include/linux/netdev_features.h |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
index 15eb0b12fff9..bc8736266749 100644
--- a/include/linux/netdev_features.h
+++ b/include/linux/netdev_features.h
@@ -152,11 +152,6 @@ enum {
 #define NETIF_F_GSO_MASK	(__NETIF_F_BIT(NETIF_F_GSO_LAST + 1) - \
 		__NETIF_F_BIT(NETIF_F_GSO_SHIFT))
 
-/* List of features with software fallbacks. */
-#define NETIF_F_GSO_SOFTWARE	(NETIF_F_TSO | NETIF_F_TSO_ECN | \
-				 NETIF_F_TSO_MANGLEID | \
-				 NETIF_F_TSO6 | NETIF_F_UFO)
-
 /* List of IP checksum features. Note that NETIF_F_ HW_CSUM should not be
  * set in features when NETIF_F_IP_CSUM or NETIF_F_IPV6_CSUM are set--
  * this would be contradictory
@@ -170,6 +165,9 @@ enum {
 #define NETIF_F_ALL_FCOE	(NETIF_F_FCOE_CRC | NETIF_F_FCOE_MTU | \
 				 NETIF_F_FSO)
 
+/* List of features with software fallbacks. */
+#define NETIF_F_GSO_SOFTWARE	(NETIF_F_ALL_TSO | NETIF_F_UFO)
+
 /*
  * If one device supports one of these features, then enable them
  * for all in netdev_increment_features.

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [net-next PATCH v2 2/3] veth: Update features to include all tunnel GSO types
  2016-04-20 14:49 [net-next PATCH v2 0/3] Feature tweaks/fixes follow-up to GSO partial patches Alexander Duyck
  2016-04-20 14:49 ` [net-next PATCH v2 1/3] netdev_features: Fold NETIF_F_ALL_TSO into NETIF_F_GSO_SOFTWARE Alexander Duyck
@ 2016-04-20 14:49 ` Alexander Duyck
  2016-04-20 14:49 ` [net-next PATCH v2 3/3] net: Add support for IP ID mangling TSO in cases that require encapsulation Alexander Duyck
  2016-04-21 19:11 ` [net-next PATCH v2 0/3] Feature tweaks/fixes follow-up to GSO partial patches David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: Alexander Duyck @ 2016-04-20 14:49 UTC (permalink / raw)
  To: netdev, davem, alexander.duyck

This patch adds support for the checksum enabled versions of UDP and GRE
tunnels.  With this change we should be able to send and receive GSO frames
of these types over the veth pair without needing to segment the packets.

Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
---
 drivers/net/veth.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index 4f30a6ae50d0..f37a6e61d4ad 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -312,10 +312,9 @@ static const struct net_device_ops veth_netdev_ops = {
 	.ndo_set_rx_headroom	= veth_set_rx_headroom,
 };
 
-#define VETH_FEATURES (NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_ALL_TSO |    \
-		       NETIF_F_HW_CSUM | NETIF_F_RXCSUM | NETIF_F_HIGHDMA | \
-		       NETIF_F_GSO_GRE | NETIF_F_GSO_UDP_TUNNEL |	    \
-		       NETIF_F_GSO_IPIP | NETIF_F_GSO_SIT | NETIF_F_UFO	|   \
+#define VETH_FEATURES (NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HW_CSUM | \
+		       NETIF_F_RXCSUM | NETIF_F_HIGHDMA | \
+		       NETIF_F_GSO_SOFTWARE | NETIF_F_GSO_ENCAP_ALL | \
 		       NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX | \
 		       NETIF_F_HW_VLAN_STAG_TX | NETIF_F_HW_VLAN_STAG_RX )
 

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [net-next PATCH v2 3/3] net: Add support for IP ID mangling TSO in cases that require encapsulation
  2016-04-20 14:49 [net-next PATCH v2 0/3] Feature tweaks/fixes follow-up to GSO partial patches Alexander Duyck
  2016-04-20 14:49 ` [net-next PATCH v2 1/3] netdev_features: Fold NETIF_F_ALL_TSO into NETIF_F_GSO_SOFTWARE Alexander Duyck
  2016-04-20 14:49 ` [net-next PATCH v2 2/3] veth: Update features to include all tunnel GSO types Alexander Duyck
@ 2016-04-20 14:49 ` Alexander Duyck
  2016-04-21 19:11 ` [net-next PATCH v2 0/3] Feature tweaks/fixes follow-up to GSO partial patches David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: Alexander Duyck @ 2016-04-20 14:49 UTC (permalink / raw)
  To: netdev, davem, alexander.duyck

This patch adds support for NETIF_F_TSO_MANGLEID if a given tunnel supports
NETIF_F_TSO.  This way if needed a device can then later enable the TSO
with IP ID mangling and the tunnels on top of that device can then also
make use of the IP ID mangling as well.

Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
---
 net/core/dev.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/net/core/dev.c b/net/core/dev.c
index 52d446b2cb99..6324bc9267f7 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -7029,8 +7029,19 @@ int register_netdevice(struct net_device *dev)
 	if (!(dev->flags & IFF_LOOPBACK))
 		dev->hw_features |= NETIF_F_NOCACHE_COPY;
 
+	/* If IPv4 TCP segmentation offload is supported we should also
+	 * allow the device to enable segmenting the frame with the option
+	 * of ignoring a static IP ID value.  This doesn't enable the
+	 * feature itself but allows the user to enable it later.
+	 */
 	if (dev->hw_features & NETIF_F_TSO)
 		dev->hw_features |= NETIF_F_TSO_MANGLEID;
+	if (dev->vlan_features & NETIF_F_TSO)
+		dev->vlan_features |= NETIF_F_TSO_MANGLEID;
+	if (dev->mpls_features & NETIF_F_TSO)
+		dev->mpls_features |= NETIF_F_TSO_MANGLEID;
+	if (dev->hw_enc_features & NETIF_F_TSO)
+		dev->hw_enc_features |= NETIF_F_TSO_MANGLEID;
 
 	/* Make NETIF_F_HIGHDMA inheritable to VLAN devices.
 	 */

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [net-next PATCH v2 0/3] Feature tweaks/fixes follow-up to GSO partial patches
  2016-04-20 14:49 [net-next PATCH v2 0/3] Feature tweaks/fixes follow-up to GSO partial patches Alexander Duyck
                   ` (2 preceding siblings ...)
  2016-04-20 14:49 ` [net-next PATCH v2 3/3] net: Add support for IP ID mangling TSO in cases that require encapsulation Alexander Duyck
@ 2016-04-21 19:11 ` David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2016-04-21 19:11 UTC (permalink / raw)
  To: aduyck; +Cc: netdev, alexander.duyck

From: Alexander Duyck <aduyck@mirantis.com>
Date: Wed, 20 Apr 2016 10:49:00 -0400

> This patch series is a set of minor fix-ups and tweaks following the GSO
> partial and TSO with IPv4 ID mangling patches.  It mostly is just meant to
> make certain that if we have GSO partial support at the device we can make
> use of it from the far end of the tunnel.
> 
> v2: Added cover page which was forgotten with first submission.
>     Added patch that enables TSOv4 IP ID mangling w/ tunnels and/or VLANs.

Since I already applied the first two patches, I just applied the third one
here by itself.

I hope that's OK.

Thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-04-21 19:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-20 14:49 [net-next PATCH v2 0/3] Feature tweaks/fixes follow-up to GSO partial patches Alexander Duyck
2016-04-20 14:49 ` [net-next PATCH v2 1/3] netdev_features: Fold NETIF_F_ALL_TSO into NETIF_F_GSO_SOFTWARE Alexander Duyck
2016-04-20 14:49 ` [net-next PATCH v2 2/3] veth: Update features to include all tunnel GSO types Alexander Duyck
2016-04-20 14:49 ` [net-next PATCH v2 3/3] net: Add support for IP ID mangling TSO in cases that require encapsulation Alexander Duyck
2016-04-21 19:11 ` [net-next PATCH v2 0/3] Feature tweaks/fixes follow-up to GSO partial patches David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.