From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 697E169D8 for ; Thu, 23 Mar 2017 13:14:10 +0100 (CET) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP; 23 Mar 2017 05:14:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,209,1486454400"; d="scan'208";a="80207051" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.122]) ([10.237.220.122]) by fmsmga006.fm.intel.com with ESMTP; 23 Mar 2017 05:14:08 -0700 To: Ed Czeck , dev@dpdk.org References: <1490231015-31748-1-git-send-email-ed.czeck@atomicrules.com> <1490231015-31748-5-git-send-email-ed.czeck@atomicrules.com> From: Ferruh Yigit Message-ID: <4480ae16-df81-c30e-ef5c-995081fa9338@intel.com> Date: Thu, 23 Mar 2017 12:14:08 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <1490231015-31748-5-git-send-email-ed.czeck@atomicrules.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v4 5/7] net/ark: Packet TX support initial version 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: Thu, 23 Mar 2017 12:14:10 -0000 On 3/23/2017 1:03 AM, Ed Czeck wrote: > * Core TX packet moving functions > * Flesh out ark_adapter struct to support TX code > (not all fields used at this patch > > Signed-off-by: Ed Czeck <...> > +int > +ark_get_port_id(struct rte_eth_dev *dev, struct ark_adapter *ark) > +{ > + int n = ark->num_ports; > + int i; > + > + /* There has to be a smarter way to do this ... */ > + for (i = 0; i < n; i++) { > + if (ark->port[i].eth_dev == dev) > + return i; > + } Is this function to get dev->data->port_id ? "struct ark_adapter" is private date per eth_dev, it is possible to keep port_id per ark, no need to keep whole array on each ark, if I am now missing anything ... > + ARK_DEBUG_TRACE("ARK: Device is NOT associated with a port !!"); > + return -1; > +} > + <...> > + > +#ifdef RTE_LIBRTE_ARK_PAD_TX > +#define ARK_TX_PAD_TO_60 1 Why not using RTE_LIBRTE_ARK_PAD_TX directly, but creating another macro? > +#else > +#define ARK_TX_PAD_TO_60 0 > +#endif > + > + > +#ifdef RTE_LIBRTE_ARK_DEBUG_TX > +#define ARK_TX_DEBUG 1 > +#define ARK_TX_DEBUG_JUMBO 1 Is it possible to handle RTE_LIBRTE_ARK_DEBUG_TX in log.h file to create a ..LOG_TX macro and use it, instead of dealing here with new macros? > +#else > +#define ARK_TX_DEBUG 0 > +#define ARK_TX_DEBUG_JUMBO 0 > +#endif <...> > + > +#include > + > +/* Forward declarations */ > +struct rte_mbuf; > +struct rte_eth_dev; > +struct rte_eth_stats; > +struct rte_eth_txconf; Why not include relevant headers, instead of these struct declarations. <...>