X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fcommon%2Fsfc_efx%2Fbase%2Fefx.h;h=8e13075b0716128ef0001b785a3b0f62d5533b2d;hb=3dee345ab31a8cc685c9fe5ba3f90aa322ee1d48;hp=e3ac51eae02754ef4a585a306b4d8ae8e9c7a4e1;hpb=46d2b38ba9cd35dc9c8a67cbe7562e9426b7ce99;p=dpdk.git diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h index e3ac51eae0..8e13075b07 100644 --- a/drivers/common/sfc_efx/base/efx.h +++ b/drivers/common/sfc_efx/base/efx.h @@ -4070,6 +4070,7 @@ typedef struct efx_mae_limits_s { uint32_t eml_max_n_action_prios; uint32_t eml_max_n_outer_prios; uint32_t eml_encap_types_supported; + uint32_t eml_encap_header_size_limit; } efx_mae_limits_t; LIBEFX_API @@ -4102,6 +4103,10 @@ efx_mae_match_spec_fini( __in efx_mae_match_spec_t *spec); typedef enum efx_mae_field_id_e { + /* + * Fields which can be set by efx_mae_match_spec_field_set() + * or by using dedicated field-specific helper APIs. + */ EFX_MAE_FIELD_INGRESS_MPORT_SELECTOR = 0, EFX_MAE_FIELD_ETHER_TYPE_BE, EFX_MAE_FIELD_ETH_SADDR_BE, @@ -4139,6 +4144,12 @@ typedef enum efx_mae_field_id_e { EFX_MAE_FIELD_ENC_VNET_ID_BE, EFX_MAE_FIELD_OUTER_RULE_ID, + /* Single bits which can be set by efx_mae_match_spec_bit_set(). */ + EFX_MAE_FIELD_HAS_OVLAN, + EFX_MAE_FIELD_HAS_IVLAN, + EFX_MAE_FIELD_ENC_HAS_OVLAN, + EFX_MAE_FIELD_ENC_HAS_IVLAN, + EFX_MAE_FIELD_NIDS } efx_mae_field_id_t; @@ -4197,6 +4208,14 @@ efx_mae_match_spec_field_set( __in size_t mask_size, __in_bcount(mask_size) const uint8_t *mask); +/* The corresponding mask will be set to B_TRUE. */ +LIBEFX_API +extern __checkReturn efx_rc_t +efx_mae_match_spec_bit_set( + __in efx_mae_match_spec_t *spec, + __in efx_mae_field_id_t field_id, + __in boolean_t value); + /* If the mask argument is NULL, the API will use full mask by default. */ LIBEFX_API extern __checkReturn efx_rc_t @@ -4239,6 +4258,11 @@ efx_mae_action_set_spec_fini( __in efx_nic_t *enp, __in efx_mae_actions_t *spec); +LIBEFX_API +extern __checkReturn efx_rc_t +efx_mae_action_set_populate_decap( + __in efx_mae_actions_t *spec); + LIBEFX_API extern __checkReturn efx_rc_t efx_mae_action_set_populate_vlan_pop( @@ -4251,6 +4275,15 @@ efx_mae_action_set_populate_vlan_push( __in uint16_t tpid_be, __in uint16_t tci_be); +/* + * Use efx_mae_action_set_fill_in_eh_id() to set ID of the allocated + * encap. header in the specification prior to action set allocation. + */ +LIBEFX_API +extern __checkReturn efx_rc_t +efx_mae_action_set_populate_encap( + __in efx_mae_actions_t *spec); + LIBEFX_API extern __checkReturn efx_rc_t efx_mae_action_set_populate_flag( @@ -4324,6 +4357,33 @@ efx_mae_match_spec_outer_rule_id_set( __in efx_mae_match_spec_t *spec, __in const efx_mae_rule_id_t *or_idp); +/* Encap. header ID */ +typedef struct efx_mae_eh_id_s { + uint32_t id; +} efx_mae_eh_id_t; + +LIBEFX_API +extern __checkReturn efx_rc_t +efx_mae_encap_header_alloc( + __in efx_nic_t *enp, + __in efx_tunnel_protocol_t encap_type, + __in_bcount(header_size) uint8_t *header_data, + __in size_t header_size, + __out efx_mae_eh_id_t *eh_idp); + +LIBEFX_API +extern __checkReturn efx_rc_t +efx_mae_encap_header_free( + __in efx_nic_t *enp, + __in const efx_mae_eh_id_t *eh_idp); + +/* See description before efx_mae_action_set_populate_encap(). */ +LIBEFX_API +extern __checkReturn efx_rc_t +efx_mae_action_set_fill_in_eh_id( + __in efx_mae_actions_t *spec, + __in const efx_mae_eh_id_t *eh_idp); + /* Action set ID */ typedef struct efx_mae_aset_id_s { uint32_t id; @@ -4501,6 +4561,13 @@ efx_virtio_get_features( __in efx_virtio_device_type_t type, __out uint64_t *featuresp); +LIBEFX_API +extern __checkReturn efx_rc_t +efx_virtio_verify_features( + __in efx_nic_t *enp, + __in efx_virtio_device_type_t type, + __in uint64_t features); + #endif /* EFSYS_OPT_VIRTIO */ #ifdef __cplusplus