| 862 | }; |
| 863 | |
| 864 | static int |
| 865 | mana_arg_parse_callback(const char *key, const char *val, void *private) |
| 866 | { |
| 867 | struct mana_conf *conf = (struct mana_conf *)private; |
| 868 | int ret; |
| 869 | |
| 870 | DRV_LOG(INFO, "key=%s value=%s index=%d", key, val, conf->index); |
| 871 | |
| 872 | if (conf->index >= MAX_NUM_ADDRESS) { |
| 873 | DRV_LOG(ERR, "Exceeding max MAC address"); |
| 874 | return 1; |
| 875 | } |
| 876 | |
| 877 | ret = rte_ether_unformat_addr(val, &conf->mac_array[conf->index]); |
| 878 | if (ret) { |
| 879 | DRV_LOG(ERR, "Invalid MAC address %s", val); |
| 880 | return ret; |
| 881 | } |
| 882 | |
| 883 | conf->index++; |
| 884 | |
| 885 | return 0; |
| 886 | } |
| 887 | |
| 888 | static int |
| 889 | mana_parse_args(struct rte_devargs *devargs, struct mana_conf *conf) |
nothing calls this directly
no test coverage detected