Message ID | 1413874756-18669-1-git-send-email-changchun.ouyang@intel.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 31F947E7B; Tue, 21 Oct 2014 08:51:11 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 4C0477E7A for <dev@dpdk.org>; Tue, 21 Oct 2014 08:51:10 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 20 Oct 2014 23:59:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,760,1406617200"; d="scan'208";a="617693985" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga002.fm.intel.com with ESMTP; 20 Oct 2014 23:59:23 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id s9L6xLJK017081; Tue, 21 Oct 2014 14:59:21 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id s9L6xJNH018702; Tue, 21 Oct 2014 14:59:21 +0800 Received: (from couyang@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s9L6xJnB018698; Tue, 21 Oct 2014 14:59:19 +0800 From: Ouyang Changchun <changchun.ouyang@intel.com> To: dev@dpdk.org Date: Tue, 21 Oct 2014 14:59:16 +0800 Message-Id: <1413874756-18669-1-git-send-email-changchun.ouyang@intel.com> X-Mailer: git-send-email 1.7.12.2 Subject: [dpdk-dev] [PATCH] ixgbe: Fix compilation issue in vpmd X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Ouyang Changchun
Oct. 21, 2014, 6:59 a.m. UTC
Fix the compilation issue in vector PMD when macro RTE_MBUF_REFCNT is disabled.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
---
lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
2014-10-21 14:59, Ouyang Changchun: > Fix the compilation issue in vector PMD when macro RTE_MBUF_REFCNT is disabled. > > Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com> Applied Thanks
Hi Thomas, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon > Sent: Tuesday, October 21, 2014 9:04 AM > To: Ouyang, Changchun > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] ixgbe: Fix compilation issue in vpmd > > 2014-10-21 14:59, Ouyang Changchun: > > Fix the compilation issue in vector PMD when macro RTE_MBUF_REFCNT is > disabled. > > > > Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com> > > Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com> > > Applied I was checking this patch right now, and I come across a second compilation issue, because rte_mbuf_refcnt_update and rte_pktmbuf_attach are not declared, and Bond PMD and IP fragmentation libraries use those functions. I guess that it is late to NACK this :P, but we require a second patch to fix completely this issue. > > Thanks > -- > Thomas
Hi Pablo > -----Original Message----- > From: De Lara Guarch, Pablo > Sent: Tuesday, October 21, 2014 4:19 PM > To: Thomas Monjalon; Ouyang, Changchun > Cc: dev@dpdk.org > Subject: RE: [dpdk-dev] [PATCH] ixgbe: Fix compilation issue in vpmd > > Hi Thomas, > > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon > > Sent: Tuesday, October 21, 2014 9:04 AM > > To: Ouyang, Changchun > > Cc: dev@dpdk.org > > Subject: Re: [dpdk-dev] [PATCH] ixgbe: Fix compilation issue in vpmd > > > > 2014-10-21 14:59, Ouyang Changchun: > > > Fix the compilation issue in vector PMD when macro RTE_MBUF_REFCNT > > > is > > disabled. > > > > > > Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com> > > > > Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com> > > > > Applied > > I was checking this patch right now, and I come across a second compilation > issue, because rte_mbuf_refcnt_update and rte_pktmbuf_attach are not > declared, and Bond PMD and IP fragmentation libraries use those functions. > > I guess that it is late to NACK this :P, but we require a second patch to fix > completely this issue. As it fixes the compilation issue in vpmd, so no reason to NACK it, :-) In my config, both BOND and IP fragment is disabled. So I don't come across your issues. Yes, agree with you, we need another patch to fix compilation issue in other both places.
2014-10-21 08:28, Ouyang, Changchun: > From: De Lara Guarch, Pablo > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon > > > 2014-10-21 14:59, Ouyang Changchun: > > > > Fix the compilation issue in vector PMD when macro RTE_MBUF_REFCNT > > > > is disabled. > > > > > > > > Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com> > > > > > > Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com> > > > > > > Applied > > > > I was checking this patch right now, and I come across a second compilation > > issue, because rte_mbuf_refcnt_update and rte_pktmbuf_attach are not > > declared, and Bond PMD and IP fragmentation libraries use those functions. > > > > I guess that it is late to NACK this :P, but we require a second patch to fix > > completely this issue. > > As it fixes the compilation issue in vpmd, so no reason to NACK it, :-) Exact > In my config, both BOND and IP fragment is disabled. So I don't come across your issues. > Yes, agree with you, we need another patch to fix compilation issue in other both places. Yes, I'm aware of these limitations. Please, first explain why mbuf refcnt is needed for these features. Then we have 2 options: remove the dependency or add more ifdefs. Thanks
> -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon > Sent: Tuesday, October 21, 2014 9:36 AM > To: Ouyang, Changchun; De Lara Guarch, Pablo > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] ixgbe: Fix compilation issue in vpmd > > 2014-10-21 08:28, Ouyang, Changchun: > > From: De Lara Guarch, Pablo > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon > > > > 2014-10-21 14:59, Ouyang Changchun: > > > > > Fix the compilation issue in vector PMD when macro RTE_MBUF_REFCNT > > > > > is disabled. > > > > > > > > > > Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com> > > > > > > > > Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com> > > > > > > > > Applied > > > > > > I was checking this patch right now, and I come across a second compilation > > > issue, because rte_mbuf_refcnt_update and rte_pktmbuf_attach are not > > > declared, and Bond PMD and IP fragmentation libraries use those functions. > > > > > > I guess that it is late to NACK this :P, but we require a second patch to fix > > > completely this issue. > > > > As it fixes the compilation issue in vpmd, so no reason to NACK it, :-) > > Exact > > > In my config, both BOND and IP fragment is disabled. So I don't come across your > issues. > > Yes, agree with you, we need another patch to fix compilation issue in other > both places. > > Yes, I'm aware of these limitations. > Please, first explain why mbuf refcnt is needed for these features. > Then we have 2 options: remove the dependency or add more ifdefs. > > Thanks > -- > Thomas Thomas, for link bonding the refcnt is used in broadcast mode to allow the same mbuf to be transmitted on multiple slaves. By increasing the refcnt, we can safely transmit the mbuf on multiple slaves without the danger of a mbuf being freed by one slave while in use by another. I can provide a patch to disable the broadcast mode of operation if the bonding pmd is built with the macro RTE_MBUF_REFCNT disabled. I don't think there is any other option other than than to completely disable the library if the refcnt parameter isn't available as we don't have access to the transmit mempool to allocate new mbufs to make copies of the original. Declan
diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c index 2236250..a0d3d78 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c @@ -541,7 +541,7 @@ ixgbe_tx_free_bufs(struct igb_tx_queue *txq) #ifdef RTE_MBUF_REFCNT m = __rte_pktmbuf_prefree_seg(txep[i].mbuf); #else - m = txep[i]->mbuf; + m = txep[i].mbuf; #endif if (likely(m != NULL)) { if (likely(m->pool == free[0]->pool))