From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f68.google.com (mail-pg0-f68.google.com [74.125.83.68]) by dpdk.org (Postfix) with ESMTP id 5716123C for ; Wed, 22 Nov 2017 01:57:43 +0100 (CET) Received: by mail-pg0-f68.google.com with SMTP id 4so11612046pge.1 for ; Tue, 21 Nov 2017 16:57:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EiXDhfolMITF7gzn1hbWOHXvYiz4YdEqnnWaabLM2CM=; b=A7A3eKn0ypwmynVVQ9ZvEg1dkZ6ESN36+0us0j+zkiQheoBH5s9J6S9zxEvqtvyBTn Ft/6k6AbICY0agp9yhKyKn+e1OOBgL5hXTAP+hp84wFhd3nmRb/ZZtZTAG9G0ycu2yO8 aPVklmmgtI/PehBmg+Q0kqFnymG90ebLhQEN91TFnmHLGkzPgTDpkgHQffgBtBcQNSPa Lm67GoY3GdMH3dSpjKyR+niB2XsWjnri5wboXhxXaSOpGOTO6owMuhv9YX12wWNZPpLd Gi6pDk3hq+Wbu+ifZ3qVr7+QoXVk+dpTJi20oXAs08KlzQGFTqJfFI97mO3f2nDMISmv fXLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EiXDhfolMITF7gzn1hbWOHXvYiz4YdEqnnWaabLM2CM=; b=Ti2Xg8gwnUMX9jMTDyvdFWvd+N7tVQ/VmqG5lbSelYHR68Fc32RTnSwylxZxCCD7Rl h6Yr+gKXLFMoDJATI6nYxSjrOYKGpvNH68BPxZWqPZSoaZEi+CKi/5YzZYlRRup3wmla WH4otCbrMemWZlDK1kHhiPL5D8ZGjKZZA/huG77dY5EM+SYF4Q6it/jvQz8y2V89uiNx rb4rEy2SQoLCoG2p3SaEiB6frRpVNrioEzVWFiNYNCi2eYl8anSrQyGrh8DKFh4JCmO4 hMuqWW2KyxDPOOo6lCLJPCRyk/ZRg+ksifwYIqPcT9hXxAMnmEVEJ9L1UlcxhjC3dy9W hEpA== X-Gm-Message-State: AJaThX7GeGR4g28P+g/XhffYKNnuwWsI22rSbAuDNH55MrBq1CYImOog XvOkONbD0QBBvFYCZEidfKQbvQ== X-Google-Smtp-Source: AGs4zMYreCPOCNJhlJ7sJ4nIwsazGksO3w4nb4wQ09FI/HUvr/5QrsYf/xGKuWKePdCYDr9sGPsyZA== X-Received: by 10.98.70.17 with SMTP id t17mr6338629pfa.199.1511312262140; Tue, 21 Nov 2017 16:57:42 -0800 (PST) Received: from xeon-e3 (76-14-207-240.or.wavecable.com. [76.14.207.240]) by smtp.gmail.com with ESMTPSA id z25sm8118924pfe.121.2017.11.21.16.57.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 21 Nov 2017 16:57:42 -0800 (PST) Date: Tue, 21 Nov 2017 16:57:40 -0800 From: Stephen Hemminger To: Ferruh Yigit Cc: Jingjing Wu , dev@dpdk.org, wenzhuo.lu@intel.com Message-ID: <20171121165740.50686126@xeon-e3> In-Reply-To: <69d5b2a3-542b-0f01-f712-3f2a87e591e2@intel.com> References: <1508488012-82704-1-git-send-email-jingjing.wu@intel.com> <1508488012-82704-5-git-send-email-jingjing.wu@intel.com> <69d5b2a3-542b-0f01-f712-3f2a87e591e2@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [RFC 4/9] net/avf: enable basic Rx Tx func 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: Wed, 22 Nov 2017 00:57:43 -0000 On Tue, 21 Nov 2017 16:06:24 -0800 Ferruh Yigit wrote: > On 10/20/2017 1:26 AM, Jingjing Wu wrote: > > Signed-off-by: Wenzhuo Lu > > <...> > > > @@ -214,6 +214,9 @@ CONFIG_RTE_LIBRTE_FM10K_INC_VECTOR=y > > # Compile burst-oriented AVF PMD driver > > # > > CONFIG_RTE_LIBRTE_AVF_PMD=y > > +CONFIG_RTE_LIBRTE_AVF_RX_DUMP=n > > +CONFIG_RTE_LIBRTE_AVF_TX_DUMP=n > > Are these config options used? > > <...> > > > @@ -49,4 +49,18 @@ extern int avf_logtype_driver; > > PMD_DRV_LOG_RAW(level, fmt "\n", ## args) > > #define PMD_DRV_FUNC_TRACE() PMD_DRV_LOG(DEBUG, " >>") > > > > +#ifdef RTE_LIBRTE_AVF_DEBUG_TX > > Is this defined anywhere? > > > +#define PMD_TX_LOG(level, fmt, args...) \ > > + RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) > > Instead should RTE_LOG_DP used? > And since other macros uses dynamic log functions, why here use static method, > what do you think using new method for data path logs as well? > > <...> > > > +static inline void > > +avf_rxd_to_vlan_tci(struct rte_mbuf *mb, volatile union avf_rx_desc *rxdp) > > +{ > > + if (rte_le_to_cpu_64(rxdp->wb.qword1.status_error_len) & > > + (1 << AVF_RX_DESC_STATUS_L2TAG1P_SHIFT)) { > > + mb->ol_flags |= PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED; > > Please new flag instead of PKT_RX_VLAN_PKT and please be sure flag is correctly > used with its new meaning. > > <...> > > > +/* TX prep functions */ > > +uint16_t > > +avf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, > > + uint16_t nb_pkts) > > +{ > > + int i, ret; > > + uint64_t ol_flags; > > + struct rte_mbuf *m; > > + > > + for (i = 0; i < nb_pkts; i++) { > > + m = tx_pkts[i]; > > + ol_flags = m->ol_flags; > > + > > + /* m->nb_segs is uint8_t, so nb_segs is always less than > > + * AVF_TX_MAX_SEG. > > + * We check only a condition for nb_segs > AVF_TX_MAX_MTU_SEG. > > + */ > > This is wrong, nb_segs is 16bits now, this check has been updated in i40e already. > > <...> Most drivers base code of one of the legacy Intel drivers. Why not fix ixgbe (or similar) to be a "follow this model" reference? It is unreasonable to expect new drivers to follow a different pattern.