[dpdk-dev] [PATCH 04/12] net/mlx5: add VF LAG mode bonding device recognition

Ferruh Yigit ferruh.yigit at intel.com
Mon Sep 30 12:34:34 CEST 2019

On 9/25/2019 8:53 AM, Viacheslav Ovsiienko wrote:
> The Mellanox NICs starting from ConnectX-5 support LAG over
> NIC ports internally, implemented by the NIC firmware and hardware.
> The multiport NIC presents multiple physical PCI functions (PF),
> with SR-IOV multiple virtual PCI functions (VFs) might be presented.
> With switchdev mode the VF representors are engaged and PFs and their
> VFs are connected by internal E-Switch feature. Each PF and related VFs
> have dedicated E-Switch and belong to dedicated switch domain.
> If NIC ports are combined to support NIC the kernel drivers introduce
> the single unified Infiniband multiport devices, and all only one
> unified E-Switch with single switch domain combines master PF
> all all VFs. No extra DPDK bonding device is needed.
> Signed-off-by: Viacheslav Ovsiienko <viacheslavo at mellanox.com>


> +
> +	/* Use safe format to check maximal buffer length. */
> +#pragma GCC diagnostic ignored "-Wformat-nonliteral"
> +	while (fscanf(file, format, ifname) == 1) {
> +#pragma GCC diagnostic error "-Wformat-nonliteral"
> +		char tmp_str[IF_NAMESIZE + 32];
> +		struct rte_pci_addr pci_addr;
> +		struct mlx5_switch_info	info;

Hi Slava,

The ICC is failing because of the pragma [1],
- Can you please explain why it is needed, can we escape from it?
- If we can't escape can you please add compiler checks around it? [2]
- And should we enable it as 'error' by default, what about following [3]?

.../drivers/net/mlx5/mlx5.c(2301): error #2282: unrecognized GCC pragma
  #pragma GCC diagnostic ignored "-Wformat-nonliteral"

#ifdef __GNUC__
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 1)
#pragma GCC diagnostic ignored "-Wformat-nonliteral"

 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wformat-nonliteral"
 #pragma GCC diagnostic pop

More information about the dev mailing list