From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f51.google.com (mail-pg0-f51.google.com [74.125.83.51]) by dpdk.org (Postfix) with ESMTP id 616119FE for ; Fri, 29 Sep 2017 17:38:04 +0200 (CEST) Received: by mail-pg0-f51.google.com with SMTP id d8so9638pgt.4 for ; Fri, 29 Sep 2017 08:38:04 -0700 (PDT) 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=qOD4tuKDBstZv3RsGEKcwhIO8Qm1QmAXNfwSn6QKZTY=; b=v+fnfl3UVIqFINwfUolUiYh20Uv4Pa4TNadHjyq/BpO5fikDH458NlQpr2sKnAj51L L8QEUwqm1u9ACLJFfKzz2ZDXWOULpqKI3cTlYt8JCN3OjbdmHj3jOwR1iFOJZZkfqD8w 2xuzdMoB2IPRwqetDirJGSv/5ceXXbQfYQReaQoLm/wxVTKGIKyfLRefF10xDZXHT6h4 2gmOf93MdVWIavCfmkEN6fMl2jgilH83qRjZY/JI9Hrk4B9KJCyoVvjSZucXFpiLstSx uOQBD4beHKmNlZ6y0jYAPEzf+7ir0UYr/rnoDJWxK9IKkzchP4H7vaX87nP7cOBRpSkK DiDQ== 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=qOD4tuKDBstZv3RsGEKcwhIO8Qm1QmAXNfwSn6QKZTY=; b=jXWXHpNZ3QVbXYDVixIB/ILPMNEswFVMNjmpp8PaOJC70S8w6zamlJ565LXnV+m8Jo 8fEpx950KivwAOFiyTtDTwqTbmsXewRDjOgqUioB+PkMSu44IdtHDajfD//HnchodsMl HfdN+S5DhkpqmWuMY7OyccjCfDfJsiI9r+kSD3Owt9jwiT+sejI6lhB+d8JhJeF3p6aT kBUyuvC5TJ5hnn0uyaMGxYrOAsWK6JDgCdXkaDyuUxZShNsDXBOPbvaaGyaCCxVMN6Jc C8z+TK7+JZqMNTuFwmptuqv6axIxtIQ7BCQSNZOcnQ/e+glkQdM3vIs27xX5jAAAfM05 ngYg== X-Gm-Message-State: AHPjjUiSPUGd4AMvanptwitaG++yy9VAO0i8rCX4E1pxttvWzJgLueI4 1WGVDtkJHikMYmcbWIg2OER8Eg== X-Google-Smtp-Source: AOwi7QAA2JXhiRdTNqpGdLFUcJxD1xmarczuM8Z2Rl6B0hx8c1VilJTNr7wWeTaMjL74BCh7orC5hg== X-Received: by 10.84.131.67 with SMTP id 61mr7328697pld.418.1506699483210; Fri, 29 Sep 2017 08:38:03 -0700 (PDT) Received: from xeon-e3 (76-14-207-240.or.wavecable.com. [76.14.207.240]) by smtp.gmail.com with ESMTPSA id h82sm8886489pfd.148.2017.09.29.08.38.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Sep 2017 08:38:03 -0700 (PDT) Date: Fri, 29 Sep 2017 08:38:00 -0700 From: Stephen Hemminger To: Tomasz Duszynski Cc: dev@dpdk.org, mw@semihalf.com, dima@marvell.com, nsamsono@marvell.com, Jianbo.liu@linaro.org, Jacek Siuda Message-ID: <20170929083800.3a71c9a2@xeon-e3> In-Reply-To: <1506594158-15721-3-git-send-email-tdu@semihalf.com> References: <1506418805-12117-1-git-send-email-tdu@semihalf.com> <1506594158-15721-1-git-send-email-tdu@semihalf.com> <1506594158-15721-3-git-send-email-tdu@semihalf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 2/4] net/mrvl: add mrvl net pmd driver 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: Fri, 29 Sep 2017 15:38:04 -0000 On Thu, 28 Sep 2017 12:22:36 +0200 Tomasz Duszynski wrote: > + > +struct mrvl_rxq; > +struct mrvl_txq; These forward decl should not be nececessary > +static inline int > +mrvl_get_bpool_size(int pp2_id, int pool_id) No tab here please Why does this need to be inlined? Is it in critical path? > +{ > + int i; > + int size = 0; > + > + for (i = mrvl_lcore_first; i <= mrvl_lcore_last; i++) > + size += mrvl_port_bpool_size[pp2_id][pool_id][i]; > + > + return size; > +} > + Also, I prefer that the following restrictions from the kernel be also applied to DPDK code. ### [dpdk-dev] [PATCH v2 2/4] net/mrvl: add mrvl net pmd driver CHECK:LINE_SPACING: Please don't use multiple blank lines #452: FILE: drivers/net/mrvl/mrvl_ethdev.c:180: + + WARNING:LINE_SPACING: Missing a blank line after declarations #457: FILE: drivers/net/mrvl/mrvl_ethdev.c:185: + int n = sizeof(*bitmap) * 8 - __builtin_clz(*bitmap); + if (n >= max) CHECK:LINE_SPACING: Please don't use multiple blank lines #562: FILE: drivers/net/mrvl/mrvl_ethdev.c:290: + + WARNING:MULTILINE_DEREFERENCE: Avoid multiple line dereference - prefer 'priv->ppio_params.inqs_params.tcs_params[i].inqs_params' #880: FILE: drivers/net/mrvl/mrvl_ethdev.c:608: + rte_free(priv->ppio_params.inqs_params. + tcs_params[i].inqs_params); WARNING:MULTILINE_DEREFERENCE: Avoid multiple line dereference - prefer 'priv->ppio_params.inqs_params.tcs_params[i].inqs_params' #882: FILE: drivers/net/mrvl/mrvl_ethdev.c:610: + priv->ppio_params.inqs_params. + tcs_params[i].inqs_params = NULL; WARNING:MULTILINE_DEREFERENCE: Avoid multiple line dereference - prefer 'priv->ppio_params.inqs_params.tcs_params[tc].inqs_params[inq].size' #1330: FILE: drivers/net/mrvl/mrvl_ethdev.c:1058: + qinfo->nb_desc = priv->ppio_params.inqs_params. + tcs_params[tc].inqs_params[inq].size; WARNING:SPLIT_STRING: quoted string split across lines #1476: FILE: drivers/net/mrvl/mrvl_ethdev.c:1204: + RTE_LOG(ERR, PMD, "Mbuf size must be increased to %u bytes" + " to hold up to %u bytes of data.\n", WARNING:MULTILINE_DEREFERENCE: Avoid multiple line dereference - prefer 'priv->ppio_params.inqs_params.tcs_params[priv->rxq_map[rxq->queue_id].tc' #1500: FILE: drivers/net/mrvl/mrvl_ethdev.c:1228: + priv->ppio_params.inqs_params. + tcs_params[priv->rxq_map[rxq->queue_id].tc]. WARNING:MULTILINE_DEREFERENCE: Avoid multiple line dereference - prefer 'q->priv->ppio_params.inqs_params.tcs_params[q->priv->rxq_map[q->queue_id].tc' #1532: FILE: drivers/net/mrvl/mrvl_ethdev.c:1260: + num = q->priv->ppio_params.inqs_params. + tcs_params[q->priv->rxq_map[q->queue_id].tc]. WARNING:SPLIT_STRING: quoted string split across lines #1902: FILE: drivers/net/mrvl/mrvl_ethdev.c:1630: + RTE_LOG(DEBUG, PMD, "\nport-%d:%d: bpool %d oversize -" + " remove %d buffers (pool size: %d -> %d)\n", WARNING:SPLIT_STRING: quoted string split across lines #2094: FILE: drivers/net/mrvl/mrvl_ethdev.c:1822: + "No room in shadow queue for %d packets!!!" + "%d packets will be sent.\n", CHECK:LINE_SPACING: Please don't use multiple blank lines #2294: FILE: drivers/net/mrvl/mrvl_ethdev.c:2022: + + CHECK:LINE_SPACING: Please don't use multiple blank lines #2595: FILE: drivers/net/mrvl/mrvl_ethdev.h:40: + + WARNING:LINE_SPACING: Missing a blank line after declarations #3253: FILE: drivers/net/mrvl/mrvl_qos.c:577: + uint8_t idx = port_cfg->tc[tc].inq[i]; + priv->rxq_map[idx].tc = tc;