aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hyperv/hyperv_net.h
diff options
context:
space:
mode:
authorHaiyang Zhang <haiyangz@microsoft.com>2015-04-06 15:22:53 -0700
committerDavid S. Miller <davem@davemloft.net>2015-04-07 18:45:33 -0400
commit721514222db13498613706709409c21c105e0f4a (patch)
treedfca6e70440efd1db7f40d92196fbd4924a8f4c8 /drivers/net/hyperv/hyperv_net.h
parenthv_netvsc: Clean up two unused variables (diff)
downloadlinux-dev-721514222db13498613706709409c21c105e0f4a.tar.xz
linux-dev-721514222db13498613706709409c21c105e0f4a.zip
hv_netvsc: Define a macro RNDIS_AND_PPI_SIZE
The sum of RNDIS msg and PPI struct sizes is used in multiple places, so we define a macro for them. Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Reviewed-by: K. Y. Srinivasan <kys@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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
index 95a25e4b2601..80bc52eb000c 100644
--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
@@ -958,6 +958,10 @@ struct ndis_tcp_lso_info {
#define NDIS_HASH_PPI_SIZE (sizeof(struct rndis_per_packet_info) + \
sizeof(u32))
+/* Total size of all PPI data */
+#define NDIS_ALL_PPI_SIZE (NDIS_VLAN_PPI_SIZE + NDIS_CSUM_PPI_SIZE + \
+ NDIS_LSO_PPI_SIZE + NDIS_HASH_PPI_SIZE)
+
/* Format of Information buffer passed in a SetRequest for the OID */
/* OID_GEN_RNDIS_CONFIG_PARAMETER. */
struct rndis_config_parameter_info {
@@ -1170,6 +1174,8 @@ struct rndis_message {
#define RNDIS_HEADER_SIZE (sizeof(struct rndis_message) - \
sizeof(union rndis_message_container))
+#define RNDIS_AND_PPI_SIZE (sizeof(struct rndis_message) + NDIS_ALL_PPI_SIZE)
+
#define NDIS_PACKET_TYPE_DIRECTED 0x00000001
#define NDIS_PACKET_TYPE_MULTICAST 0x00000002
#define NDIS_PACKET_TYPE_ALL_MULTICAST 0x00000004