Packet type parsing = Y
Basic stats = Y
Stats per queue = Y
+FW version = Y
Other kdrv = Y
Power8 = Y
x86-32 = Y
Basic stats = Y
Extended stats = Y
Stats per queue = Y
+FW version = Y
Multiprocess aware = Y
Other kdrv = Y
ARMv8 = Y
process.
* Added support for Rx packet types list in a secondary process.
+* **Updated Mellanox drivers.**
+
+ New features and improvements were done in mlx4 and mlx5 PMDs:
+
+ * Added firmware version reading.
+
Removed Items
-------------
.mac_addr_set = mlx4_mac_addr_set,
.stats_get = mlx4_stats_get,
.stats_reset = mlx4_stats_reset,
+ .fw_version_get = mlx4_fw_version_get,
.dev_infos_get = mlx4_dev_infos_get,
.dev_supported_ptypes_get = mlx4_dev_supported_ptypes_get,
.vlan_filter_set = mlx4_vlan_filter_set,
int mlx4_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on);
int mlx4_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats);
void mlx4_stats_reset(struct rte_eth_dev *dev);
+int mlx4_fw_version_get(struct rte_eth_dev *dev, char *fw_ver, size_t fw_size);
void mlx4_dev_infos_get(struct rte_eth_dev *dev,
struct rte_eth_dev_info *info);
int mlx4_link_update(struct rte_eth_dev *dev, int wait_to_complete);
info->flow_type_rss_offloads = mlx4_conv_rss_types(priv, 0, 1);
}
+/**
+ * Get firmware version of a device.
+ *
+ * @param dev
+ * Ethernet device port.
+ * @param fw_ver
+ * String output allocated by caller.
+ * @param fw_size
+ * Size of the output string, including terminating null byte.
+ *
+ * @return
+ * 0 on success, or the size of the non truncated string if too big.
+ */
+int mlx4_fw_version_get(struct rte_eth_dev *dev, char *fw_ver, size_t fw_size)
+{
+ struct priv *priv = dev->data->dev_private;
+ struct ibv_device_attr *attr = &priv->device_attr;
+ size_t size = strnlen(attr->fw_ver, sizeof(attr->fw_ver)) + 1;
+
+ if (fw_size < size)
+ return size;
+ if (fw_ver != NULL)
+ strlcpy(fw_ver, attr->fw_ver, fw_size);
+ return 0;
+}
+
/**
* DPDK callback to get device statistics.
*
.xstats_get = mlx5_xstats_get,
.xstats_reset = mlx5_xstats_reset,
.xstats_get_names = mlx5_xstats_get_names,
+ .fw_version_get = mlx5_fw_version_get,
.dev_infos_get = mlx5_dev_infos_get,
.dev_supported_ptypes_get = mlx5_dev_supported_ptypes_get,
.vlan_filter_set = mlx5_vlan_filter_set,
.is_removed = mlx5_is_removed,
};
+/* Available operations from secondary process. */
static const struct eth_dev_ops mlx5_dev_sec_ops = {
.stats_get = mlx5_stats_get,
.stats_reset = mlx5_stats_reset,
.xstats_get = mlx5_xstats_get,
.xstats_reset = mlx5_xstats_reset,
.xstats_get_names = mlx5_xstats_get_names,
+ .fw_version_get = mlx5_fw_version_get,
.dev_infos_get = mlx5_dev_infos_get,
.rx_descriptor_status = mlx5_rx_descriptor_status,
.tx_descriptor_status = mlx5_tx_descriptor_status,
};
-/* Available operators in flow isolated mode. */
+/* Available operations in flow isolated mode. */
const struct eth_dev_ops mlx5_dev_ops_isolate = {
.dev_configure = mlx5_dev_configure,
.dev_start = mlx5_dev_start,
.xstats_get = mlx5_xstats_get,
.xstats_reset = mlx5_xstats_reset,
.xstats_get_names = mlx5_xstats_get_names,
+ .fw_version_get = mlx5_fw_version_get,
.dev_infos_get = mlx5_dev_infos_get,
.dev_supported_ptypes_get = mlx5_dev_supported_ptypes_get,
.vlan_filter_set = mlx5_vlan_filter_set,
unsigned int flags);
int mlx5_dev_configure(struct rte_eth_dev *dev);
void mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info);
+int mlx5_fw_version_get(struct rte_eth_dev *dev, char *fw_ver, size_t fw_size);
const uint32_t *mlx5_dev_supported_ptypes_get(struct rte_eth_dev *dev);
int mlx5_link_update(struct rte_eth_dev *dev, int wait_to_complete);
int mlx5_force_link_status_change(struct rte_eth_dev *dev, int status);
}
}
+/**
+ * Get firmware version of a device.
+ *
+ * @param dev
+ * Ethernet device port.
+ * @param fw_ver
+ * String output allocated by caller.
+ * @param fw_size
+ * Size of the output string, including terminating null byte.
+ *
+ * @return
+ * 0 on success, or the size of the non truncated string if too big.
+ */
+int mlx5_fw_version_get(struct rte_eth_dev *dev, char *fw_ver, size_t fw_size)
+{
+ struct priv *priv = dev->data->dev_private;
+ struct ibv_device_attr *attr = &priv->device_attr.orig_attr;
+ size_t size = strnlen(attr->fw_ver, sizeof(attr->fw_ver)) + 1;
+
+ if (fw_size < size)
+ return size;
+ if (fw_ver != NULL)
+ strlcpy(fw_ver, attr->fw_ver, fw_size);
+ return 0;
+}
+
/**
* Get supported packet types.
*