From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rcdn-iport-1.cisco.com (rcdn-iport-1.cisco.com [173.37.86.72]) by dpdk.org (Postfix) with ESMTP id 788853F9 for ; Fri, 28 Nov 2014 17:01:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=5991; q=dns/txt; s=iport; t=1417190463; x=1418400063; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=I1bYtgJhmm4bUmkMwvBJ8KsruJylvz0RDO6kvaflt9c=; b=icntgdMvVTzBTg/xvF67uRpSpquToHTxKDSt8UUpznqL5BWkENvAKGmW c5vADKNx/aHkXx5Of80rEkqvo1DkJQLcQd4cBVqROIdMAMojGrU4d9zt9 myZzPy76frc5KgZWlSBDtj9BmHxPmiDQMCAgb2wNlnf4f5KT1pjd4WvsC g=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgoFAJGbeFStJV2R/2dsb2JhbABbgwZRXMc2hlUCgQ4WAQEBAQF9hAMBAQQnUhACAQgYIwsyJQIEDgWIQNIiAQEBAQEBAQEBAQEBAQEBAQEBARmQeweETQWGTYUbhn2EZ4c1gTU/gxqIG4lzgjeBRW+BSIECAQEB X-IronPort-AV: E=Sophos;i="5.07,477,1413244800"; d="scan'208";a="372908934" Received: from rcdn-core-9.cisco.com ([173.37.93.145]) by rcdn-iport-1.cisco.com with ESMTP; 28 Nov 2014 16:01:01 +0000 Received: from xhc-rcd-x13.cisco.com (xhc-rcd-x13.cisco.com [173.37.183.87]) by rcdn-core-9.cisco.com (8.14.5/8.14.5) with ESMTP id sASG10di021295 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Fri, 28 Nov 2014 16:01:01 GMT Received: from xmb-aln-x07.cisco.com ([169.254.2.173]) by xhc-rcd-x13.cisco.com ([173.37.183.87]) with mapi id 14.03.0195.001; Fri, 28 Nov 2014 10:01:00 -0600 From: "Sujith Sankar (ssujith)" To: Bruce Richardson Thread-Topic: [dpdk-dev] [PATCH v2] enicpmd: replace the type u_int* with uint* to remove compilation errors on a few platforms Thread-Index: AQHQCu85uMKl4GN0fEqZtNSmwOfjPZx2lVeAgABemoA= Date: Fri, 28 Nov 2014 16:01:00 +0000 Message-ID: References: <1417167499-4847-1-git-send-email-ssujith@cisco.com> <20141128155229.GB4556@bricha3-MOBL3> In-Reply-To: <20141128155229.GB4556@bricha3-MOBL3> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.3.9.131030 x-originating-ip: [10.65.69.111] Content-Type: text/plain; charset="iso-8859-1" Content-ID: <579CE42E9EC4AD4D8F9C893EE46DE7ED@emea.cisco.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 16:01:02 -0000 On 28/11/14 9:22 pm, "Bruce Richardson" wrote: >On Fri, Nov 28, 2014 at 03:08:19PM +0530, 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. >>=20 >> Reported-by: David Marchand >> Signed-off-by: Sujith Sankar > >Acked-by: Bruce Richardson > >This patch helps out with getting a clang compile on BSD. However, one >error >and a number of warnings remain that should be looked at in another patch. >The error is: > >dpdk.org/lib/librte_pmd_enic/enic_main.c:435:3: fatal error: non-void >function 'enic_rq_indicate_buf' should return a value [-Wreturn-type] > return; Bruce, thanks for the comment. I=B9ve not built enicpmd using clang compiler. I shall setup a BSD build with clang compiler and send a patch with necessary fixes. Could you please let me know the versions and flavours that you are using? Thanks, -Sujith > >> --- >> 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(-) >>=20 >> 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; >> =20 >> -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; >> } >> =20 >> -static inline u16 ioread16(volatile void *addr) >> +static inline uint16_t ioread16(volatile void *addr) >> { >> - return *(volatile u16 *)addr; >> + return *(volatile uint16_t *)addr; >> } >> =20 >> -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; >> } >> =20 >> -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 =3D val; >> + *(volatile uint32_t *)addr =3D val; >> } >> =20 >> -static inline void iowrite16(u16 val, volatile void *addr) >> +static inline void iowrite16(uint16_t val, volatile void *addr) >> { >> - *(volatile u16 *)addr =3D val; >> + *(volatile uint16_t *)addr =3D val; >> } >> =20 >> -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 =3D val; >> + *(volatile uint8_t *)addr =3D val; >> } >> =20 >> 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) >> =20 >> 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 =3D vnic_wq_next_desc(wq); >> - u_int16_t mss =3D 0; >> - u_int16_t header_length =3D 0; >> - u_int8_t cq_entry =3D eop; >> - u_int8_t vlan_tag_insert =3D 0; >> + uint16_t mss =3D 0; >> + uint16_t header_length =3D 0; >> + uint8_t cq_entry =3D eop; >> + uint8_t vlan_tag_insert =3D 0; >> unsigned char *buf =3D (unsigned char *)(tx_pkt->buf_addr) + >> RTE_PKTMBUF_HEADROOM; >> - u_int64_t bus_addr =3D (dma_addr_t) >> + uint64_t bus_addr =3D (dma_addr_t) >> (tx_pkt->buf_physaddr + RTE_PKTMBUF_HEADROOM); >> =20 >> 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 =3D vnic_rq_next_desc(rq); >> - u_int8_t type =3D RQ_ENET_TYPE_ONLY_SOP; >> - u_int16_t len =3D ENIC_MAX_MTU + VLAN_ETH_HLEN; >> + uint8_t type =3D RQ_ENET_TYPE_ONLY_SOP; >> + uint16_t len =3D ENIC_MAX_MTU + VLAN_ETH_HLEN; >> u16 split_hdr_size =3D vnic_get_hdr_split_size(enic->vdev); >> struct rte_mbuf *mbuf =3D enic_rxmbuf_alloc(rq->mp); >> struct rte_mbuf *hdr_mbuf =3D 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 */ >> =20 >> 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]; >> }; >> =20 >> enum { >> --=20 >> 1.9.1 >>=20