aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hyperv/hyperv_net.h
diff options
context:
space:
mode:
authorKY Srinivasan <kys@microsoft.com>2014-03-08 22:23:15 -0500
committerDavid S. Miller <davem@davemloft.net>2014-03-10 15:51:37 -0400
commit4a0e70ae5e3858052f6d91564bf3484f1eb91dc7 (patch)
treead22a782fadd04320ac9ec061036a4f236d39130 /drivers/net/hyperv/hyperv_net.h
parent8a00251a3682a23649cef36949c8019f8589c021 (diff)
Drivers: net: hyperv: Enable offloads on the host
Prior to enabling guest side offloads, enable the offloads on the host. 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.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
index 694bf7cada90..8bc4e766589b 100644
--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
@@ -721,6 +721,61 @@ struct ndis_pkt_8021q_info {
721 }; 721 };
722}; 722};
723 723
724struct ndis_oject_header {
725 u8 type;
726 u8 revision;
727 u16 size;
728};
729
730#define NDIS_OBJECT_TYPE_DEFAULT 0x80
731#define NDIS_OFFLOAD_PARAMETERS_REVISION_3 3
732#define NDIS_OFFLOAD_PARAMETERS_NO_CHANGE 0
733#define NDIS_OFFLOAD_PARAMETERS_LSOV2_DISABLED 1
734#define NDIS_OFFLOAD_PARAMETERS_LSOV2_ENABLED 2
735#define NDIS_OFFLOAD_PARAMETERS_LSOV1_ENABLED 2
736#define NDIS_OFFLOAD_PARAMETERS_RSC_DISABLED 1
737#define NDIS_OFFLOAD_PARAMETERS_RSC_ENABLED 2
738#define NDIS_OFFLOAD_PARAMETERS_TX_RX_DISABLED 1
739#define NDIS_OFFLOAD_PARAMETERS_TX_ENABLED_RX_DISABLED 2
740#define NDIS_OFFLOAD_PARAMETERS_RX_ENABLED_TX_DISABLED 3
741#define NDIS_OFFLOAD_PARAMETERS_TX_RX_ENABLED 4
742
743/*
744 * New offload OIDs for NDIS 6
745 */
746#define OID_TCP_OFFLOAD_CURRENT_CONFIG 0xFC01020B /* query only */
747#define OID_TCP_OFFLOAD_PARAMETERS 0xFC01020C /* set only */
748#define OID_TCP_OFFLOAD_HARDWARE_CAPABILITIES 0xFC01020D/* query only */
749#define OID_TCP_CONNECTION_OFFLOAD_CURRENT_CONFIG 0xFC01020E /* query only */
750#define OID_TCP_CONNECTION_OFFLOAD_HARDWARE_CAPABILITIES 0xFC01020F /* query */
751#define OID_OFFLOAD_ENCAPSULATION 0x0101010A /* set/query */
752
753struct ndis_offload_params {
754 struct ndis_oject_header header;
755 u8 ip_v4_csum;
756 u8 tcp_ip_v4_csum;
757 u8 udp_ip_v4_csum;
758 u8 tcp_ip_v6_csum;
759 u8 udp_ip_v6_csum;
760 u8 lso_v1;
761 u8 ip_sec_v1;
762 u8 lso_v2_ipv4;
763 u8 lso_v2_ipv6;
764 u8 tcp_connection_ip_v4;
765 u8 tcp_connection_ip_v6;
766 u32 flags;
767 u8 ip_sec_v2;
768 u8 ip_sec_v2_ip_v4;
769 struct {
770 u8 rsc_ip_v4;
771 u8 rsc_ip_v6;
772 };
773 struct {
774 u8 encapsulated_packet_task_offload;
775 u8 encapsulation_types;
776 };
777};
778
724#define NDIS_VLAN_PPI_SIZE (sizeof(struct rndis_per_packet_info) + \ 779#define NDIS_VLAN_PPI_SIZE (sizeof(struct rndis_per_packet_info) + \
725 sizeof(struct ndis_pkt_8021q_info)) 780 sizeof(struct ndis_pkt_8021q_info))
726 781