summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorWei Liu <wei.liu2@citrix.com>2013-04-22 02:20:41 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-06-07 16:02:15 -0700
commit6cc43d85ca1752b61135559aa35b8aebadc17252 (patch)
tree0d27b7712635d5466d4e2b4c2b9682bdf13bd66e /include
parentb3c463e8762ce90f22efbef947094467909011ea (diff)
xen-netfront: reduce gso_max_size to account for max TCP header
commit 9ecd1a75d977e2e8c48139c7d3efed183f898d94 upstream. The maximum packet including header that can be handled by netfront / netback wire format is 65535. Reduce gso_max_size accordingly. Drop skb and print warning when skb->len > 65535. This can 1) save the effort to send malformed packet to netback, 2) help spotting misconfiguration of netfront in the future. Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net> [bwh: Backported to 3.2: adjust context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk> [hq: Backported to 3.4: adjust context] Signed-off-by: Qiang Huang <h.huangqiang@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/xen/interface/io/netif.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/xen/interface/io/netif.h b/include/xen/interface/io/netif.h
index a36c87a6623d..d4635cd786b4 100644
--- a/include/xen/interface/io/netif.h
+++ b/include/xen/interface/io/netif.h
@@ -65,6 +65,7 @@
#define _XEN_NETTXF_extra_info (3)
#define XEN_NETTXF_extra_info (1U<<_XEN_NETTXF_extra_info)
+#define XEN_NETIF_MAX_TX_SIZE 0xFFFF
struct xen_netif_tx_request {
grant_ref_t gref; /* Reference to buffer page */
uint16_t offset; /* Offset within buffer page */