aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hyperv/hyperv_net.h
diff options
context:
space:
mode:
authorKY Srinivasan <kys@microsoft.com>2014-03-08 22:23:18 -0500
committerDavid S. Miller <davem@davemloft.net>2014-03-10 15:51:37 -0400
commit77bf5487946254798ed7f265877939c703189f1e (patch)
tree5420a2dc396c09173940c73d761f0aea0fd6bed5 /drivers/net/hyperv/hyperv_net.h
parent08cd04bf6d5b14ea90845b596d371bfa33eaba06 (diff)
Drivers: net: hyperv: Enable large send offload
Enable segmentation offload. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv/hyperv_net.h')
-rw-r--r--drivers/net/hyperv/hyperv_net.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
index 4cf238234321..7d06b4959383 100644
--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
@@ -742,6 +742,10 @@ struct ndis_oject_header {
742#define NDIS_OFFLOAD_PARAMETERS_RX_ENABLED_TX_DISABLED 3 742#define NDIS_OFFLOAD_PARAMETERS_RX_ENABLED_TX_DISABLED 3
743#define NDIS_OFFLOAD_PARAMETERS_TX_RX_ENABLED 4 743#define NDIS_OFFLOAD_PARAMETERS_TX_RX_ENABLED 4
744 744
745#define NDIS_TCP_LARGE_SEND_OFFLOAD_V2_TYPE 1
746#define NDIS_TCP_LARGE_SEND_OFFLOAD_IPV4 0
747#define NDIS_TCP_LARGE_SEND_OFFLOAD_IPV6 1
748
745/* 749/*
746 * New offload OIDs for NDIS 6 750 * New offload OIDs for NDIS 6
747 */ 751 */
@@ -804,12 +808,48 @@ struct ndis_tcp_ip_checksum_info {
804 }; 808 };
805}; 809};
806 810
811struct ndis_tcp_lso_info {
812 union {
813 struct {
814 u32 unused:30;
815 u32 type:1;
816 u32 reserved2:1;
817 } transmit;
818 struct {
819 u32 mss:20;
820 u32 tcp_header_offset:10;
821 u32 type:1;
822 u32 reserved2:1;
823 } lso_v1_transmit;
824 struct {
825 u32 tcp_payload:30;
826 u32 type:1;
827 u32 reserved2:1;
828 } lso_v1_transmit_complete;
829 struct {
830 u32 mss:20;
831 u32 tcp_header_offset:10;
832 u32 type:1;
833 u32 ip_version:1;
834 } lso_v2_transmit;
835 struct {
836 u32 reserved:30;
837 u32 type:1;
838 u32 reserved2:1;
839 } lso_v2_transmit_complete;
840 u32 value;
841 };
842};
843
807#define NDIS_VLAN_PPI_SIZE (sizeof(struct rndis_per_packet_info) + \ 844#define NDIS_VLAN_PPI_SIZE (sizeof(struct rndis_per_packet_info) + \
808 sizeof(struct ndis_pkt_8021q_info)) 845 sizeof(struct ndis_pkt_8021q_info))
809 846
810#define NDIS_CSUM_PPI_SIZE (sizeof(struct rndis_per_packet_info) + \ 847#define NDIS_CSUM_PPI_SIZE (sizeof(struct rndis_per_packet_info) + \
811 sizeof(struct ndis_tcp_ip_checksum_info)) 848 sizeof(struct ndis_tcp_ip_checksum_info))
812 849
850#define NDIS_LSO_PPI_SIZE (sizeof(struct rndis_per_packet_info) + \
851 sizeof(struct ndis_tcp_lso_info))
852
813/* Format of Information buffer passed in a SetRequest for the OID */ 853/* Format of Information buffer passed in a SetRequest for the OID */
814/* OID_GEN_RNDIS_CONFIG_PARAMETER. */ 854/* OID_GEN_RNDIS_CONFIG_PARAMETER. */
815struct rndis_config_parameter_info { 855struct rndis_config_parameter_info {