X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fcommon%2Fsfc_efx%2Fbase%2Fefx.h;h=24e1314cc391fa4314f8dc2b1b518925d48f7ac6;hb=c4f4a0e60dcb2a3877a4a751d7641fa1d9c46c29;hp=cc173d13c6c29c520467657f9313677ba412a27d;hpb=c0a77efb9cc31f473815619fef2ff1b18bc9345a;p=dpdk.git diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h index cc173d13c6..24e1314cc3 100644 --- a/drivers/common/sfc_efx/base/efx.h +++ b/drivers/common/sfc_efx/base/efx.h @@ -4093,6 +4093,7 @@ typedef struct efx_mae_limits_s { uint32_t eml_max_n_outer_prios; uint32_t eml_encap_types_supported; uint32_t eml_encap_header_size_limit; + uint32_t eml_max_n_counters; } efx_mae_limits_t; LIBEFX_API @@ -4306,6 +4307,27 @@ extern __checkReturn efx_rc_t efx_mae_action_set_populate_encap( __in efx_mae_actions_t *spec); +/* + * Use efx_mae_action_set_fill_in_counter_id() to set ID of a counter + * in the specification prior to action set allocation. + * + * NOTICE: the HW will conduct action COUNT after actions DECAP, + * VLAN_POP, VLAN_PUSH (if any) have been applied to the packet, + * but, as a workaround, this order is not validated by the API. + * + * The workaround helps to unblock DPDK + Open vSwitch use case. + * In Open vSwitch, this action is always the first to be added, + * in particular, it's known to be inserted before action DECAP, + * so enforcing the right order here would cause runtime errors. + * The existing behaviour in Open vSwitch is unlikely to change + * any time soon, and the workaround is a good solution because + * in fact the real COUNT order is a don't care to Open vSwitch. + */ +LIBEFX_API +extern __checkReturn efx_rc_t +efx_mae_action_set_populate_count( + __in efx_mae_actions_t *spec); + LIBEFX_API extern __checkReturn efx_rc_t efx_mae_action_set_populate_flag( @@ -4410,6 +4432,18 @@ typedef struct efx_counter_s { uint32_t id; } efx_counter_t; +LIBEFX_API +extern __checkReturn unsigned int +efx_mae_action_set_get_nb_count( + __in const efx_mae_actions_t *spec); + +/* See description before efx_mae_action_set_populate_count(). */ +LIBEFX_API +extern __checkReturn efx_rc_t +efx_mae_action_set_fill_in_counter_id( + __in efx_mae_actions_t *spec, + __in const efx_counter_t *counter_idp); + /* Action set ID */ typedef struct efx_mae_aset_id_s { uint32_t id;