* Opens a NIC for reading packets from it */
| 1130 | * Opens a NIC for reading packets from it |
| 1131 | */ |
| 1132 | static inline int |
| 1133 | open_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 | |
| 1150 | static inline int |
| 1151 | rx_iface_args_process(const char *key, const char *value, void *extra_args) |
no test coverage detected