summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sun/sunvnet.h
diff options
context:
space:
mode:
authorDavid L Stevens <david.stevens@oracle.com>2014-09-29 19:48:18 -0400
committerDavid S. Miller <davem@davemloft.net>2014-09-30 17:10:39 -0400
commit42db672dca5b74f9c85c318b74b3b298e86cbe8e (patch)
tree01d6e63b6aca18dd889f0a3e6030028ad9ff019b /drivers/net/ethernet/sun/sunvnet.h
parent8e845f4cbbd2ef81846c2ab5dca46d88fb2717ee (diff)
downloadlinux-42db672dca5b74f9c85c318b74b3b298e86cbe8e.tar.bz2
sunvnet: allow admin to set sunvnet MTU
This patch allows an admin to set the MTU on a sunvnet device to arbitrary values between the minimum (68) and maximum (65535) IPv4 packet sizes. Signed-off-by: David L Stevens <david.stevens@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sun/sunvnet.h')
-rw-r--r--drivers/net/ethernet/sun/sunvnet.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/sun/sunvnet.h b/drivers/net/ethernet/sun/sunvnet.h
index 02f507db9951..c91104542619 100644
--- a/drivers/net/ethernet/sun/sunvnet.h
+++ b/drivers/net/ethernet/sun/sunvnet.h
@@ -16,7 +16,7 @@
*/
#define VNET_CLEAN_TIMEOUT ((HZ/100)+1)
-#define VNET_MAXPACKET 1518ULL /* ETH_FRAMELEN + VLAN_HDR */
+#define VNET_MAXPACKET (65535ULL + ETH_HLEN + VLAN_HLEN)
#define VNET_TX_RING_SIZE 512
#define VNET_TX_WAKEUP_THRESH(dr) ((dr)->pending / 4)
@@ -26,10 +26,12 @@
*/
#define VNET_PACKET_SKIP 6
+#define VNET_MAXCOOKIES (VNET_MAXPACKET/PAGE_SIZE + 1)
+
struct vnet_tx_entry {
struct sk_buff *skb;
unsigned int ncookies;
- struct ldc_trans_cookie cookies[2];
+ struct ldc_trans_cookie cookies[VNET_MAXCOOKIES];
};
struct vnet;