DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ivan Malov <ivan.malov@arknetworks.am>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org, Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	 Andy Moreton <andy.moreton@amd.com>,
	 Pieter Jansen Van Vuuren <pieter.jansen-van-vuuren@amd.com>,
	 Viacheslav Galaktionov <viacheslav.galaktionov@arknetworks.am>
Subject: Re: [PATCH 0/3] common/sfc_efx/base: fix compiler warnings in X4 netport API
Date: Fri, 11 Jul 2025 19:13:01 +0400 (+04)	[thread overview]
Message-ID: <2f5f5dd0-f183-81ee-480e-8ec7f64f1398@arknetworks.am> (raw)
In-Reply-To: <20250711075544.2fbbd18d@hermes.local>

[-- Attachment #1: Type: text/plain, Size: 2326 bytes --]

On Fri, 11 Jul 2025, Stephen Hemminger wrote:

> On Fri, 11 Jul 2025 18:43:46 +0400
> Ivan Malov <ivan.malov@arknetworks.am> wrote:
>
>> The 25.07 release has got support for AMD Solarflare X45xx adapters [1].
>> This series is a follow-up to [1] to fix compiler warnings in the base
>> driver that are seen in Windows driver build, also based on this driver.
>>
>> [1] https://patches.dpdk.org/project/dpdk/list/?series=35095
>>
>> Ivan Malov (3):
>>   common/sfc_efx/base: fix compiler warnings in statistic code
>>   common/sfc_efx/base: fix compiler warnings in PHY link setup
>>   common/sfc_efx/base: fix compiler warning in PHY link getter
>>
>>  drivers/common/sfc_efx/base/efx_np.c       | 7 ++-----
>>  drivers/common/sfc_efx/base/medford4_phy.c | 1 -
>>  2 files changed, 2 insertions(+), 6 deletions(-)
>>
>
> Have your tried enabling -Wshadow and -Wduplicated-branches and -Wduplicated-cond
> Those flags are finding stuff in other places.
>
Thanks Stephen. That is very useful. I tried adding these flags via meson.build
for common/sfc_efx, common/sfc_efx/base and for net/sfc trees and the only thing
I was able to find is as follows:

In file included from ../lib/eal/x86/include/rte_byteorder.h:9,
                  from ../drivers/net/sfc/sfc_ef10_essb_rx.c:14:
../drivers/net/sfc/sfc_ef10_essb_rx.c: In function ‘sfc_ef10_essb_rx_qsize_up_rings’:
../drivers/net/sfc/sfc_dp.h:27:27: warning: declaration of ‘_a’ shadows a previous local [-Wshadow]
    27 |                 typeof(a) _a = (a);     \
       |                           ^~
../lib/eal/include/rte_common.h:817:34: note: in definition of macro ‘RTE_MAX’
   817 |                 typeof (a) _a = (a); \
       |                                  ^
../drivers/net/sfc/sfc_ef10_essb_rx.c:535:33: note: in expansion of macro ‘SFC_DIV_ROUND_UP’
   535 |         nb_hw_rx_desc = RTE_MAX(SFC_DIV_ROUND_UP(nb_rx_desc,
       |                                 ^~~~~~~~~~~~~~~~
../lib/eal/include/rte_common.h:817:28: note: shadowed declaration is here
   817 |                 typeof (a) _a = (a); \
       |                            ^~
../drivers/net/sfc/sfc_ef10_essb_rx.c:535:25: note: in expansion of macro ‘RTE_MAX’
   535 |         nb_hw_rx_desc = RTE_MAX(SFC_DIV_ROUND_UP(nb_rx_desc,
       |

But no extra warnings in the base driver.

Thank you.

  reply	other threads:[~2025-07-11 15:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-11 14:43 Ivan Malov
2025-07-11 14:43 ` [PATCH 1/3] common/sfc_efx/base: fix compiler warnings in statistic code Ivan Malov
2025-07-11 14:43 ` [PATCH 2/3] common/sfc_efx/base: fix compiler warnings in PHY link setup Ivan Malov
2025-07-11 14:43 ` [PATCH 3/3] common/sfc_efx/base: fix compiler warning in PHY link getter Ivan Malov
2025-07-11 14:55 ` [PATCH 0/3] common/sfc_efx/base: fix compiler warnings in X4 netport API Stephen Hemminger
2025-07-11 15:13   ` Ivan Malov [this message]
2025-07-11 16:31     ` Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2f5f5dd0-f183-81ee-480e-8ec7f64f1398@arknetworks.am \
    --to=ivan.malov@arknetworks.am \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=andy.moreton@amd.com \
    --cc=dev@dpdk.org \
    --cc=pieter.jansen-van-vuuren@amd.com \
    --cc=stephen@networkplumber.org \
    --cc=viacheslav.galaktionov@arknetworks.am \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).