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

Function ethdev_rx_map_add

dpdk/app/graph/ethdev_rx.c:58–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58static int
59ethdev_rx_map_add(char *name, uint32_t queue, uint32_t core)
60{
61 uint64_t coremask;
62 uint16_t port_id;
63 int rc;
64
65 if (nb_lcore_params >= ETHDEV_RX_LCORE_PARAMS_MAX)
66 return -EINVAL;
67
68 rc = rte_eth_dev_get_port_by_name(name, &port_id);
69 if (rc)
70 return -EINVAL;
71
72 coremask = graph_coremask_get();
73
74 if (!(coremask & (1 << core)))
75 return -EINVAL;
76
77 rx_map_configure(port_id, queue, core);
78
79 lcore_params_array[nb_lcore_params].port_id = port_id;
80 lcore_params_array[nb_lcore_params].queue_id = queue;
81 lcore_params_array[nb_lcore_params].lcore_id = core;
82 nb_lcore_params++;
83 return 0;
84}
85
86static void
87cli_ethdev_rx_help(__rte_unused void *parsed_result, __rte_unused struct cmdline *cl,

Callers 1

cli_ethdev_rxFunction · 0.85

Calls 3

graph_coremask_getFunction · 0.85
rx_map_configureFunction · 0.85

Tested by

no test coverage detected