From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 869602BDB for ; Tue, 22 Jan 2019 10:31:56 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x0M9UHdx030110; Tue, 22 Jan 2019 01:31:55 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=nvjuT1YW9e1/qPZYCvEhWKWg+9MX4FqWMjkzZ51HAPA=; b=xr7At7djvkz1yMjxypMmAndxbly7MNrkEybYCTkZdbLm80RAU5Iv0MLxBMmTPoI909iR umAUjulSqaDkKvkVxKVrHdzv382er+6eZEG+7PRKz297JTMXG0DVbO1PG8e3S4PM4uKx I9+A4l3+4ZujktfYqkN77untzoninrtk1kKVBtWDPXhAWKU+dAcgeWHwmad8IAfdARXz oBIAt4kaF31IMojTRBN+mWCT5Z02kKl/Y15CzQV4XhgAEfyo3gE0nBIsfUR9TJujThci Tm9htRuHytO6f+7AUozFJk4i34lxEVAwqf++yy9yVdK5obR2EQBQAsxEE+4Am0lrxd6g OA== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2q5kv0t2gr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 22 Jan 2019 01:31:55 -0800 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 22 Jan 2019 01:31:54 -0800 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (104.47.45.52) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Tue, 22 Jan 2019 01:31:54 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nvjuT1YW9e1/qPZYCvEhWKWg+9MX4FqWMjkzZ51HAPA=; b=Z3PiCAgYnjx8ebsjcSvZId5FClDDkTKkNr8EeAo7s4NlepIVxm1YMLqOtpnoqcegCjuUwGhy9DzdaFNz2KIX0lObZGRzRuBFlCaBtdQL73s6x8FjZdxf4i3C/7lLMQSz6aI26nx4uKK/4I2axISKfrm/bgjx0m2RTSXSFnKas8E= Received: from MN2PR18MB2877.namprd18.prod.outlook.com (20.179.22.16) by MN2PR18MB2462.namprd18.prod.outlook.com (20.179.81.212) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1537.26; Tue, 22 Jan 2019 09:31:52 +0000 Received: from MN2PR18MB2877.namprd18.prod.outlook.com ([fe80::e974:6b01:9631:11d7]) by MN2PR18MB2877.namprd18.prod.outlook.com ([fe80::e974:6b01:9631:11d7%6]) with mapi id 15.20.1537.031; Tue, 22 Jan 2019 09:31:52 +0000 From: Anoob Joseph To: "Trahe, Fiona" , Akhil Goyal , "De Lara Guarch, Pablo" CC: Jerin Jacob Kollanukkaran , "Narayana Prasad Raju Athreya" , Shally Verma , "dev@dpdk.org" Thread-Topic: [PATCH] doc: announce ABI change for cryptodev config Thread-Index: AQHUrkiNRSYeo6tWnUGaZWm74s8S2KWzUDxQgAAdi7CAASH3YIAGfVCw Date: Tue, 22 Jan 2019 09:31:52 +0000 Message-ID: References: <1547717928-21203-1-git-send-email-anoobj@marvell.com> <348A99DA5F5B7549AA880327E580B435896CBFFB@IRSMSX101.ger.corp.intel.com> In-Reply-To: Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [115.113.156.2] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; MN2PR18MB2462; 20:931Zk4vlUjVbPXI5pEX62AlNsaqpC7xUoSrMMxiGnqEcOB8cF4d8jrC07glEiF001RYv2EkJaqFpsS9ATsrPJDPT4y9CK1TB2WRrlemkK1Cn4F5H9NhVvK9w1PulY5r43L0icTHgwWUWV/zhE0roOP8Xqxwy9APexPtZvf9L6w0= x-ms-office365-filtering-correlation-id: 3272dba0-53e4-4dd9-efa1-08d6804c713f x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(2017052603328)(7153060)(7193020); SRVR:MN2PR18MB2462; x-ms-traffictypediagnostic: MN2PR18MB2462: x-microsoft-antispam-prvs: x-forefront-prvs: 0925081676 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(136003)(366004)(346002)(376002)(39860400002)(189003)(13464003)(199004)(478600001)(6436002)(93886005)(476003)(2906002)(14444005)(11346002)(7696005)(446003)(25786009)(486006)(316002)(66066001)(229853002)(71190400001)(71200400001)(256004)(54906003)(6306002)(55016002)(110136005)(9686003)(76176011)(105586002)(106356001)(97736004)(305945005)(55236004)(74316002)(6116002)(14454004)(102836004)(7736002)(26005)(186003)(4326008)(81166006)(86362001)(8676002)(81156014)(99286004)(3846002)(33656002)(6506007)(53546011)(561944003)(68736007)(6246003)(8936002)(53936002); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR18MB2462; H:MN2PR18MB2877.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: pKnI02eBHfHylWILx4ITTw7utRfXYnpxvI9denegbEjPFgNb2pO6NMvKI2CIqOe+ltolx8ZhJGof3LZCgaDoCVhzIqearzXGgSImvTVTEKS79hPgSfZNgy9j0mQ/JBsE3hEdSwJ7SWv246VoClovXokIVoD70ad56pt6fooDWVsOOIxCnvUCcymfTsQspklzOExa0XSQ7uGvTPfpvQzZ4ETo2vCWUBTdNEd7DqfghDq60v6qXjebH4L9SV+CAClEEnqTRpi7lWoXKoqzBc3Cydvt6WfMFKuUZoAdzcEieLiiB4Agk9a5FxGZGKmXBUNaGZhyeA8neoMFxb0XCocSXLyBavJjQum5zW00fMI8CeAzdYb0kKUGSwQAd9g2gLT3z6TWVLgG7YWOGE6P10QokabABWgYuCUPSCR8GMxzi8k= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 3272dba0-53e4-4dd9-efa1-08d6804c713f X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Jan 2019 09:31:52.3848 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB2462 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-01-22_04:, , signatures=0 X-Proofpoint-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1901220077 Subject: Re: [dpdk-dev] [PATCH] doc: announce ABI change for cryptodev config 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, 22 Jan 2019 09:31:56 -0000 Hi Fiona, Any more comments on this? @ Akhil, Pablo Can you review this change and share your thoughts? Thanks, Anoob > -----Original Message----- > From: Shally Verma > Sent: 18 January 2019 12:29 > To: Anoob Joseph ; Trahe, Fiona > ; Akhil Goyal ; De Lara Guarc= h, > Pablo > Cc: Jerin Jacob Kollanukkaran ; Narayana Prasad Raju > Athreya ; dev@dpdk.org > Subject: RE: [PATCH] doc: announce ABI change for cryptodev config >=20 > HI Fiona, Anoob >=20 > >-----Original Message----- > >From: Anoob Joseph > >Sent: 17 January 2019 19:17 > >To: Trahe, Fiona ; Akhil Goyal > >; De Lara Guarch, Pablo > > > >Cc: Jerin Jacob Kollanukkaran ; Narayana Prasad > >Raju Athreya ; Shally Verma > >; dev@dpdk.org > >Subject: RE: [PATCH] doc: announce ABI change for cryptodev config > > > >Hi Fiona, > > > >Please see inline. > > > >Thanks, > >Anoob > > > >> -----Original Message----- > >> From: Trahe, Fiona > >> Sent: 17 January 2019 17:07 > >> To: Anoob Joseph ; Akhil Goyal > >> ; De Lara Guarch, Pablo > >> > >> Cc: Jerin Jacob Kollanukkaran ; Narayana Prasad > >> Raju Athreya ; Shally Verma > >> ; dev@dpdk.org; Trahe, Fiona > >> > >> Subject: RE: [PATCH] doc: announce ABI change for cryptodev config > >> > >> Hi Joseph, > >> > >> > -----Original Message----- > >> > From: Anoob Joseph [mailto:anoobj@marvell.com] > >> > Sent: Thursday, January 17, 2019 9:40 AM > >> > To: Akhil Goyal ; De Lara Guarch, Pablo > >> > ; Trahe, Fiona > >> > > >> > Cc: Anoob Joseph ; Jerin Jacob Kollanukkaran > >> > ; Narayana Prasad Raju Athreya > >> > ; Shally Verma ; > >> > dev@dpdk.org > >> > Subject: [PATCH] doc: announce ABI change for cryptodev config > >> > > >> > Add new field ff_enable in rte_cryptodev_config. This enables > >> > applications to control the features enabled on the crypto device. > >> > > >> > Proposed new layout: > >> > > >> > /** Crypto device configuration structure */ struct > >> > rte_cryptodev_config { > >> > int socket_id; /**< Socket to allocate resources on *= / > >> > uint16_t nb_queue_pairs; > >> > /**< Number of queue pairs to configure on device */ > >> > + uint64_t ff_enable; > >> > + /**< Feature flags to be enabled on the device. Only the feature= s set > >> > + * on rte_cryptodev_info.feature_flags are allowed to be set. > >> > + */ > >> > }; > >> > > >> > For eth devices, rte_eth_conf.rx_mode.offloads and > >> > rte_eth_conf.tx_mode.offloads fields are used by applications to > >> > control the offloads enabled on the eth device. This proposal adds > >> > a similar ability for the crypto device. > >> [Fiona] I'm unfamiliar with eth config so can you explain a bit more > >> how this works? > > > >[Anoob] For eth devices, application would first do > >rte_eth_dev_info_get() and gets the capabilities. The device would > >expose it's capabilities using dev_info.rx_offload_capa & > dev_info.tx_offload_capa. The application can enable/disable these featur= es > while configuring the eth ports. > > > >From ipsec-secgw: > >https://git.dpdk.org/dpdk/tree/examples/ipsec-secgw/ipsec-secgw.c#n1866 > > > >if (frame_size) { > > local_port_conf.rxmode.max_rx_pkt_len =3D frame_size; > > local_port_conf.rxmode.offloads |=3D > DEV_RX_OFFLOAD_JUMBO_FRAME; > > } > > > > > > > >ret =3D rte_eth_dev_configure(portid, nb_rx_queue, nb_tx_queue, > > &local_port_conf); > > > > > > > >This way application can choose to disable unwanted offloads. > > > >Port init in ipsec-secgw: > >https://git.dpdk.org/dpdk/tree/examples/ipsec-secgw/ipsec-secgw.c#n1826 > > > >> e.g. if a crypto device's info says it supports > >> RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO > >> RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING > >> RTE_CRYPTODEV_FF_CPU_AESNI > >> RTE_CRYPTODEV_FF_SECURITY > >> RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT > >> these things are all already enabled. > >> Is the param a way to disable some of them? > > > >[Anoob] Yes. There are few other flags in addition to the above. Like > RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO. > > > >> If so, it would be better to call it ff_disable. > > > >[Anoob] Calling it ff_enable is to make it similar to how it's done with= eth > devices. Either way should be fine. > [Shally] keeping it as "ff_enable" will require application to set thes= e flags to > configure PMD. If we define it other way around, then it would be mean to= mask > out unwanted features which can be quite many. > Though purpose can be achieved both ways but keeping it as "enable" looks > more easy to use, readable and inline with how ethdev handle multi featur= e > support. > So I would prefer to keep it as "ff_enable" >=20 > Thanks > Shally >=20 > > > >> And to limit it to the subset of features that it makes sense to disab= le. > >> i.e. why would an application disable chaining or any of the SGL > >> flags? It would just add extra cycles in the PMD to error check on > >> these cases, instead the appl can just not send such commands. > >> And it doesn't make sense to disable AESNI or > >> RTE_CRYPTODEV_FF_HW_ACCELERATED. > >> Actually I can't see what an application would want to achieve by > >> disabling any flag? > > > >[Anoob] Features like ASYMMETRIC or SECURITY is not required for every > >application. SECURITY is added for eth devices also. But since the > >feature can be disabled while configuring the port, applications are giv= en a > choice to disable it. That way apps like l2fwd doesn't enable SECURITY. W= ith > crypto this option is not available. > > > >If the unused offloads can be communicated to the PMD before initializat= ion, > the PMD will be allowed to optimize hardware usage. > >Otherwise, supporting more features would affect performance, even if > application is not making use of those features. > > > >Ex: test-crypto-perf doesn't use ASYM/SECURITY. Now adding these feature= s > would affect the performance of this app.