X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fi40e%2Fi40e_ethdev.h;h=261954b9a036633b3e298207896801b4da829bed;hb=c345c7d1acf43b4d30e1ecdd5a8cd3402234a6aa;hp=38ac3ead67ac5e81e0e1e6248b8fe8caddcf4e5d;hpb=b066f1d62d6c2ed2f6cdd8a8169ea384685c3aa3;p=dpdk.git diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h index 38ac3ead67..261954b9a0 100644 --- a/drivers/net/i40e/i40e_ethdev.h +++ b/drivers/net/i40e/i40e_ethdev.h @@ -426,6 +426,22 @@ struct i40e_pf_vf { /* version of the virtchnl from VF */ struct virtchnl_version_info version; uint32_t request_caps; /* offload caps requested from VF */ + + /* + * Variables for store the arrival timestamp of VF messages. + * If the timestamp of latest message stored at + * `msg_timestamps[index % max]` then the timestamp of + * earliest message stored at `msg_time[(index + 1) % max]`. + * When a new message come, the timestamp of this message + * will be stored at `msg_timestamps[(index + 1) % max]` and the + * earliest message timestamp is at + * `msg_timestamps[(index + 2) % max]` now... + */ + uint32_t msg_index; + uint64_t *msg_timestamps; + + /* cycle of stop ignoring VF message */ + uint64_t ignore_end_cycle; }; /* @@ -900,6 +916,20 @@ struct i40e_rte_flow_rss_conf { uint16_t queue[I40E_MAX_Q_PER_TC]; /**< Queues indices to use. */ }; +struct i40e_vf_msg_cfg { + /* maximal VF message during a statistic period */ + uint32_t max_msg; + + /* statistic period, in second */ + uint32_t period; + /* + * If message statistics from a VF exceed the maximal limitation, + * the PF will ignore any new message from that VF for + * 'ignor_second' time. + */ + uint32_t ignore_second; +}; + /* * Structure to store private data specific for PF instance. */ @@ -975,6 +1005,8 @@ struct i40e_pf { struct i40e_customized_pctype customized_pctype[I40E_CUSTOMIZED_MAX]; /* Switch Domain Id */ uint16_t switch_domain_id; + + struct i40e_vf_msg_cfg vf_msg_cfg; }; enum pending_msg {