From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f51.google.com (mail-pa0-f51.google.com [209.85.220.51]) by dpdk.org (Postfix) with ESMTP id 551C65A2D for ; Fri, 22 May 2015 18:42:48 +0200 (CEST) Received: by pacwv17 with SMTP id wv17so23785906pac.2 for ; Fri, 22 May 2015 09:42:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=ybtLrrz1z6AJsIshhtZVh2eJwuCJjtcrBDpDlqEXaEw=; b=dkGcXpAIFC6e3gpK1XARNpPc4U8hGMCCMIDE9h+CVx9bZ6YYSfBsCM5yuI8zwDI9do yWxczNo6k7uYV/Z7Yyndm73ZmTgp+IcAAFuyT4B3+ODMEj0XXWhOoERvsAaBIdR11P7M vVGJZpHTICxhLs+K8HEzxtd4yl9bUD18CinRmoWob8mtTtyOD8aehCdJUk18aeM6cwi8 qRqGI1JH2nFQFVONW6eKJsy7fv+Z0RJjcgsvUWsjSp4vhH5AhUi8BRgmleAKRMp0oZOl N+IWXaZ9FVToMvNXH2c5QCepOq0qGA2eOe6nmzNYH1dZemGQS4T4RqWP5bRuxXRNtmrt W/5w== X-Gm-Message-State: ALoCoQkUDBusKYC3HHdIKrY7+IpP+XHOYsTD2PhJWOslPU37Ta9vFY0/58XmLNKgCIc0q4TgEArw X-Received: by 10.68.242.41 with SMTP id wn9mr16806068pbc.117.1432312967545; Fri, 22 May 2015 09:42:47 -0700 (PDT) Received: from urahara (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by mx.google.com with ESMTPSA id o3sm2632144pds.1.2015.05.22.09.42.46 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 May 2015 09:42:47 -0700 (PDT) Date: Fri, 22 May 2015 09:42:50 -0700 From: Stephen Hemminger To: Rahul Lakkireddy Message-ID: <20150522094250.503af8af@urahara> In-Reply-To: <25f06823ef87d05bf57d996df387478e7fbc966f.1432300701.git.rahul.lakkireddy@chelsio.com> References: <25f06823ef87d05bf57d996df387478e7fbc966f.1432300701.git.rahul.lakkireddy@chelsio.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, Felix Marti , Kumar Sanghvi , Nirranjan Kirubaharan Subject: Re: [dpdk-dev] [PATCH 2/5] cxgbe: add cxgbe poll mode driver. 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, 22 May 2015 16:42:48 -0000 On Fri, 22 May 2015 18:54:20 +0530 Rahul Lakkireddy wrote: > +#define pr_err(y, args...) dev_err(0, y, ##args) > +#define pr_warn(y, args...) dev_warn(0, y, ##args) > +#define pr_info(y, args...) dev_info(0, y, ##args) > +#define BUG() pr_err("BUG at %s:%d", __func__, __LINE__) > + > +#define ASSERT(x) do {\ > + if (!(x)) \ > + rte_panic("CXGBE: x"); \ > +} while (0) > +#define BUG_ON(x) ASSERT(!(x)) > + > +#ifndef WARN_ON > +#define WARN_ON(x) do { \ > + int ret = !!(x); \ > + if (unlikely(ret)) \ > + pr_warn("WARN_ON: \"" #x "\" at %s:%d\n", __func__, __LINE__); \ > +} while (0) > +#endif > + > +#define __iomem > + > +#ifndef BIT > +#define BIT(n) (1 << (n)) > +#endif > + > +#define L1_CACHE_SHIFT 6 > +#define L1_CACHE_BYTES BIT(L1_CACHE_SHIFT) > + > +#define PAGE_SHIFT 12 > +#define ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1)) > +#define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a))) > + > +#define VLAN_HLEN 4 > + > +#define rmb() rte_rmb() /* dpdk rte provided rmb */ > +#define wmb() rte_wmb() /* dpdk rte provided wmb */ > + > +typedef uint8_t u8; > +typedef int8_t s8; > +typedef uint16_t u16; > +typedef uint32_t u32; > +typedef int32_t s32; > +typedef uint64_t u64; > +typedef int bool; > +typedef uint64_t dma_addr_t; > + > +#ifndef __le16 > +#define __le16 uint16_t > +#endif > +#ifndef __le32 > +#define __le32 uint32_t > +#endif > +#ifndef __le64 > +#define __le64 uint64_t > +#endif > +#ifndef __be16 > +#define __be16 uint16_t > +#endif > +#ifndef __be32 > +#define __be32 uint32_t > +#endif > +#ifndef __be64 > +#define __be64 uint64_t > +#endif > +#ifndef __u8 > +#define __u8 uint8_t > +#endif > +#ifndef __u16 > +#define __u16 uint16_t > +#endif > +#ifndef __u32 > +#define __u32 uint32_t > +#endif > +#ifndef __u64 > +#define __u64 uint64_t > +#endif > + > +#define FALSE 0 > +#define TRUE 1 > +#define false 0 > +#define true 1 > + > +#define min(a, b) RTE_MIN(a, b) > +#define max(a, b) RTE_MAX(a, b) This is not Linux kernel. Please don't create wrappers for all the stuff in Linux to port your driver.