@@ -2263,12 +2263,17 @@ struct net_device {
/* for setting kernel sock attribute on TCP connection setup */
#define GSO_LEGACY_MAX_SIZE 65536u
-#define GSO_MAX_SIZE UINT_MAX
+#define GSO_MAX_SEGS 65535u
+
+/* TCP minimal MSS is 8 (TCP_MIN_GSO_SIZE),
+ * and shinfo->gso_segs is a 16bit field.
+ */
+#define GSO_MAX_SIZE (8 * GSO_MAX_SEGS)
+
unsigned int gso_max_size;
#define TSO_LEGACY_MAX_SIZE 65536
#define TSO_MAX_SIZE UINT_MAX
unsigned int tso_max_size;
-#define GSO_MAX_SEGS 65535
u16 gso_max_segs;
#define TSO_MAX_SEGS U16_MAX
u16 tso_max_segs;