DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Ivan Malov <ivan.malov@arknetworks.am>
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 09:31:24 -0700	[thread overview]
Message-ID: <20250711093125.0592400c@hermes.local> (raw)
In-Reply-To: <2f5f5dd0-f183-81ee-480e-8ec7f64f1398@arknetworks.am>

On Fri, 11 Jul 2025 19:13:01 +0400 (+04)
Ivan Malov <ivan.malov@arknetworks.am> wrote:

> 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.

Good thanks, RTE_MIN/RTE_MAX has issues when nested. Not sure if there is an easy fix.

      reply	other threads:[~2025-07-11 16:31 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
2025-07-11 16:31     ` Stephen Hemminger [this message]

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=20250711093125.0592400c@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=andy.moreton@amd.com \
    --cc=dev@dpdk.org \
    --cc=ivan.malov@arknetworks.am \
    --cc=pieter.jansen-van-vuuren@amd.com \
    --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).