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

Function bnxt_parse_dev_args

dpdk/drivers/net/bnxt/bnxt_ethdev.c:5827–5875  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5825}
5826
5827static int
5828bnxt_parse_dev_args(struct bnxt *bp, struct rte_devargs *devargs)
5829{
5830 struct rte_kvargs *kvlist;
5831 int ret = 0;
5832
5833 if (devargs == NULL)
5834 return 0;
5835
5836 kvlist = rte_kvargs_parse(devargs->args, bnxt_dev_args);
5837 if (kvlist == NULL)
5838 return -EINVAL;
5839
5840 /*
5841 * Handler for "flow_xstat" devarg.
5842 * Invoked as for ex: "-a 0000:00:0d.0,flow_xstat=1"
5843 */
5844 ret = rte_kvargs_process(kvlist, BNXT_DEVARG_FLOW_XSTAT,
5845 bnxt_parse_devarg_flow_xstat, bp);
5846 if (ret)
5847 goto err;
5848
5849 /*
5850 * Handler for "max_num_kflows" devarg.
5851 * Invoked as for ex: "-a 000:00:0d.0,max_num_kflows=32"
5852 */
5853 ret = rte_kvargs_process(kvlist, BNXT_DEVARG_MAX_NUM_KFLOWS,
5854 bnxt_parse_devarg_max_num_kflows, bp);
5855 if (ret)
5856 goto err;
5857
5858err:
5859 /*
5860 * Handler for "app-id" devarg.
5861 * Invoked as for ex: "-a 000:00:0d.0,app-id=1"
5862 */
5863 rte_kvargs_process(kvlist, BNXT_DEVARG_APP_ID,
5864 bnxt_parse_devarg_app_id, bp);
5865
5866 /*
5867 * Handler for "ieee-1588" devarg.
5868 * Invoked as for ex: "-a 000:00:0d.0,ieee-1588=1"
5869 */
5870 rte_kvargs_process(kvlist, BNXT_DEVARG_IEEE_1588,
5871 bnxt_parse_devarg_ieee_1588, bp);
5872
5873 rte_kvargs_free(kvlist);
5874 return ret;
5875}
5876
5877/* Allocate and initialize various fields in bnxt struct that
5878 * need to be allocated/destroyed only once in the lifetime of the driver

Callers 1

bnxt_dev_initFunction · 0.85

Calls 3

rte_kvargs_parseFunction · 0.85
rte_kvargs_processFunction · 0.85
rte_kvargs_freeFunction · 0.85

Tested by

no test coverage detected