From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f177.google.com (mail-ob0-f177.google.com [209.85.214.177]) by dpdk.org (Postfix) with ESMTP id A19AA1F5 for ; Fri, 28 Nov 2014 16:50:32 +0100 (CET) Received: by mail-ob0-f177.google.com with SMTP id va2so5104427obc.22 for ; Fri, 28 Nov 2014 07:50:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Xh6WWSid5Ul/aGXVs2UXA2o7L4wJN8Mbq3fSWOP6CJ0=; b=WM2Nrhq1HqO9eW/XbIL39ohp7CwDNK/C+FFKx1eYwefBVtOPIUp2xZrDmYIKimbcmy xJ6SFTKRgGYKG9JIans8T376kx/Td+9GwDvMt2DFcbsqzb0QqLn+U7kaaHODuW/n3iyx XnctP5xb/YBDr8vRNY5iJZBgedtNu8W10b9a29ZdroaYBsE7N3AOT+miJXLOvKQdr48O Syqx/pddKOr9yr8dxsPlc2fV0unyoLM+U27U1/YuxjKobLrZf0fwalvQos9ztn9Zd05r 6NmwZqsQ1VSungBLoUMBmOaYRE7AVWFihR/PPqyNlJDa76fF53g+iufTu4ORPqnS/BgC Wp7A== X-Gm-Message-State: ALoCoQkm9lXlPxHD12dMpK5L7xfAdP2THp6kvn2x5IPnX6aAAITPGTJAfraMCW5bpeta95cww3Ab MIME-Version: 1.0 X-Received: by 10.60.48.106 with SMTP id k10mr8631800oen.56.1417189832080; Fri, 28 Nov 2014 07:50:32 -0800 (PST) Received: by 10.76.172.165 with HTTP; Fri, 28 Nov 2014 07:50:32 -0800 (PST) In-Reply-To: <1417167499-4847-1-git-send-email-ssujith@cisco.com> References: <1417167499-4847-1-git-send-email-ssujith@cisco.com> Date: Fri, 28 Nov 2014 16:50:32 +0100 Message-ID: From: David Marchand To: Sujith Sankar Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v2] enicpmd: replace the type u_int* with uint* to remove compilation errors on a few platforms X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Nov 2014 15:50:33 -0000 On Fri, Nov 28, 2014 at 10:38 AM, Sujith Sankar wrote: > ENIC PMD was giving compilation errors on ppc_64-power8-linuxapp-gcc > because > of types such as u_int32_t. This patch replaces all those with uint32_t > and > similar ones. > > Reported-by: David Marchand > Signed-off-by: Sujith Sankar > --- > lib/librte_pmd_enic/enic.h | 2 +- > lib/librte_pmd_enic/enic_compat.h | 24 ++++++++++++------------ > lib/librte_pmd_enic/enic_main.c | 18 +++++++++--------- > lib/librte_pmd_enic/vnic/vnic_devcmd.h | 6 +++--- > 4 files changed, 25 insertions(+), 25 deletions(-) > > diff --git a/lib/librte_pmd_enic/enic.h b/lib/librte_pmd_enic/enic.h > index 9f80fc0..6400d24 100644 > --- a/lib/librte_pmd_enic/enic.h > +++ b/lib/librte_pmd_enic/enic.h > @@ -106,7 +106,7 @@ struct enic { > int iommu_group_fd; > int iommu_groupid; > int eventfd; > - u_int8_t mac_addr[ETH_ALEN]; > + uint8_t mac_addr[ETH_ALEN]; > pthread_t err_intr_thread; > int promisc; > int allmulti; > diff --git a/lib/librte_pmd_enic/enic_compat.h > b/lib/librte_pmd_enic/enic_compat.h > index d22578e..b3738ee 100644 > --- a/lib/librte_pmd_enic/enic_compat.h > +++ b/lib/librte_pmd_enic/enic_compat.h > @@ -89,34 +89,34 @@ typedef unsigned int u32; > typedef unsigned long long u64; > typedef unsigned long long dma_addr_t; > > -static inline u_int32_t ioread32(volatile void *addr) > +static inline uint32_t ioread32(volatile void *addr) > { > - return *(volatile u_int32_t *)addr; > + return *(volatile uint32_t *)addr; > } > > -static inline u16 ioread16(volatile void *addr) > +static inline uint16_t ioread16(volatile void *addr) > { > - return *(volatile u16 *)addr; > + return *(volatile uint16_t *)addr; > } > > -static inline u_int8_t ioread8(volatile void *addr) > +static inline uint8_t ioread8(volatile void *addr) > { > - return *(volatile u_int8_t *)addr; > + return *(volatile uint8_t *)addr; > } > > -static inline void iowrite32(u_int32_t val, volatile void *addr) > +static inline void iowrite32(uint32_t val, volatile void *addr) > { > - *(volatile u_int32_t *)addr = val; > + *(volatile uint32_t *)addr = val; > } > > -static inline void iowrite16(u16 val, volatile void *addr) > +static inline void iowrite16(uint16_t val, volatile void *addr) > { > - *(volatile u16 *)addr = val; > + *(volatile uint16_t *)addr = val; > } > > -static inline void iowrite8(u_int8_t val, volatile void *addr) > +static inline void iowrite8(uint8_t val, volatile void *addr) > { > - *(volatile u_int8_t *)addr = val; > + *(volatile uint8_t *)addr = val; > } > > static inline unsigned int readl(volatile void __iomem *addr) > diff --git a/lib/librte_pmd_enic/enic_main.c > b/lib/librte_pmd_enic/enic_main.c > index f6f00d3..853dd04 100644 > --- a/lib/librte_pmd_enic/enic_main.c > +++ b/lib/librte_pmd_enic/enic_main.c > @@ -172,17 +172,17 @@ unsigned int enic_cleanup_wq(struct enic *enic, > struct vnic_wq *wq) > > int enic_send_pkt(struct enic *enic, struct vnic_wq *wq, > struct rte_mbuf *tx_pkt, unsigned short len, > - u_int8_t sop, u_int8_t eop, > - u_int16_t ol_flags, u_int16_t vlan_tag) > + uint8_t sop, uint8_t eop, > + uint16_t ol_flags, uint16_t vlan_tag) > { > struct wq_enet_desc *desc = vnic_wq_next_desc(wq); > - u_int16_t mss = 0; > - u_int16_t header_length = 0; > - u_int8_t cq_entry = eop; > - u_int8_t vlan_tag_insert = 0; > + uint16_t mss = 0; > + uint16_t header_length = 0; > + uint8_t cq_entry = eop; > + uint8_t vlan_tag_insert = 0; > unsigned char *buf = (unsigned char *)(tx_pkt->buf_addr) + > RTE_PKTMBUF_HEADROOM; > - u_int64_t bus_addr = (dma_addr_t) > + uint64_t bus_addr = (dma_addr_t) > (tx_pkt->buf_physaddr + RTE_PKTMBUF_HEADROOM); > > if (sop) { > @@ -342,8 +342,8 @@ static int enic_rq_alloc_buf(struct vnic_rq *rq) > void *buf; > dma_addr_t dma_addr; > struct rq_enet_desc *desc = vnic_rq_next_desc(rq); > - u_int8_t type = RQ_ENET_TYPE_ONLY_SOP; > - u_int16_t len = ENIC_MAX_MTU + VLAN_ETH_HLEN; > + uint8_t type = RQ_ENET_TYPE_ONLY_SOP; > + uint16_t len = ENIC_MAX_MTU + VLAN_ETH_HLEN; > u16 split_hdr_size = vnic_get_hdr_split_size(enic->vdev); > struct rte_mbuf *mbuf = enic_rxmbuf_alloc(rq->mp); > struct rte_mbuf *hdr_mbuf = NULL; > diff --git a/lib/librte_pmd_enic/vnic/vnic_devcmd.h > b/lib/librte_pmd_enic/vnic/vnic_devcmd.h > index b4c87c1..e7ecf31 100644 > --- a/lib/librte_pmd_enic/vnic/vnic_devcmd.h > +++ b/lib/librte_pmd_enic/vnic/vnic_devcmd.h > @@ -691,9 +691,9 @@ enum { > #define FILTER_MAX_BUF_SIZE 100 /* Maximum size of buffer to > CMD_ADD_FILTER */ > > struct filter_tlv { > - u_int32_t type; > - u_int32_t length; > - u_int32_t val[0]; > + uint32_t type; > + uint32_t length; > + uint32_t val[0]; > }; > > enum { > > Ok for me. Builds fine on ppc64 / x86_64. -- David Marchand