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 EA333288C for ; Thu, 17 Jan 2019 14:47:25 +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 x0HDkDbt005784; Thu, 17 Jan 2019 05:47:25 -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=yXvW7LA5tTvkSZ56NjtX4crDM7O3Bl2KvYQ6Qrv2R8k=; b=yLoRg1nsHBJV35hWrohSBRl3DsCm7JR82aVHRdK0cOQ4vERRADIQctdzx2a4udab7xmu afttlwsyMDiEzRV3OKhfEEG/2gRk+qa+zjNJFyDxGS7aA8yYHPSyPaspDzdfls/wJpeL IR4m2IM7ibjIFQJYEM7FPoyOJh70svuIPzMRAS/XUXcsAguNOt/Ga+rLnbsKTko5LXUi CqhlJhJvSRHcMJ0tfsqaM0AZbsj/2ZU05hfl7mGOTW2PGCuspyIvS6oewlfMTCRKn/yC jyavFNmM625JthxIb76wPpOWGE/GGuRyRP1mrofF0M2NW5AyobtbvXNjgqH5gtRTd4ZH vw== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 2q29mt5hvc-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 17 Jan 2019 05:47:24 -0800 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 17 Jan 2019 05:47:23 -0800 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (104.47.38.52) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 17 Jan 2019 05:47:23 -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=yXvW7LA5tTvkSZ56NjtX4crDM7O3Bl2KvYQ6Qrv2R8k=; b=lJ7ZrgyAh93ykcPL289em9bLm8+VEvQ9fhCAVZvejxN53+OrL6yHVHcUWtZeIuCeqTrOJUGhMI7Xo+JcRNW1QHr5L0zGntHhLiZlQMezxXvZ6wWyRfrlJwHAqGG7NpQRBtvuXloN3nN1BDUzW6q7FD2ka+XBZ0VOTDloRkHgYeA= Received: from MN2PR18MB2877.namprd18.prod.outlook.com (20.179.22.16) by MN2PR18MB2526.namprd18.prod.outlook.com (20.179.82.160) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1537.26; Thu, 17 Jan 2019 13:47:21 +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.018; Thu, 17 Jan 2019 13:47:21 +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: AQHUrkiNRSYeo6tWnUGaZWm74s8S2KWzUDxQgAAdi7A= Date: Thu, 17 Jan 2019 13:47:20 +0000 Message-ID: References: <1547717928-21203-1-git-send-email-anoobj@marvell.com> <348A99DA5F5B7549AA880327E580B435896CBFFB@IRSMSX101.ger.corp.intel.com> In-Reply-To: <348A99DA5F5B7549AA880327E580B435896CBFFB@IRSMSX101.ger.corp.intel.com> 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; MN2PR18MB2526; 20:YO9anidji1ddJM+Rcpfbvbl2l1bb5i1EMfBxiTi6UHLcv2hR4n7m2JO1j2yYv+V0IOfI14XeI3argo3P79IiO7tW3xqaSTGfeBPyKTkcRJX5WT8ZQnzHV0+7lKkrs/UmpOnIOXYv7PHX+c9h6+8e0+DxEOnqJBUpgQHgdIPvbzY= x-ms-office365-filtering-correlation-id: 6c66fff0-2d66-405f-fe3c-08d67c824dbe x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(2017052603328)(7153060)(7193020); SRVR:MN2PR18MB2526; x-ms-traffictypediagnostic: MN2PR18MB2526: x-microsoft-antispam-prvs: x-forefront-prvs: 0920602B08 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(376002)(346002)(396003)(39860400002)(136003)(199004)(189003)(13464003)(54906003)(55236004)(102836004)(6306002)(33656002)(110136005)(478600001)(71190400001)(71200400001)(316002)(561944003)(9686003)(68736007)(966005)(229853002)(7696005)(55016002)(76176011)(25786009)(14454004)(6506007)(53546011)(66066001)(8676002)(81156014)(81166006)(8936002)(6436002)(6246003)(6116002)(3846002)(74316002)(486006)(476003)(5660300001)(14444005)(256004)(4326008)(106356001)(2906002)(97736004)(105586002)(26005)(11346002)(446003)(186003)(7736002)(99286004)(305945005)(53936002)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR18MB2526; H:MN2PR18MB2877.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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: TZ2IOGU4eHbvjmbn7rrIeamtm6AVBt2wy6Rmr6SZnny8pnA/hXEBB3ZUly3E6mtbAKeMZ/g5FEnH3lr3yMqSXz1+ISUKF7wduSbBpM9xaGvX1e/aljButKt534RDeW6opAn4HIjz/ldC9eFcSa/ou85mieocFxGo4Js+wOQbbgiQlfwKMEqKkqrraui2iywPENrLOJ2RMtem8QrxBRlPY9NPQ8wftv4mzdv2yThEy91n/62VJE4TfM1UC9YiDfuDbsEyBVxaj1q55rU9PsN9lv4KgyWdBexHsdFx5gufzOES88KQLnhJmBMRIbSox48vILHY1S9bDtbs9nOXJijjTGvoMMPn5rr/TU/c4vnKolSq/EL7upG5psDdp8hyeEft/cX9gEY5r+96rnhOQMBnanfVuFMcS/d5D9Pil092Cbk= 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: 6c66fff0-2d66-405f-fe3c-08d67c824dbe X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jan 2019 13:47:20.9988 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB2526 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-01-17_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-1901170101 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: Thu, 17 Jan 2019 13:47:26 -0000 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 >=20 > Hi Joseph, >=20 > > -----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 features s= et > > + * 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 en= able/disable these features while configuring the eth ports.=20 >>From ipsec-secgw:=20 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.=20 Port init in ipsec-secgw: https://git.dpdk.org/dpdk/tree/examples/ipsec-sec= gw/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_C= RYPTODEV_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 et= h devices. Either way should be fine. > And to limit it to the subset of features that it makes sense to disable. > i.e. why would an application disable chaining or any of the SGL flags? I= t 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 disabli= ng any > flag? [Anoob] Features like ASYMMETRIC or SECURITY is not required for every appl= ication. SECURITY is added for eth devices also. But since the feature can = be disabled while configuring the port, applications are given a choice to = disable it. That way apps like l2fwd doesn't enable SECURITY. With crypto t= his option is not available.=20 If the unused offloads can be communicated to the PMD before initialization= , 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. =20 Ex: test-crypto-perf doesn't use ASYM/SECURITY. Now adding these features w= ould affect the performance of this app.