Commit f5f04bcf authored by David S. Miller's avatar David S. Miller

Merge branch 'sunvnet-next'

David L Stevens says:

====================
sunvnet: add SG, HW_CSUM, GSO, and TSO support

This patch set adds everything needed for TSO support in sunvnet. On my
test hardware, this increases the single-stream TCP throughput for the
default 1500-byte MTU Linux-Linux from ~2Gbps to 10Gbps and Linux-Solaris
from ~2Gbps to 6Gbps.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents bc6aaa14 368e36ed
......@@ -247,6 +247,25 @@ struct vio_net_desc {
struct ldc_trans_cookie cookies[0];
};
struct vio_net_dext {
u8 flags;
#define VNET_PKT_HASH 0x01
#define VNET_PKT_HCK_IPV4_HDRCKSUM 0x02
#define VNET_PKT_HCK_FULLCKSUM 0x04
#define VNET_PKT_IPV4_LSO 0x08
#define VNET_PKT_HCK_IPV4_HDRCKSUM_OK 0x10
#define VNET_PKT_HCK_FULLCKSUM_OK 0x20
u8 vnet_hashval;
u16 ipv4_lso_mss;
u32 resv3;
};
static inline struct vio_net_dext *vio_net_ext(struct vio_net_desc *desc)
{
return (struct vio_net_dext *)&desc->cookies[2];
}
#define VIO_MAX_RING_COOKIES 24
struct vio_dring_state {
......
This diff is collapsed.
......@@ -20,6 +20,9 @@
#define VNET_TX_RING_SIZE 512
#define VNET_TX_WAKEUP_THRESH(dr) ((dr)->pending / 4)
#define VNET_MINTSO 2048 /* VIO protocol's minimum TSO len */
#define VNET_MAXTSO 65535 /* VIO protocol's maximum TSO len */
/* VNET packets are sent in buffers with the first 6 bytes skipped
* so that after the ethernet header the IPv4/IPv6 headers are aligned
* properly.
......@@ -40,8 +43,9 @@ struct vnet_port {
struct hlist_node hash;
u8 raddr[ETH_ALEN];
u8 switch_port;
u8 __pad;
unsigned switch_port:1;
unsigned tso:1;
unsigned __pad:14;
struct vnet *vp;
......@@ -56,6 +60,7 @@ struct vnet_port {
struct timer_list clean_timer;
u64 rmtu;
u16 tsolen;
struct napi_struct napi;
u32 napi_stop_idx;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment