src/dpdk/drivers/net/failsafe/failsafe_ops.c
static void
fs_dev_merge_info(struct rte_eth_dev_info *info,
		  const struct rte_eth_dev_info *sinfo)
{
	info->max_rx_pktlen = RTE_MIN(info->max_rx_pktlen, sinfo->max_rx_pktlen);
	info->max_rx_queues = RTE_MIN(info->max_rx_queues, sinfo->max_rx_queues);
	info->max_tx_queues = RTE_MIN(info->max_tx_queues, sinfo->max_tx_queues);
	info->max_mac_addrs = RTE_MIN(info->max_mac_addrs, sinfo->max_mac_addrs);
	info->max_hash_mac_addrs = RTE_MIN(info->max_hash_mac_addrs,
					sinfo->max_hash_mac_addrs);
	info->max_vmdq_pools = RTE_MIN(info->max_vmdq_pools, sinfo->max_vmdq_pools);
	info->max_vfs = RTE_MIN(info->max_vfs, sinfo->max_vfs);

	fs_dev_merge_desc_lim(&info->rx_desc_lim, &sinfo->rx_desc_lim);
	fs_dev_merge_desc_lim(&info->tx_desc_lim, &sinfo->tx_desc_lim);

	info->rx_offload_capa &= sinfo->rx_offload_capa;
	info->tx_offload_capa &= sinfo->tx_offload_capa;
	info->rx_queue_offload_capa &= sinfo->rx_queue_offload_capa;
	info->tx_queue_offload_capa &= sinfo->tx_queue_offload_capa;
	info->flow_type_rss_offloads &= sinfo->flow_type_rss_offloads;

	/*
	 * RETA size is a GCD of RETA sizes indicated by sub-devices.
	 * Each of these sizes is a power of 2, so use the lower one.
	 */
	info->reta_size = RTE_MIN(info->reta_size, sinfo->reta_size);

	info->hash_key_size = RTE_MIN(info->hash_key_size,
				      sinfo->hash_key_size);
}
/*
 * Merge the information from sub-devices.
 *
 * The reported values must be the common subset of all sub devices
 */
Merge the information from sub-devices.
The reported values must be the common subset of all sub devices
Merge the information from sub - devices . The reported values must be the common subset of all sub devices
static void
fs_dev_merge_info(struct rte_eth_dev_info *info,
		  const struct rte_eth_dev_info *sinfo)
{
	info->max_rx_pktlen = RTE_MIN(info->max_rx_pktlen, sinfo->max_rx_pktlen);
	info->max_rx_queues = RTE_MIN(info->max_rx_queues, sinfo->max_rx_queues);
	info->max_tx_queues = RTE_MIN(info->max_tx_queues, sinfo->max_tx_queues);
	info->max_mac_addrs = RTE_MIN(info->max_mac_addrs, sinfo->max_mac_addrs);
	info->max_hash_mac_addrs = RTE_MIN(info->max_hash_mac_addrs,
					sinfo->max_hash_mac_addrs);
	info->max_vmdq_pools = RTE_MIN(info->max_vmdq_pools, sinfo->max_vmdq_pools);
	info->max_vfs = RTE_MIN(info->max_vfs, sinfo->max_vfs);
	fs_dev_merge_desc_lim(&info->rx_desc_lim, &sinfo->rx_desc_lim);
	fs_dev_merge_desc_lim(&info->tx_desc_lim, &sinfo->tx_desc_lim);
	info->rx_offload_capa &= sinfo->rx_offload_capa;
	info->tx_offload_capa &= sinfo->tx_offload_capa;
	info->rx_queue_offload_capa &= sinfo->rx_queue_offload_capa;
	info->tx_queue_offload_capa &= sinfo->tx_queue_offload_capa;
	info->flow_type_rss_offloads &= sinfo->flow_type_rss_offloads;
	info->reta_size = RTE_MIN(info->reta_size, sinfo->reta_size);
	info->hash_key_size = RTE_MIN(info->hash_key_size,
				      sinfo->hash_key_size);
}
static void fs_dev_merge_info ( struct rte_eth_dev_info * info , const struct rte_eth_dev_info * sinfo ) { info -> max_rx_pktlen = RTE_MIN ( info -> max_rx_pktlen , sinfo -> max_rx_pktlen ) ; info -> max_rx_queues = RTE_MIN ( info -> max_rx_queues , sinfo -> max_rx_queues ) ; info -> max_tx_queues = RTE_MIN ( info -> max_tx_queues , sinfo -> max_tx_queues ) ; info -> max_mac_addrs = RTE_MIN ( info -> max_mac_addrs , sinfo -> max_mac_addrs ) ; info -> max_hash_mac_addrs = RTE_MIN ( info -> max_hash_mac_addrs , sinfo -> max_hash_mac_addrs ) ; info -> max_vmdq_pools = RTE_MIN ( info -> max_vmdq_pools , sinfo -> max_vmdq_pools ) ; info -> max_vfs = RTE_MIN ( info -> max_vfs , sinfo -> max_vfs ) ; fs_dev_merge_desc_lim ( & info -> rx_desc_lim , & sinfo -> rx_desc_lim ) ; fs_dev_merge_desc_lim ( & info -> tx_desc_lim , & sinfo -> tx_desc_lim ) ; info -> rx_offload_capa &= sinfo -> rx_offload_capa ; info -> tx_offload_capa &= sinfo -> tx_offload_capa ; info -> rx_queue_offload_capa &= sinfo -> rx_queue_offload_capa ; info -> tx_queue_offload_capa &= sinfo -> tx_queue_offload_capa ; info -> flow_type_rss_offloads &= sinfo -> flow_type_rss_offloads ; info -> reta_size = RTE_MIN ( info -> reta_size , sinfo -> reta_size ) ; info -> hash_key_size = RTE_MIN ( info -> hash_key_size , sinfo -> hash_key_size ) ; }
Merge the information from sub-devices.
Merge the information from sub - devices .
/*
	 * RETA size is a GCD of RETA sizes indicated by sub-devices.
	 * Each of these sizes is a power of 2, so use the lower one.
	 */