X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Favf%2Favf.h;h=744b58370e4bdcd5d572404d85f4b0480aca528b;hb=e5d34919b;hp=9836451e0128a4683c5b05c0c05fdf75b59862e2;hpb=47727c02df4c79c21c6ceffaff65222c32cf6996;p=vpp.git diff --git a/src/plugins/avf/avf.h b/src/plugins/avf/avf.h index 9836451e012..744b58370e4 100644 --- a/src/plugins/avf/avf.h +++ b/src/plugins/avf/avf.h @@ -22,6 +22,15 @@ #include +#define AVF_AQ_ENQ_SUSPEND_TIME 50e-6 +#define AVF_AQ_ENQ_MAX_WAIT_TIME 250e-3 + +#define AVF_RESET_SUSPEND_TIME 20e-3 +#define AVF_RESET_MAX_WAIT_TIME 1 + +#define AVF_SEND_TO_PF_SUSPEND_TIME 10e-3 +#define AVF_SEND_TO_PF_MAX_WAIT_TIME 1 + #define AVF_RXD_STATUS(x) (1ULL << x) #define AVF_RXD_STATUS_DD AVF_RXD_STATUS(0) #define AVF_RXD_STATUS_EOP AVF_RXD_STATUS(1) @@ -38,6 +47,21 @@ #define AVF_TXD_CMD_RS AVF_TXD_CMD(1) #define AVF_TXD_CMD_RSV AVF_TXD_CMD(2) +#define avf_log_err(dev, f, ...) \ + vlib_log (VLIB_LOG_LEVEL_ERR, avf_main.log_class, "%U: " f, \ + format_vlib_pci_addr, &dev->pci_addr, \ + ## __VA_ARGS__) + +#define avf_log_warn(dev, f, ...) \ + vlib_log (VLIB_LOG_LEVEL_WARNING, avf_main.log_class, "%U: " f, \ + format_vlib_pci_addr, &dev->pci_addr, \ + ## __VA_ARGS__) + +#define avf_log_debug(dev, f, ...) \ + vlib_log (VLIB_LOG_LEVEL_DEBUG, avf_main.log_class, "%U: " f, \ + format_vlib_pci_addr, &dev->pci_addr, \ + ## __VA_ARGS__) + #define foreach_avf_device_flags \ _(0, INITIALIZED, "initialized") \ _(1, ERROR, "error") \ @@ -158,9 +182,11 @@ typedef struct u32 rss_key_size; u32 rss_lut_size; virtchnl_link_speed_t link_speed; + vlib_pci_addr_t pci_addr; /* stats */ virtchnl_eth_stats_t eth_stats; + virtchnl_eth_stats_t last_cleared_eth_stats; /* error */ clib_error_t *error; @@ -300,13 +326,15 @@ avf_rxd_is_not_dd (avf_rx_desc_t * d) typedef struct { - u32 next_index; + u16 qid; + u16 next_index; u32 hw_if_index; u64 qw1s[AVF_RX_MAX_DESC_IN_CHAIN]; } avf_input_trace_t; #define foreach_avf_tx_func_error \ -_(NO_FREE_SLOTS, "no free tx slots") + _(SEGMENT_SIZE_EXCEEDED, "segment size exceeded") \ + _(NO_FREE_SLOTS, "no free tx slots") typedef enum {