From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id B29BE2D13 for ; Tue, 13 Nov 2018 19:56:57 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2018 10:56:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,229,1539673200"; d="scan'208";a="89015252" Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28]) by orsmga007.jf.intel.com with ESMTP; 13 Nov 2018 10:56:54 -0800 Received: from irsmsx156.ger.corp.intel.com (10.108.20.68) by irsmsx105.ger.corp.intel.com (163.33.3.28) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 13 Nov 2018 18:56:53 +0000 Received: from irsmsx106.ger.corp.intel.com ([169.254.8.87]) by IRSMSX156.ger.corp.intel.com ([169.254.3.140]) with mapi id 14.03.0415.000; Tue, 13 Nov 2018 18:56:53 +0000 From: "Ananyev, Konstantin" To: "Trahe, Fiona" , "dev@dpdk.org" CC: "De Lara Guarch, Pablo" , Akhil Goyal , "Doherty, Declan" , "Ravi Kumar" , Jerin Jacob , "Zhang, Roy Fan" , Tomasz Duszynski , Hemant Agrawal , Natalie Samsonov , Dmitri Epshtein , Jay Zhou Thread-Topic: [RFC] cryptodev: proposed changes in rte_cryptodev_sym_session Thread-Index: AQHUO9Lg2zx23KOBQ0qIus6aAigF26VNHgOAgAAl7ICAAAJBgIABR08A Date: Tue, 13 Nov 2018 18:56:52 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258010CE4AB4F@IRSMSX106.ger.corp.intel.com> References: <1535132906-5167-1-git-send-email-konstantin.ananyev@intel.com> <348A99DA5F5B7549AA880327E580B43589676DA2@IRSMSX101.ger.corp.intel.com> <348A99DA5F5B7549AA880327E580B43589676F0A@IRSMSX101.ger.corp.intel.com> <348A99DA5F5B7549AA880327E580B43589676F2A@IRSMSX101.ger.corp.intel.com> In-Reply-To: <348A99DA5F5B7549AA880327E580B43589676F2A@IRSMSX101.ger.corp.intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzYyYmEwZjAtMjg1NC00MGY1LTg2NmQtNDNiNjczMzg1NDVmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiOXBaRkJ2SHFiVEhWS1pnZGZGZE5OcDYrb0dXUG9Bc2RDMXhZKzZcL1kxanlINTRERnd5UWszbXlzQ2M3Z1I3a0sifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [RFC] cryptodev: proposed changes in rte_cryptodev_sym_session 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: Tue, 13 Nov 2018 18:56:58 -0000 > -----Original Message----- > From: Trahe, Fiona > Sent: Monday, November 12, 2018 11:25 PM > To: Ananyev, Konstantin ; dev@dpdk.org > Cc: De Lara Guarch, Pablo ; Akhil Goyal <= akhil.goyal@nxp.com>; Doherty, Declan > ; Ravi Kumar ; Jerin Jacob= ; Zhang, Roy Fan > ; Tomasz Duszynski ; Hemant Ag= rawal ; Natalie Samsonov > ; Dmitri Epshtein ; Jay Zhou ; Trahe, Fiona > > Subject: RE: [RFC] cryptodev: proposed changes in rte_cryptodev_sym_sessi= on >=20 > Correction below >=20 > > -----Original Message----- > > From: Trahe, Fiona > > Sent: Monday, November 12, 2018 4:17 PM > > To: Ananyev, Konstantin ; dev@dpdk.org > > Cc: De Lara Guarch, Pablo ; Akhil Goyal= ; > > Doherty, Declan ; Ravi Kumar ; Jerin Jacob > > ; Zhang, Roy Fan ; Tomasz Duszynski > > ; Hemant Agrawal ; Natalie Sa= msonov > > ; Dmitri Epshtein ; Jay Zhou ; > > Trahe, Fiona > > Subject: RE: [RFC] cryptodev: proposed changes in rte_cryptodev_sym_ses= sion > > > > RE item 4: use of session pool in qp setup: > > > > 4.#2 and #3 above implies that now each struct rte_cryptodev_sym_se= ssion > > > > would have sort of readonly type data (init once at allocation ti= me, > > > > keep unmodified through session life-time). > > > > That requires more changes in current cryptodev implementation: > > > > Right now inside cryptodev framework both rte_cryptodev_sym_sessi= on > > > > and driver specific session data are two completely different sct= rucures > > > > (e.g. struct struct null_crypto_session and struct null_crypto_se= ssion). > > > > Though current cryptodev implementation implicitly assumes that d= river > > > > will allocate both of them from within the same mempool. > > > > Plus this is done in a manner that they override each other field= s > > > > (reuse the same space - sort of implicit C union). > > > > That's probably not the best programming practice, > > > > plus make impossible to have readonly fields inside both of them. > > > > So to overcome that situation I changed an API a bit, to allow > > > > to use two different mempools for these two distinct data structu= res. > > [Fiona] Ok, I can see either way on this. > > Seems we could continue to use a single pool for multiple struct types = as long as the size is bigger > > than the maximum. But it's also reasonable to change to two as they are= used so differently > > - especially if that allows one to be handled as read-only after init = and the other not - but I > > didn't see any code which was doing this. > > Anyway, if we go with 2 pools, I propose we remove the sess pool from t= he qp config, rather than pass in > > both pools. > > I just did a trawl trough the PMDs and none use the sess pool - that pa= ram is a hangover from earlier. > > A few store it in a local var, but never use it for anything. > > Now is a good time to remove it. > [Fiona] Correction - I found some PMDs do use it - for the sessionless ca= se. So I suppose we > will need to pass in the two pool params. Yes, we need it for sessionless op. Konstantin