From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 31E241B1FA for ; Mon, 2 Oct 2017 12:20:59 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Oct 2017 03:20:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,469,1500966000"; d="scan'208";a="1225985716" Received: from nikhilr-mobl.amr.corp.intel.com (HELO [10.252.169.48]) ([10.252.169.48]) by fmsmga002.fm.intel.com with ESMTP; 02 Oct 2017 03:20:52 -0700 To: santosh , jerin.jacob@caviumnetworks.com, bruce.richardson@intel.com Cc: gage.eads@intel.com, dev@dpdk.org, thomas@monjalon.net, harry.van.haaren@intel.com, hemant.agrawal@nxp.com, nipun.gupta@nxp.com, narender.vangati@intel.com, erik.g.carrillo@intel.com, abhinandan.gujjar@intel.com References: <1506028634-22998-1-git-send-email-nikhil.rao@intel.com> <1506028634-22998-4-git-send-email-nikhil.rao@intel.com> <78c747fd-3134-98f4-67cd-7c59f1e7e301@caviumnetworks.com> From: "Rao, Nikhil" Message-ID: Date: Mon, 2 Oct 2017 15:50:51 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <78c747fd-3134-98f4-67cd-7c59f1e7e301@caviumnetworks.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4 3/4] eventdev: Add eventdev ethernet Rx adapter X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Oct 2017 10:20:59 -0000 On 9/22/2017 11:38 AM, santosh wrote: > > > > > In general api comment: Fix missing param definition like *service_id* above > and pl. remove other unnecessary params description from api above. OK. > >> +static inline int >> +valid_id(uint8_t id) >> +{ >> + return id < RTE_MAX_EVENT_ETH_RX_ADAPTER_INSTANCE; >> +} >> + >> +#define RTE_EVENT_ETH_RX_ADAPTER_ID_VALID_OR_ERR_RET(id, retval) do { \ >> + if (!valid_id(id)) { \ >> + RTE_EDEV_LOG_ERR("Invalid eth Rx adapter id = %d\n", id); \ >> + return retval; \ >> + } \ >> +} while (0) >> + > > Worth, moving this macro to rte_eventdev_pmd.h > Or How about reusing existing one ie.. RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET? > I didn't see a reason for this macro to be used elsewhere apart from rte_event_eth_rx_adapter.c. Also, the check is different from the one in RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET. >> + >> +static inline void >> +mtoip(struct rte_mbuf *m, struct ipv4_hdr **ipv4_hdr, >> + struct ipv6_hdr **ipv6_hdr) >> +{ > > mtoip(), imo is more of global api, likely other modules may use in future.. > perhaps move to rte_io.h Or more correct place.. thought? > Good suggestion, Will post a separate patch for this in the future. Nikhil