From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C86CFA04C7; Tue, 15 Sep 2020 12:21:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A66351BE8E; Tue, 15 Sep 2020 12:21:11 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 1B059DE0 for ; Tue, 15 Sep 2020 12:21:09 +0200 (CEST) IronPort-SDR: iWITKSLk4YFrpTLr4nV+Fjq7ZcWrEQQ1wOgN4ioNm179SrL5qVkAssTcY0qiJGw7f9hoxuCkGU aFmcFz3637ig== X-IronPort-AV: E=McAfee;i="6000,8403,9744"; a="220788672" X-IronPort-AV: E=Sophos;i="5.76,429,1592895600"; d="scan'208";a="220788672" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2020 03:21:09 -0700 IronPort-SDR: 6HmxF37wM35GwdsrOyh//lXPluFr3tEAeQ3fUrM7VNXqrCUnINA8gmSv9jmVyhuR7wqWg7Vx0N JaJEZ2VSzEaQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,429,1592895600"; d="scan'208";a="482713870" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga005.jf.intel.com with ESMTP; 15 Sep 2020 03:21:08 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 15 Sep 2020 03:21:08 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 15 Sep 2020 03:21:08 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.171) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Tue, 15 Sep 2020 03:21:07 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RneYslJp0oQI9wKDg1OLjhailGoJiGO4Qgt2qKIJDlXC6C9uBoDDKp/t/D6nfqn5oD0azkZIOtWCM+C8/9fkjfGe5hpS6RIDMesZRo/Sr5xD6iIN/bdUe0QB/KsdVEbW8E/RrNgvXtM0HMjyDM8XapJkf8J2im9U7c89np1EUuyv2HO2jRP9r0XOFL6bmv63aPbQxHjDi785HUPpd7GMWjguIDFSH21dHJpHH/mZaS/qciP6AlU3XRK6BPmFhXoj8YWWmcXo6g3NjoShBDoBWsnex+cMGltvwg/a0yxEC4CrpJeWeDMtM3aky3x5OU0YnmYJ9wPaXS72Bt725KLQhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RGg8pKDnq8tOQ5E/u84oVQlD01XSD31tllUUkGgYzC0=; b=ShxkDx86BmcQnJtR5SQhu3OL4oYPDI9GLLskiQ/6c+Yl7tmRLN1lvK6OEuxPIiQfV/zScQSbGdgV/8YsTgW5x5PfTMOH7EmjN1OD63V93druM1rBmClfx+4brLf2nKlU4UZTVJbP9oBU6Fg0da63X3/o9k9G7I3AA4iP8oWK2NUTSzHvom40xV9riWN5IzSrMIPyQbroIFk3ZDUKk6e9aWSshQhihqScTeDtudRe7nJcK3v2Iaktkvwr/N3MGBT1NOyiAGHaSVoXiZgNdzfg+b6oVFGabB5hlDyimLxc9vptzGgM3FItjhoRPJBJ/cnsyjcIXzRYfWbyA8SvaA1O2w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RGg8pKDnq8tOQ5E/u84oVQlD01XSD31tllUUkGgYzC0=; b=SCpUe7rl28gjR8MmQXQgDxFuBpVpX8sM1Yzh+yLxugxrJb8n3gLap36/DUO/8RaCMJiHG/8IDFU2DkvFYajoJZYXTOo79YMd+ZSHKUz65oM763zt9gYCvjGrebpVM/w29T0c1+u9wkurdzkODHKajQzy/E+qtADk/TLIECWOVY4= Received: from BYAPR11MB3301.namprd11.prod.outlook.com (2603:10b6:a03:7f::26) by BYAPR11MB3400.namprd11.prod.outlook.com (2603:10b6:a03:1a::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16; Tue, 15 Sep 2020 10:21:02 +0000 Received: from BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f43b:a137:dab8:8b0b]) by BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f43b:a137:dab8:8b0b%6]) with mapi id 15.20.3370.019; Tue, 15 Sep 2020 10:21:02 +0000 From: "Ananyev, Konstantin" To: "Chautru, Nicolas" , "Xu, Rosen" , "dev@dpdk.org" , "akhil.goyal@nxp.com" CC: "Richardson, Bruce" Thread-Topic: [dpdk-dev] [PATCH v3 05/11] baseband/acc100: add LDPC processing functions Thread-Index: AQHWffVBLw/FDkKw90u53wHMQlmsYqlPYOgAgAbYqwCAAG4EMIAAwsGAgBIs1vA= Date: Tue, 15 Sep 2020 10:21:01 +0000 Message-ID: References: <1597796731-57841-1-git-send-email-nicolas.chautru@intel.com> <1597796731-57841-6-git-send-email-nicolas.chautru@intel.com> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [46.7.39.127] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ec99f3ff-c38c-4d37-699e-08d859610bfc x-ms-traffictypediagnostic: BYAPR11MB3400: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 5cCo8dN5mBOXVEQfXsd+cC2Ny1g8CUsfQ2lgxmeuEp43KzVtjExSQcVMCGWxfIBqejSNPRtt1UAXokLiqPNMXrNkccPaMA0TYuKRHdFoBRfd2Nrhxi9yR8Vyc7vhR7L+3pFNWUJG1FtvH3mxFrV8xIl21T6xvyENETgPq/dxjk6a8hr9z6SNdJ46qq9HuS1wHFoVSGqeSsTcv/iydvrOjh2QQbW4cJj1JzmwpeLd3vnkQflkqrxUtUO2zKeO7VfFnu7S6oNvGVoSX5n77HElzThyYqq8QI5HGgaD82Grtvs1PcAt7GF6ZPvpuHp1qc/AFJ8TUuCkwg4b6RsimlMz0A== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3301.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(136003)(39860400002)(366004)(346002)(376002)(33656002)(107886003)(316002)(5660300002)(76116006)(66446008)(66946007)(66476007)(64756008)(66556008)(6506007)(71200400001)(9686003)(52536014)(2906002)(186003)(26005)(55016002)(8936002)(478600001)(86362001)(4326008)(83380400001)(110136005)(7696005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: nGCkwEHuS2/KVsl558MurReONWINqfVYdsdhQudSBL3Quq8eY5fmK3iizDajDiqTc/oAIRtfU1dJSiAvSMLBIlSJyLfbUm2NLvvPNK8xquMxFa6YLYNZUdsTwlrn98qg05y7YZ8VDpWa6uilby6fKGybB/oF3wopSYoBHH32zSYCtFNqADs5luNO/kdFI+aiVxLwF3EzGPERYAgBNriazPl/YNbZCaDoKp8+LsLIyICQUGbXVsHsU86Net2dirnbU9l4YwA5LfgbiSKDiSO+FZjs+trUl4u4t7nfsFZRNvvaUZDFoOPbzPMaHLdxzhl9ZmIV6fBITufiGI7xbj5EaTCIhO93IicEzttQvTVriRVUUmTehArrovf1B3rAU1liLvqgnXWsZq0gbPKqesP1880XHJlOYWeplgHNH42+iBNd5ui53r9JZaLnD1fyvTe1ac50KQlvvqsPQR3qAahCQzaSMupRjtZ3KEoldAdD9li2d4b1P+6ujf1Izgk5u1HXAr+jQTtDBWgVCuBNBqRp8Ro3l/D5zacyiWKTBzzJNQ2e9iYZvow+ZORIOMx07b1FqUE2szJAVKrdIf1VK1mKL+4sfFkIemIDq4QXRm4X/cAUOwLxHbItpTuD09O7NVsBDgoNG0B5dxaByaHKvKvQBA== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3301.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ec99f3ff-c38c-4d37-699e-08d859610bfc X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Sep 2020 10:21:01.9677 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: deLg4L0at1TwuF6KyYVUe+6FKYSy/mFrlqsRQ3y7mW8+nLG8le2CS6Nwz+Pje8w+FNFuJpY+O8LXGCpgaMy8GDxizKOrODzcRUpds7wQZig= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3400 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 05/11] baseband/acc100: add LDPC processing functions 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > > > > > > + > > > > > > +static inline char * > > > > > > +mbuf_append(struct rte_mbuf *m_head, struct rte_mbuf *m, > > > > > > +uint16_t > > > > > > +len) { > > > > > > + if (unlikely(len > rte_pktmbuf_tailroom(m))) > > > > > > + return NULL; > > > > > > + > > > > > > + char *tail =3D (char *)m->buf_addr + m->data_off + m- > > >data_len; > > > > > > + m->data_len =3D (uint16_t)(m->data_len + len); > > > > > > + m_head->pkt_len =3D (m_head->pkt_len + len); > > > > > > + return tail; > > > > > > +} > > > > > > > > > > Is it reasonable to direct add data_len of rte_mbuf? > > > > > > > > > > > > > Do you suggest to add directly without checking there is enough roo= m > > > > in the mbuf? We cannot rely on the application providing mbuf with > > > > enough tailroom. > > > > > > What I mentioned is this changes about mbuf should move to librte_mbu= f. > > > And it's better to align Olivier Matz. > > > > There is already rte_pktmbuf_append() inside rte_mbuf.h. > > Wouldn't it suit? > > >=20 > Hi Ananyev, Rosen, > I agree that this can be confusing at first look and notably compared to = packet processing. > Note first that this same existing syntaxwhich is already used in all bb= dev PMDs when manipulating outbound mbufs in the context of base > band signal processing (not really a packet as for NIC or other devices). > Nothing new in that very PMD as this follows existing logic already in DP= DK bbdev PMDs. >=20 > This function basically differs from the typical rte_pktmbuf_append() as = this is not appending data in the last mbuf but is used to potentially > update sequentially data for any mbufs in the middle from preallocated da= ta hence it takes 2 arguments for both the head and the current > mbuf segment in the list. Ok, thanks for explanation. > There may be a more elegant way to do this down the line notably once the= re is a proposal to handle gracefully large mbufs (another > usecase we have to handle in a slightly custom way). But I believe that i= s orthogonal to that very PMD serie which keeps on reling on using > existing logic. >=20 >=20 >=20 >=20 > > > > > > > In case you ask about the 2 mbufs, this is because this function is > > > > used to also support segmented memory made of multiple mbufs segmen= ts. > > > > Note that this function is also used in other existing bbdev PMDs. > > > > In case you believe there is a better way to do this, we can > > > > certainly discuss and change these in several PMDs through another = serie. > > > > > > > > Thanks for all the reviews and useful comments. > > > > Nic