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 B08532B9D for ; Fri, 18 Jan 2019 07:59:31 +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 x0I6xJjo012981; Thu, 17 Jan 2019 22:59:31 -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=t8wd2k5Kc845P/0rYIFzf6CXqYLI+2rSrLuGSgSsIWw=; b=zM189edg4W5wv4XFJxz1KzW5eUUUBivHE+a7bb6erPq4/9urzmdB6T2aXqaNtyh6jpUn HDqOvqO3Svu5o2ao0ok+Fg8Ou+5haHD7D1Zk4mFtmVRj2r44IH/dfZVE0GJ8+of1wgbB rph3xPAI/8NIwCCHlb64rtwmmzCrIOeiwi01qA0+RUq0N0IoP4X6KanpKyogEaRBGOwP aF87Z/iHMHBc22xKT38d05u2M2uGBQzYClV4LqZPczeFxkrN0JNhUTad1nzFq8HfxWpp uUDlOQeyfoTn/E7wc4e2U71viTwmlDVrtfgkUIziIlKPnRx2aDTb4K3T3eymb2sx23lc Vg== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 2q2vubbju3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 17 Jan 2019 22:59:30 -0800 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 17 Jan 2019 22:59:29 -0800 Received: from NAM04-BN3-obe.outbound.protection.outlook.com (104.47.46.52) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 17 Jan 2019 22:59:29 -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=t8wd2k5Kc845P/0rYIFzf6CXqYLI+2rSrLuGSgSsIWw=; b=vR0ievwSCXFEUeJfrLJwtgjskrkTJ0ozlyBsasFvBVxUExJqjhXSs8bkSXf6FtB5jq1Yb/ISwOMZ+nBQpX+Hu93jKIEXQihvGWn/fSiXeiLqtLRr2OYgXt0glag5uTr0HyUv/6SI9pEC6gqkaiqn1PJFEYFGstMKGXCq5EGQLoE= Received: from BN6PR1801MB2052.namprd18.prod.outlook.com (10.161.157.11) by BN6SPR01MB18.namprd18.prod.outlook.com (10.161.158.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1537.25; Fri, 18 Jan 2019 06:59:24 +0000 Received: from BN6PR1801MB2052.namprd18.prod.outlook.com ([fe80::b199:d845:678e:8d72]) by BN6PR1801MB2052.namprd18.prod.outlook.com ([fe80::b199:d845:678e:8d72%4]) with mapi id 15.20.1516.019; Fri, 18 Jan 2019 06:59:24 +0000 From: Shally Verma To: Anoob Joseph , "Trahe, Fiona" , Akhil Goyal , "De Lara Guarch, Pablo" CC: Jerin Jacob Kollanukkaran , "Narayana Prasad Raju Athreya" , "dev@dpdk.org" Thread-Topic: [PATCH] doc: announce ABI change for cryptodev config Thread-Index: AQHUrkiNRSYeo6tWnUGaZWm74s8S2KWzUDxQgAAdi7CAASH3YA== Date: Fri, 18 Jan 2019 06:59:23 +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-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; BN6SPR01MB18; 20:Bfzu+RD93WMUgqiZF5EJaagaVNOl2yLQdar8TtJRnXNzp49bx7Ukao0vpLxGyIi5RDH8MPQy6VhWMVN/bocyTADC2qaso4eMacghzB35cJpKrkFfkOYpt1P2bDwenMxBcB7d7AT7bR9vyIohzGpOPcfR+HLvGtkO24QgjOKGgvU= x-ms-office365-filtering-correlation-id: 1d75a8d1-4a91-4331-4ddb-08d67d127ab5 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(2017052603328)(7153060)(7193020); SRVR:BN6SPR01MB18; x-ms-traffictypediagnostic: BN6SPR01MB18: x-microsoft-antispam-prvs: x-forefront-prvs: 0921D55E4F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(346002)(376002)(136003)(39860400002)(396003)(13464003)(189003)(199004)(966005)(68736007)(55236004)(446003)(476003)(53936002)(486006)(6246003)(25786009)(81156014)(81166006)(561944003)(14444005)(11346002)(26005)(256004)(6306002)(6506007)(102836004)(53546011)(97736004)(4326008)(478600001)(229853002)(99286004)(9686003)(8936002)(186003)(71200400001)(105586002)(71190400001)(14454004)(2906002)(66066001)(106356001)(6436002)(7736002)(8676002)(316002)(54906003)(110136005)(305945005)(5660300001)(33656002)(3846002)(76176011)(74316002)(86362001)(7696005)(55016002)(6116002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6SPR01MB18; H:BN6PR1801MB2052.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: u6avEGIh4EZDdBzrbjObMOWXtlXR6LNZIkwRJCOtXcjzOfG6SKVGG1+5Qn1SfbpPX9LguIk6fxnpoNMJ6soWLmi/Y918RYotmEvKbHSXyS2ILXz5ErsrWM3cKO8XVG5LDE94PeTeR562UNaOgWbj68E2cCqWCbAZKxMtkajRsSAMDUC2pOkjlWNc0wQGbpxmYEr8igtZvOW2AOuwYYMPcwTFzrQ8FJtgF9hQ57aGC4AdPTM+lxG4cqwNAONXw/ripCfos05GIdUqPxVVkTtRyDTAowyq2uwgE6X9pqYjzGWr0yCl2mB7YzW/jFJ4NWzsuwn4fO4vDGIyOrAq9rsoXWfUA5Ug7vbOcFtddUTBsUQjTo/uGqvD5gPUi+zeQ2O31mIVc04u4Q3y4hLvoRzEvMisvhWBG6Jxx1Q5yS+E3Ko= 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: 1d75a8d1-4a91-4331-4ddb-08d67d127ab5 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jan 2019 06:59:24.0018 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6SPR01MB18 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-01-18_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-1901180053 X-Mailman-Approved-At: Sat, 19 Jan 2019 00:14:28 +0100 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: Fri, 18 Jan 2019 06:59:32 -0000 HI Fiona, Anoob >-----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 A= threya ; 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 features = 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. Th= e application can enable/disable these features 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-se= cgw/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 e= th devices. Either way should be fine. [Shally] keeping it as "ff_enable" will require application to set these = 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.=20 Though purpose can be achieved both ways but keeping it as "enable" looks m= ore easy to use, readable and inline with how ethdev handle multi feature s= upport. So I would prefer to keep it as "ff_enable" Thanks Shally > >> 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? = 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 disabl= ing any >> flag? > >[Anoob] Features like ASYMMETRIC or SECURITY is not required for every app= lication. 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 this option is not available. > >If the unused offloads can be communicated to the PMD before initializatio= n, the PMD will be allowed to optimize hardware usage. >Otherwise, supporting more features would affect performance, even if appl= ication is not making use of those features. > >Ex: test-crypto-perf doesn't use ASYM/SECURITY. Now adding these features = would affect the performance of this app.