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

Function open_rx_iface

dpdk/drivers/net/pcap/pcap_ethdev.c:1132–1148  ·  view source on GitHub ↗

* Opens a NIC for reading packets from it */

Source from the content-addressed store, hash-verified

1130 * Opens a NIC for reading packets from it
1131 */
1132static inline int
1133open_rx_iface(const char *key, const char *value, void *extra_args)
1134{
1135 int ret = open_iface(key, value, extra_args);
1136 if (ret < 0)
1137 return ret;
1138 if (strcmp(key, ETH_PCAP_RX_IFACE_IN_ARG) == 0) {
1139 struct pmd_devargs *pmd = extra_args;
1140 unsigned int qid = pmd->num_of_queue - 1;
1141
1142 set_iface_direction(pmd->queue[qid].name,
1143 pmd->queue[qid].pcap,
1144 PCAP_D_IN);
1145 }
1146
1147 return 0;
1148}
1149
1150static inline int
1151rx_iface_args_process(const char *key, const char *value, void *extra_args)

Callers 1

rx_iface_args_processFunction · 0.85

Calls 3

strcmpFunction · 0.85
set_iface_directionFunction · 0.85
open_ifaceFunction · 0.70

Tested by

no test coverage detected