| 1068 | } |
| 1069 | |
| 1070 | static int enicpmd_dev_fw_version_get(struct rte_eth_dev *eth_dev, |
| 1071 | char *fw_version, size_t fw_size) |
| 1072 | { |
| 1073 | struct vnic_devcmd_fw_info *info; |
| 1074 | struct enic *enic; |
| 1075 | int ret; |
| 1076 | |
| 1077 | ENICPMD_FUNC_TRACE(); |
| 1078 | |
| 1079 | enic = pmd_priv(eth_dev); |
| 1080 | ret = vnic_dev_fw_info(enic->vdev, &info); |
| 1081 | if (ret) |
| 1082 | return ret; |
| 1083 | ret = snprintf(fw_version, fw_size, "%s %s", |
| 1084 | info->fw_version, info->fw_build); |
| 1085 | if (ret < 0) |
| 1086 | return -EINVAL; |
| 1087 | |
| 1088 | ret += 1; /* add the size of '\0' */ |
| 1089 | if (fw_size < (size_t)ret) |
| 1090 | return ret; |
| 1091 | else |
| 1092 | return 0; |
| 1093 | } |
| 1094 | |
| 1095 | static const struct eth_dev_ops enicpmd_eth_dev_ops = { |
| 1096 | .dev_configure = enicpmd_dev_configure, |
nothing calls this directly
no test coverage detected