From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rao, Nikhil" Subject: Re: [PATCH v4 3/4] eventdev: Add eventdev ethernet Rx adapter Date: Mon, 2 Oct 2017 15:50:51 +0530 Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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 To: santosh , jerin.jacob@caviumnetworks.com, bruce.richardson@intel.com 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) In-Reply-To: <78c747fd-3134-98f4-67cd-7c59f1e7e301@caviumnetworks.com> Content-Language: en-US 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 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