hv_netvsc: remove VF in flight counters
[cascardo/linux.git] / drivers / net / hyperv / hyperv_net.h
index 591af71..1d49740 100644 (file)
@@ -84,8 +84,6 @@ struct ndis_recv_scale_cap { /* NDIS_RECEIVE_SCALE_CAPABILITIES */
 #define NDIS_RSS_HASH_SECRET_KEY_MAX_SIZE_REVISION_2   40
 
 #define ITAB_NUM 128
-#define HASH_KEYLEN NDIS_RSS_HASH_SECRET_KEY_MAX_SIZE_REVISION_2
-extern u8 netvsc_hash_key[];
 
 struct ndis_recv_scale_param { /* NDIS_RECEIVE_SCALE_PARAMETERS */
        struct ndis_obj_header hdr;
@@ -175,7 +173,7 @@ struct rndis_device {
 struct rndis_message;
 struct netvsc_device;
 int netvsc_device_add(struct hv_device *device, void *additional_info);
-int netvsc_device_remove(struct hv_device *device);
+void netvsc_device_remove(struct hv_device *device);
 int netvsc_send(struct hv_device *device,
                struct hv_netvsc_packet *packet,
                struct rndis_message *rndis_msg,
@@ -490,6 +488,7 @@ struct nvsp_2_vsc_capability {
                        u64 sriov:1;
                        u64 ieee8021q:1;
                        u64 correlation_id:1;
+                       u64 teaming:1;
                };
        };
 } __packed;
@@ -633,12 +632,34 @@ struct multi_send_data {
        u32 count; /* counter of batched packets */
 };
 
+struct recv_comp_data {
+       u64 tid; /* transaction id */
+       u32 status;
+};
+
+/* Netvsc Receive Slots Max */
+#define NETVSC_RECVSLOT_MAX (NETVSC_RECEIVE_BUFFER_SIZE / ETH_DATA_LEN + 1)
+
+struct multi_recv_comp {
+       void *buf; /* queued receive completions */
+       u32 first; /* first data entry */
+       u32 next; /* next entry for writing */
+};
+
 struct netvsc_stats {
        u64 packets;
        u64 bytes;
        struct u64_stats_sync syncp;
 };
 
+struct netvsc_ethtool_stats {
+       unsigned long tx_scattered;
+       unsigned long tx_no_memory;
+       unsigned long tx_no_space;
+       unsigned long tx_too_big;
+       unsigned long tx_busy;
+};
+
 struct netvsc_reconfig {
        struct list_head list;
        u32 event;
@@ -668,14 +689,14 @@ struct net_device_context {
        /* Ethtool settings */
        u8 duplex;
        u32 speed;
+       struct netvsc_ethtool_stats eth_stats;
 
        /* the device is going away */
        bool start_remove;
 
        /* State to manage the associated VF interface. */
-       struct net_device *vf_netdev;
-       bool vf_inject;
-       atomic_t vf_use_cnt;
+       struct net_device __rcu *vf_netdev;
+
        /* 1: allocated, serial number is valid. 0: not allocated */
        u32 vf_alloc;
        /* Serial number of the VF to team with */
@@ -735,6 +756,9 @@ struct netvsc_device {
        u32 max_pkt; /* max number of pkt in one send, e.g. 8 */
        u32 pkt_align; /* alignment bytes, e.g. 8 */
 
+       struct multi_recv_comp mrc[VRSS_CHANNEL_MAX];
+       atomic_t num_outstanding_recvs;
+
        atomic_t open_cnt;
 };