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

Function ena_com_get_hash_function

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

Source from the content-addressed store, hash-verified

2757}
2758
2759int ena_com_get_hash_function(struct ena_com_dev *ena_dev,
2760 enum ena_admin_hash_functions *func)
2761{
2762 struct ena_rss *rss = &ena_dev->rss;
2763 struct ena_admin_get_feat_resp get_resp;
2764 int rc;
2765
2766 if (unlikely(!func))
2767 return ENA_COM_INVAL;
2768
2769 rc = ena_com_get_feature_ex(ena_dev, &get_resp,
2770 ENA_ADMIN_RSS_HASH_FUNCTION,
2771 rss->hash_key_dma_addr,
2772 sizeof(*rss->hash_key), 0);
2773 if (unlikely(rc))
2774 return rc;
2775
2776 /* ENA_FFS() returns 1 in case the lsb is set */
2777 rss->hash_func = ENA_FFS(get_resp.u.flow_hash_func.selected_func);
2778 if (rss->hash_func)
2779 rss->hash_func--;
2780
2781 *func = rss->hash_func;
2782
2783 return 0;
2784}
2785
2786int ena_com_get_hash_key(struct ena_com_dev *ena_dev, u8 *key)
2787{

Callers

nothing calls this directly

Calls 1

ena_com_get_feature_exFunction · 0.70

Tested by

no test coverage detected