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 A0DC0A0566; Tue, 17 Mar 2020 14:27:11 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 732481BE51; Tue, 17 Mar 2020 14:27:11 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id EF0F925D9 for ; Tue, 17 Mar 2020 14:27:09 +0100 (CET) IronPort-SDR: MMP5lAJLfaleBpOLhiIydZKJp1EGxxwD6JTTY6MoEPZby0uTu37iu7O9aAu1rKz+MYBuDWkLM+ Ta44Ev5F4W/w== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2020 06:27:08 -0700 IronPort-SDR: P7UWMwQqxbQljHKAMR5lDdU7frWyc6AQzWFgDHvVHyX/M6nVMOrttLk8C71YtF3TFVvJHWUW0q GnKPLA5M5Csg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,564,1574150400"; d="scan'208";a="445493505" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga006.fm.intel.com with ESMTP; 17 Mar 2020 06:27:08 -0700 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 17 Mar 2020 06:27:08 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 17 Mar 2020 06:27:08 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 17 Mar 2020 06:27:07 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=knIT9HiHVpOZtJhxP9oitpGa2NIcYJwS+pnvn8tEdJDGQkB3LYmrw/OGI1c6y+kMbhEeeDseq+N51Xq0T6bcI+90r8NHn62QudHjG6HIlPh7UdvlkwvXP25Z171khJNN+GWH5OIRvCy9oO6iCz4g+DRPHjrNwXHyr+ign/wb9VYi5cp2NUml0VWExSbh2iSLUOHfAdU2XzTvSoLf2h0XI1OO6c7EBrm87APYH9Q2PfH30e+b3W8QLUHZo4sp7AqCn4yEA/6e5WtWK+vhvvitT3TG2XAADegZL5fFySDA+TKlAejUYiwe0LmtfP7AUDgNKhLbow9iBA4QBgjYyQ9JJA== 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=vSDtHEGGXl1O1F8TR6OLefwSEUS+EM14HB5LpJzPM2A=; b=oPAiV6Vj5a01fmOXgRB7ip9gwjBKpt0dGmEUABKLAsBC9AOZ43UlCf8csTp4w/1CjCalyeH6PsqO6TJDFvA5HPA/rV01HR+r12s9KslyLrF2fcnX54PeULNJZ8tfT/QF81f/dGuoUS5shE1ISYE5aXlO8AVdhKjv6FetZOOexEq3RNxh9AZgNhoQjP5GwdJOcvFERQii2fXOvQP3GRZ+7Syj2UsjQ+9i16wmq2Ma2VD3QJRJXSyrbPrLZdo+/e6ApA7h1nuqM9xhi6Kh53uv6iJiZPVeIcxA18YyjJ3IHJVj5Ci8OVpLfacg2dg1jbaMtYKi9Q3WCLqGTnuBcjQYTg== 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=vSDtHEGGXl1O1F8TR6OLefwSEUS+EM14HB5LpJzPM2A=; b=FJXlqoWNWr6eUGTQA5SW0N8ehbGgQN1RSf3euZItorhlXVrOMXIFHmojg1cDLhUmwQtBTyJsnddg6v+RIJ6Q5+LUNxVdANi/DNQy79HcBAWwSdX1HG03vVpYyi0W/6E+Wz6SVcfZ7hg/aZSWNKQod3v+FAyF49T4r7ZAeqkE/Jk= Received: from BL0PR11MB3316.namprd11.prod.outlook.com (2603:10b6:208:68::28) by BL0PR11MB3281.namprd11.prod.outlook.com (2603:10b6:208:66::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.22; Tue, 17 Mar 2020 13:27:05 +0000 Received: from BL0PR11MB3316.namprd11.prod.outlook.com ([fe80::e9eb:fb8f:f54e:4622]) by BL0PR11MB3316.namprd11.prod.outlook.com ([fe80::e9eb:fb8f:f54e:4622%6]) with mapi id 15.20.2814.021; Tue, 17 Mar 2020 13:27:05 +0000 From: "Kusztal, ArkadiuszX" To: Thomas Monjalon , "Trahe, Fiona" CC: David Marchand , "nhorman@tuxdriver.com" , "bluca@debian.org" , "ktraynor@redhat.com" , Ray Kinsella , "dev@dpdk.org" , Akhil Goyal , "Yigit, Ferruh" , "Ananyev, Konstantin" , "dev@dpdk.org" , Anoob Joseph , "Richardson, Bruce" , "Mcnamara, John" , "dodji@seketeli.net" , Andrew Rybchenko , "aconole@redhat.com" , "Trahe, Fiona" Thread-Topic: [dpdk-dev] [PATCH v2 4/4] add ABI checks Thread-Index: AQHV1sl6v2NXnfoHmkOb0gtPonzveKgB6XuAgAAHogCAAB+GAIAAAuCAgAFOQQCAAEVxAIABLWUAgAMQ1QCAABrKgIABOz4AgACAVgCAAAb/gIAAFsaAgAAktQCAAN6iAIAAJxkAgAA0qgCAAAHrAIAAHfYAgA3YuCCAMkX4gIAAA1cAgAGPDDA= Date: Tue, 17 Mar 2020 13:27:05 +0000 Message-ID: References: <20191220152058.10739-1-david.marchand@redhat.com> <2810256.WAvfycf1tz@xps> In-Reply-To: <2810256.WAvfycf1tz@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.2.0.6 dlp-product: dlpe-windows x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiN2M5MGY2NmMtNDk4Zi00ZDU1LWEzMDUtOTc3YWQ3YmNjOTUzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiNm83QzJJRXJFUXZYNXN2RkhlKzJCclJIYnZrejhHSndHRkszR3pMXC9HQTNHVUJqZ2ZPYVNIcWtyUHlKM05rMUMifQ== authentication-results: spf=none (sender IP is ) smtp.mailfrom=arkadiuszx.kusztal@intel.com; x-originating-ip: [134.191.227.39] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3cae5945-ebd1-4012-7084-08d7ca76e2dd x-ms-traffictypediagnostic: BL0PR11MB3281: 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:9508; x-forefront-prvs: 0345CFD558 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(136003)(396003)(376002)(346002)(39860400002)(199004)(316002)(71200400001)(8936002)(81166006)(8676002)(81156014)(2906002)(55016002)(54906003)(110136005)(26005)(478600001)(9686003)(186003)(4326008)(107886003)(7416002)(6506007)(6636002)(76116006)(5660300002)(53546011)(64756008)(66476007)(66946007)(66446008)(66556008)(52536014)(33656002)(7696005)(86362001); DIR:OUT; SFP:1102; SCL:1; SRVR:BL0PR11MB3281; H:BL0PR11MB3316.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: zD+yuo28rbTXHvI6i06DhsZL8hKKgo0KhF6NfqrWvMnlWHPmEf9VsLs9unJkgr4pRyv5QfOjRJ7JWIJ41XOZhfbQaBM+EiRA2ZCfbJ1h54JFGWbeZ/smlVKEpH+jRNgIYbpfmi+0Jf01QoYbPEllOJom3fd5aEb9XlbJtcCjjGrlV7zz1w/xHokGBOM5+GVrQGi/xjGa4eF0AnVsv600eGTq1TcsxrW8hn398PRzZNMMGjVxP9Y+letJuz9EnYR5XjDtNGbfYu3HWApgA8bT58nl+49qGAE4QKy4etI8XfaP0fjH81ofSQLdW/mTXwz4NI9V34oIkvsm9fvRzVDS07nMiZU/SMuRs5aqof39hkWLKgKvuqm2KjIRbtXBgIYltIigE6e+PoGTLD/sEetIDB2Qw6ffqDnBrVksp1jKW6GYLVT2G63s+Y8okYCnjihD x-ms-exchange-antispam-messagedata: 0Mr5zZWhxHJl7qABhJ4bLeWhEbFyNfbpDcEoIIG1zUK+uQ4Pp3vULLj1+DL0Uem0kLnWRrJCaYqR63dkz+T0xSQx+0QAjrLFGXdNjgOigLkN07ELCvK5kqH9Kfw1gne/RhsFih2oFdYU5I0IOENdGQ== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 3cae5945-ebd1-4012-7084-08d7ca76e2dd X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Mar 2020 13:27:05.5830 (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: xnLXQUOmn31ysSlEAkZcIz7YU8bE/e1KjSmj3rG8Ot7Q2u4HlI2Ji3YkbLLgxzYOR0/syb2SiiL7PA4xF+k0rkp5P4FPgMysmdwiID3F3kE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR11MB3281 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2 4/4] add ABI checks 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" Hi Thomas, > -----Original Message----- > From: Thomas Monjalon > Sent: Monday, March 16, 2020 2:09 PM > To: Trahe, Fiona > Cc: Kusztal, ArkadiuszX ; David Marchand > ; nhorman@tuxdriver.com; > bluca@debian.org; ktraynor@redhat.com; Ray Kinsella ; > dev@dpdk.org; Akhil Goyal ; Yigit, Ferruh > ; Ananyev, Konstantin > ; dev@dpdk.org; Anoob Joseph > ; Richardson, Bruce ; > Mcnamara, John ; dodji@seketeli.net; Andrew > Rybchenko ; aconole@redhat.com; Trahe, > Fiona > Subject: Re: [dpdk-dev] [PATCH v2 4/4] add ABI checks >=20 > 16/03/2020 13:57, Trahe, Fiona: > > From: Kusztal, ArkadiuszX > > > > > > The patch we're working on will provide two versions of > > > > > > rte_cryptodev_info_get(), both call the same PMD function from > > > > > > the > > > > dev_ops info_get fn ptr. > > > > > > The default version operates s as normal, the 19.11 version > > > > > > searches through the list returned by the PMD, looking for > > > > > > sym.aead.algo =3D ChaChaPoly, it needs to strip it from > > > > > the list. > > > > > > As PMDs just pass a ptr to their capabilities list ( it isn't > > > > > > a linked list, but an array with an end marker =3D > > > > > > RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST) if the API layer > > > > > > detects Chacha it must allocate some space and store a local > > > > > > copy of the trimmed > > > > list. This must be stored only once per device. > > > > > > [Arek] The problem with this solution is that we need to allocate mem= ory. > > > So the question is how to handle unlikely case of malloc error when > > > we operate inside void function rte_cryptodev_info_get? > > > And even if we would pass somehow error condition to the caller then > what to do is another question. > > > > [Fiona] Quick recap: To avoid breaking ABI, we must return a set of > > capabilities with/without ChaChaPoly depending on the appl version. To > > resolve this, within the rte_cryptodev layer, we propose to inspect the > capabilities returned by PMD and strip ChaCha if it exists. > > In that case memory for the new trimmed capabilities array has to be > malloced by the lib. >=20 > What happens if the capability is removed from the original capabilities > input? >=20 > > All good, except how to handle a malloc fail is yet another API breakag= e as > rte_cryptodev_get_info() returns void. > > We propose to return an empty capability list, i.e. a list with only > > the END element (which can be done without malloc) in this corner case = of > a corner case. > > Anyone see any issue with this? >=20 > How can we use the feature if it is not advertised in capabilities? What Fiona meant is that empty capability would indicate error condition in= this case. That's why she asked if you ok with this API breakage. >=20 >=20