[dpdk-dev] [PATCH v3 1/3] net: fix s_addr redefinition in Windows

Fady Bader fady at mellanox.com
Wed Jul 15 08:26:22 CEST 2020



> -----Original Message-----
> From: Olivier Matz <olivier.matz at 6wind.com>
> Sent: Monday, July 13, 2020 5:39 PM
> To: Fady Bader <fady at mellanox.com>
> Cc: dev at dpdk.org; Thomas Monjalon <thomas at monjalon.net>; Tasnim Bashar
> <tbashar at mellanox.com>; Tal Shnaiderman <talshn at mellanox.com>; Yohad Tor
> <yohadt at mellanox.com>; dmitry.kozliuk at gmail.com;
> harini.ramakrishnan at microsoft.com; ocardona at microsoft.com;
> pallavi.kadam at intel.com; ranjit.menon at intel.com
> Subject: Re: [PATCH v3 1/3] net: fix s_addr redefinition in Windows
> 
> Hi,
> 
> On Wed, Jul 08, 2020 at 11:25:23AM +0300, Fady Bader wrote:
> > s_addr in Windows is defined in windows.h so its
> 
> Is it windows.h, or is it winsock.h or winsock2.h instead?

S_addr is defined in winsock2.h which is included by windows.h.

> 
> > undefined in order to be defined as part of rte_ether_hdr.
> >
> > Signed-off-by: Fady Bader <fady at mellanox.com>
> > ---
> >  lib/librte_net/rte_ether.h | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> >
> > diff --git a/lib/librte_net/rte_ether.h b/lib/librte_net/rte_ether.h
> > index 0ae4e75b6c..f6e37d9e5e 100644
> > --- a/lib/librte_net/rte_ether.h
> > +++ b/lib/librte_net/rte_ether.h
> > @@ -23,6 +23,15 @@ extern "C" {
> >  #include <rte_mbuf.h>
> >  #include <rte_byteorder.h>
> >
> > +/*
> > + * s_addr in windows is defined in windows.h
> > + * it is undefined here to be defined as part of rte_ether_hdr  */
> > +#ifdef RTE_EXEC_ENV_WINDOWS #undef s_addr #endif
> > +
> > +
> >  #define RTE_ETHER_ADDR_LEN  6 /**< Length of Ethernet address. */
> > #define RTE_ETHER_TYPE_LEN  2 /**< Length of Ethernet type field. */
> >  #define RTE_ETHER_CRC_LEN   4 /**< Length of Ethernet CRC. */
> > --
> > 2.16.1.windows.4
> >


More information about the dev mailing list