DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andre Muezerie <andremue@linux.microsoft.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev@dpdk.org, mb@smartsharesystems.com
Subject: Re: [PATCH v3 4/5] net/intel: use portable version of __builtin_add_overflow
Date: Tue, 11 Mar 2025 11:39:10 -0700	[thread overview]
Message-ID: <20250311183910.GA13271@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> (raw)
In-Reply-To: <Z8iBOZuIq-Zael91@bricha3-mobl1.ger.corp.intel.com>

On Wed, Mar 05, 2025 at 04:52:09PM +0000, Bruce Richardson wrote:
> On Wed, Mar 05, 2025 at 08:38:09AM -0800, Andre Muezerie wrote:
> > __builtin_add_overflow is gcc specific. It should be replaced with
> > a portable version that can also be used with other compilers.
> > 
> > Signed-off-by: Andre Muezerie <andremue@linux.microsoft.com>
> > ---
> >  drivers/net/intel/ice/base/ice_nvm.c | 9 ++++-----
> >  1 file changed, 4 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/net/intel/ice/base/ice_nvm.c b/drivers/net/intel/ice/base/ice_nvm.c
> > index 56c6c96a95..1002a6b59f 100644
> > --- a/drivers/net/intel/ice/base/ice_nvm.c
> > +++ b/drivers/net/intel/ice/base/ice_nvm.c
> > @@ -3,6 +3,7 @@
> >   */
> >  
> >  #include "ice_common.h"
> > +#include <rte_math.h>
> >  
> >  #define GL_MNG_DEF_DEVID 0x000B611C
> >  
> > @@ -469,8 +470,6 @@ int ice_read_sr_word(struct ice_hw *hw, u16 offset, u16 *data)
> >  	return status;
> >  }
> >  
> > -#define check_add_overflow __builtin_add_overflow
> > -
> 
> Rather than modifying the base code, can you instead add a #define to the
> osdep.h file in the base directory to alias the new function to
> __builtin_add_overflow for MSVC. The other files (other than osdep.h) in
> the base directory, come from a common/shared source that is not DPDK
> specific, so we try to avoid modifying them where possible.
> 
> /Bruce

The problem is that the file below defines __builtin_add_overflow itself, so
it does not look like we can completely avoid changing this file.
I can still make the change you asked for, but the patch will have to remove
that define from the file under base.

drivers\net\intel\ice\base\ice_nvm.c
--
Andre Muezerie

  reply	other threads:[~2025-03-11 18:39 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-02 22:32 [PATCH 0/5] add " Andre Muezerie
2025-01-02 22:32 ` [PATCH 1/5] maintainers: " Andre Muezerie
2025-01-02 22:32 ` [PATCH 2/5] lib/eal: " Andre Muezerie
2025-01-03  8:19   ` Morten Brørup
2025-01-03 20:38     ` Andre Muezerie
2025-01-02 22:32 ` [PATCH 3/5] doc/api: " Andre Muezerie
2025-01-02 22:32 ` [PATCH 4/5] drivers/net: use " Andre Muezerie
2025-01-02 22:32 ` [PATCH 5/5] app/test: add tests for portable versions " Andre Muezerie
2025-01-02 23:51 ` [PATCH 0/5] add portable version " Stephen Hemminger
2025-01-03  0:15   ` Andre Muezerie
2025-01-03  0:41     ` Andre Muezerie
2025-01-03 20:39 ` [PATCH v2 " Andre Muezerie
2025-01-03 20:39   ` [PATCH v2 1/5] maintainers: " Andre Muezerie
2025-01-03 20:39   ` [PATCH v2 2/5] lib/eal: " Andre Muezerie
2025-01-06 11:07     ` Bruce Richardson
2025-01-06 11:21       ` Morten Brørup
2025-01-06 11:34         ` Bruce Richardson
2025-01-06 11:58           ` Morten Brørup
2025-03-05 15:46             ` Andre Muezerie
2025-01-03 20:39   ` [PATCH v2 3/5] doc/api: " Andre Muezerie
2025-01-03 20:39   ` [PATCH v2 4/5] drivers/net: use " Andre Muezerie
2025-01-03 20:39   ` [PATCH v2 5/5] app/test: add tests for " Andre Muezerie
2025-03-05 16:38 ` [PATCH v3 0/5] add " Andre Muezerie
2025-03-05 16:38   ` [PATCH v3 1/5] maintainers: " Andre Muezerie
2025-03-05 16:38   ` [PATCH v3 2/5] eal: " Andre Muezerie
2025-03-05 16:38   ` [PATCH v3 3/5] doc/api: " Andre Muezerie
2025-03-05 16:38   ` [PATCH v3 4/5] net/intel: use " Andre Muezerie
2025-03-05 16:52     ` Bruce Richardson
2025-03-11 18:39       ` Andre Muezerie [this message]
2025-03-05 16:38   ` [PATCH v3 5/5] app/test: add tests for " Andre Muezerie
2025-03-06  3:00     ` Patrick Robb

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=20250311183910.GA13271@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net \
    --to=andremue@linux.microsoft.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=mb@smartsharesystems.com \
    /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).