MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ena_com_rss_init

Function ena_com_rss_init

dpdk/drivers/net/ena/base/ena_com.c:3058–3091  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3056}
3057
3058int ena_com_rss_init(struct ena_com_dev *ena_dev, u16 indr_tbl_log_size)
3059{
3060 int rc;
3061
3062 memset(&ena_dev->rss, 0x0, sizeof(ena_dev->rss));
3063
3064 rc = ena_com_indirect_table_allocate(ena_dev, indr_tbl_log_size);
3065 if (unlikely(rc))
3066 goto err_indr_tbl;
3067
3068 /* The following function might return unsupported in case the
3069 * device doesn't support setting the key / hash function. We can safely
3070 * ignore this error and have indirection table support only.
3071 */
3072 rc = ena_com_hash_key_allocate(ena_dev);
3073 if (likely(!rc))
3074 ena_com_hash_key_fill_default_key(ena_dev);
3075 else if (rc != ENA_COM_UNSUPPORTED)
3076 goto err_hash_key;
3077
3078 rc = ena_com_hash_ctrl_init(ena_dev);
3079 if (unlikely(rc))
3080 goto err_hash_ctrl;
3081
3082 return 0;
3083
3084err_hash_ctrl:
3085 ena_com_hash_key_destroy(ena_dev);
3086err_hash_key:
3087 ena_com_indirect_table_destroy(ena_dev);
3088err_indr_tbl:
3089
3090 return rc;
3091}
3092
3093void ena_com_rss_destroy(struct ena_com_dev *ena_dev)
3094{

Callers 1

eth_ena_dev_initFunction · 0.50

Calls 7

memsetFunction · 0.85
ena_com_hash_ctrl_initFunction · 0.70
ena_com_hash_key_destroyFunction · 0.70

Tested by

no test coverage detected