X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fbnxt%2Ftf_core%2Ftf_device.h;h=01726c3126b1933075a3bad6ca4ca87f6361bece;hb=77805a17a3e082f1ae1366ea59f61035985446cc;hp=8b63ff178418546249d7a218eca0c01237f92102;hpb=8187694b156314ec76ccf33afc02156d9cc675a7;p=dpdk.git diff --git a/drivers/net/bnxt/tf_core/tf_device.h b/drivers/net/bnxt/tf_core/tf_device.h index 8b63ff1784..01726c3126 100644 --- a/drivers/net/bnxt/tf_core/tf_device.h +++ b/drivers/net/bnxt/tf_core/tf_device.h @@ -27,6 +27,7 @@ struct tf_session; * TF device information */ struct tf_dev_info { + enum tf_device_type type; const struct tf_dev_ops *ops; }; @@ -56,10 +57,12 @@ struct tf_dev_info { * * Returns * - (0) if successful. - * - (-EINVAL) on failure. + * - (-EINVAL) parameter failure. + * - (-ENODEV) no such device supported. */ int dev_bind(struct tf *tfp, enum tf_device_type type, + bool shadow_copy, struct tf_session_resources *resources, struct tf_dev_info *dev_handle); @@ -71,6 +74,11 @@ int dev_bind(struct tf *tfp, * * [in] dev_handle * Device handle + * + * Returns + * - (0) if successful. + * - (-EINVAL) parameter failure. + * - (-ENODEV) no such device supported. */ int dev_unbind(struct tf *tfp, struct tf_dev_info *dev_handle); @@ -84,6 +92,44 @@ int dev_unbind(struct tf *tfp, * different device variants. */ struct tf_dev_ops { + /** + * Retrieves the MAX number of resource types that the device + * supports. + * + * [in] tfp + * Pointer to TF handle + * + * [out] max_types + * Pointer to MAX number of types the device supports + * + * Returns + * - (0) if successful. + * - (-EINVAL) on failure. + */ + int (*tf_dev_get_max_types)(struct tf *tfp, + uint16_t *max_types); + + /** + * Retrieves the WC TCAM slice information that the device + * supports. + * + * [in] tfp + * Pointer to TF handle + * + * [out] slice_size + * Pointer to slice size the device supports + * + * [out] num_slices_per_row + * Pointer to number of slices per row the device supports + * + * Returns + * - (0) if successful. + * - (-EINVAL) on failure. + */ + int (*tf_dev_get_wc_tcam_slices)(struct tf *tfp, + uint16_t *slice_size, + uint16_t *num_slices_per_row); + /** * Allocation of an identifier element. * @@ -134,14 +180,14 @@ struct tf_dev_ops { * Pointer to TF handle * * [in] parms - * Pointer to table type allocation parameters + * Pointer to table allocation parameters * * Returns * - (0) if successful. * - (-EINVAL) on failure. */ - int (*tf_dev_alloc_tbl_type)(struct tf *tfp, - struct tf_tbl_type_alloc_parms *parms); + int (*tf_dev_alloc_tbl)(struct tf *tfp, + struct tf_tbl_alloc_parms *parms); /** * Free of a table type element. @@ -153,14 +199,14 @@ struct tf_dev_ops { * Pointer to TF handle * * [in] parms - * Pointer to table type free parameters + * Pointer to table free parameters * * Returns * - (0) if successful. * - (-EINVAL) on failure. */ - int (*tf_dev_free_tbl_type)(struct tf *tfp, - struct tf_tbl_type_free_parms *parms); + int (*tf_dev_free_tbl)(struct tf *tfp, + struct tf_tbl_free_parms *parms); /** * Searches for the specified table type element in a shadow DB. @@ -175,15 +221,14 @@ struct tf_dev_ops { * Pointer to TF handle * * [in] parms - * Pointer to table type allocation and search parameters + * Pointer to table allocation and search parameters * * Returns * - (0) if successful. * - (-EINVAL) on failure. */ - int (*tf_dev_alloc_search_tbl_type) - (struct tf *tfp, - struct tf_tbl_type_alloc_search_parms *parms); + int (*tf_dev_alloc_search_tbl)(struct tf *tfp, + struct tf_tbl_alloc_search_parms *parms); /** * Sets the specified table type element. @@ -195,14 +240,14 @@ struct tf_dev_ops { * Pointer to TF handle * * [in] parms - * Pointer to table type set parameters + * Pointer to table set parameters * * Returns * - (0) if successful. * - (-EINVAL) on failure. */ - int (*tf_dev_set_tbl_type)(struct tf *tfp, - struct tf_tbl_type_set_parms *parms); + int (*tf_dev_set_tbl)(struct tf *tfp, + struct tf_tbl_set_parms *parms); /** * Retrieves the specified table type element. @@ -214,14 +259,14 @@ struct tf_dev_ops { * Pointer to TF handle * * [in] parms - * Pointer to table type get parameters + * Pointer to table get parameters * * Returns * - (0) if successful. * - (-EINVAL) on failure. */ - int (*tf_dev_get_tbl_type)(struct tf *tfp, - struct tf_tbl_type_get_parms *parms); + int (*tf_dev_get_tbl)(struct tf *tfp, + struct tf_tbl_get_parms *parms); /** * Allocation of a tcam element. @@ -321,6 +366,38 @@ struct tf_dev_ops { */ int (*tf_dev_get_tcam)(struct tf *tfp, struct tf_tcam_get_parms *parms); + + /** + * Insert EM hash entry API + * + * [in] tfp + * Pointer to TF handle + * + * [in] parms + * Pointer to E/EM insert parameters + * + * Returns: + * 0 - Success + * -EINVAL - Error + */ + int (*tf_dev_insert_em_entry)(struct tf *tfp, + struct tf_insert_em_entry_parms *parms); + + /** + * Delete EM hash entry API + * + * [in] tfp + * Pointer to TF handle + * + * [in] parms + * Pointer to E/EM delete parameters + * + * returns: + * 0 - Success + * -EINVAL - Error + */ + int (*tf_dev_delete_em_entry)(struct tf *tfp, + struct tf_delete_em_entry_parms *parms); }; /**