From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v9 09/20] unci: add rtnl newlink Date: Fri, 30 Jun 2017 10:27:25 -0700 Message-ID: <20170630102725.6aba4847@xeon-e3> References: <20170621110651.75299-1-ferruh.yigit@intel.com> <20170630165140.59594-1-ferruh.yigit@intel.com> <20170630165140.59594-10-ferruh.yigit@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, Bruce Richardson , Anatoly Burakov To: Ferruh Yigit Return-path: Received: from mail-pf0-f178.google.com (mail-pf0-f178.google.com [209.85.192.178]) by dpdk.org (Postfix) with ESMTP id DF3A65689 for ; Fri, 30 Jun 2017 19:27:28 +0200 (CEST) Received: by mail-pf0-f178.google.com with SMTP id e7so70318892pfk.0 for ; Fri, 30 Jun 2017 10:27:28 -0700 (PDT) In-Reply-To: <20170630165140.59594-10-ferruh.yigit@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, 30 Jun 2017 17:51:29 +0100 Ferruh Yigit wrote: > + > +#ifndef _RTE_UNCI_COMMON_H_ > +#define _RTE_UNCI_COMMON_H_ > + > +#define UNCI_DEVICE "unci" > + > +enum { > + IFLA_UNCI_UNSPEC, > + IFLA_UNCI_PORTID, > + IFLA_UNCI_PID, > + __IFLA_UNCI_MAX, > +}; > + > +#define IFLA_UNCI_MAX (__IFLA_UNCI_MAX - 1) > + > +#endif /* _RTE_UNCI_COMMON_H_ */ > diff --git a/lib/librte_eal/linuxapp/unci/unci_dev.h b/lib/librte_eal/linuxapp/unci/unci_dev.h > index 0337fa82b..b0a215f1b 100644 > --- a/lib/librte_eal/linuxapp/unci/unci_dev.h > +++ b/lib/librte_eal/linuxapp/unci/unci_dev.h > @@ -26,11 +26,16 @@ > #define _UNCI_DEV_H_ > > #include > +#include > > #ifdef pr_fmt > #undef pr_fmt > #endif > #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > > +struct unci_dev { > + u8 port_id; > + u32 pid; > +}; These are to/from user space so should be __u8, __u32. Also, probably want to support more than 256 ports at some time in future. So make them both __u32. > > #endif /* _UNCI_DEV_H_ */ Since you want to target this for upstream kernel. Please try and layout the includes in an easy manner to do this and avoid using rte_ in names.