summaryrefslogtreecommitdiffstats
path: root/src/plugins/avf/device.c
diff options
context:
space:
mode:
authorChenmin Sun <chenmin.sun@intel.com>2020-11-19 23:13:30 +0800
committerDamjan Marion <dmarion@me.com>2021-03-26 08:30:54 +0000
commitffe9a5489499467dfb5a2ee0fed14e397f5f825c (patch)
tree317bc75b046ebe13f27a99b6929a706140a5183a /src/plugins/avf/device.c
parent89c98a4bff101ad4270724bde7ca6f21ba4c8482 (diff)
avf: add avf flow framework
This patch adds the flow support to VPP avf_plugin. Currently only IP4-N-TUPLE and GTPU flow are supported as a reference. More flows will be added later. Type: feature Signed-off-by: Chenmin Sun <chenmin.sun@intel.com> Change-Id: I563dbfacecd3eba31e8c3c7769142ea6adba54b6
Diffstat (limited to 'src/plugins/avf/device.c')
-rw-r--r--src/plugins/avf/device.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/plugins/avf/device.c b/src/plugins/avf/device.c
index e4305251b23..def8a799ecb 100644
--- a/src/plugins/avf/device.c
+++ b/src/plugins/avf/device.c
@@ -25,7 +25,7 @@
#include <avf/avf.h>
#define AVF_MBOX_LEN 64
-#define AVF_MBOX_BUF_SZ 512
+#define AVF_MBOX_BUF_SZ 4096
#define AVF_RXQ_SZ 512
#define AVF_TXQ_SZ 512
#define AVF_ITR_INT 250
@@ -556,10 +556,11 @@ avf_op_get_vf_resources (vlib_main_t * vm, avf_device_t * ad,
virtchnl_vf_resource_t * res)
{
clib_error_t *err = 0;
- u32 bitmap = (VIRTCHNL_VF_OFFLOAD_L2 | VIRTCHNL_VF_OFFLOAD_RSS_PF |
- VIRTCHNL_VF_OFFLOAD_WB_ON_ITR | VIRTCHNL_VF_OFFLOAD_VLAN |
- VIRTCHNL_VF_OFFLOAD_RX_POLLING |
- VIRTCHNL_VF_CAP_ADV_LINK_SPEED);
+ u32 bitmap =
+ (VIRTCHNL_VF_OFFLOAD_L2 | VIRTCHNL_VF_OFFLOAD_RSS_PF |
+ VIRTCHNL_VF_OFFLOAD_WB_ON_ITR | VIRTCHNL_VF_OFFLOAD_VLAN |
+ VIRTCHNL_VF_OFFLOAD_RX_POLLING | VIRTCHNL_VF_CAP_ADV_LINK_SPEED |
+ VIRTCHNL_VF_OFFLOAD_FDIR_PF | VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF);
avf_log_debug (ad, "get_vf_reqources: bitmap 0x%x", bitmap);
err = avf_send_to_pf (vm, ad, VIRTCHNL_OP_GET_VF_RESOURCES, &bitmap,
@@ -1830,8 +1831,7 @@ avf_program_flow (u32 dev_instance, int is_add, u8 *rule, u32 rule_len,
}
/* *INDENT-OFF* */
-VNET_DEVICE_CLASS (avf_device_class,) =
-{
+VNET_DEVICE_CLASS (avf_device_class, ) = {
.name = "Adaptive Virtual Function (AVF) interface",
.clear_counters = avf_clear_hw_interface_counters,
.format_device = format_avf_device,
@@ -1842,6 +1842,7 @@ VNET_DEVICE_CLASS (avf_device_class,) =
.mac_addr_add_del_function = avf_add_del_mac_address,
.tx_function_n_errors = AVF_TX_N_ERROR,
.tx_function_error_strings = avf_tx_func_error_strings,
+ .flow_ops_function = avf_flow_ops_fn,
};
/* *INDENT-ON* */