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

Function enicpmd_dev_fw_version_get

dpdk/drivers/net/enic/enic_ethdev.c:1070–1093  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1068}
1069
1070static 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
1095static const struct eth_dev_ops enicpmd_eth_dev_ops = {
1096 .dev_configure = enicpmd_dev_configure,

Callers

nothing calls this directly

Calls 3

pmd_privFunction · 0.85
vnic_dev_fw_infoFunction · 0.85
snprintfFunction · 0.85

Tested by

no test coverage detected