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 DE6B3A046B; Tue, 7 Jan 2020 15:38:27 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 222091D9A4; Tue, 7 Jan 2020 15:38:27 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 2EDC31D99A for ; Tue, 7 Jan 2020 15:38:25 +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 fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Jan 2020 06:38:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,406,1571727600"; d="scan'208";a="211163773" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga007.jf.intel.com with ESMTP; 07 Jan 2020 06:38:23 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 7 Jan 2020 06:38:23 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 7 Jan 2020 06:38:22 -0800 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 7 Jan 2020 06:38:22 -0800 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.36.58) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 7 Jan 2020 06:38:21 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bquvRfWEchkw9csFg9PFyNsUhu59bUdCFNWGxhKUpXRtpekXTRzRPhgcMSMnrqM0C6yoLnTKrIgL8bYxK/0jH0f4suMdQE2VMzjLNBuGRD1ab/F2Md1Y1TuyAAujDhS9IH16XguGFYgOs4fyxUlossL0mpyatDrquMVysz/VhH6SiXw3smxUl9wY7VxRxxGOcF21AWBBh67S0aZ5udYLt8OLvRW/jwLY+3arkOMb24xXVXTpLWBdmTSgeR/kkyD7cJz0BJTa9Z+d4/K6KNT34/qMUX5jgSpF9sAEHU0GeRxdznsj5P0E1IjXZGD297OXw4r1qwzCsrza2kbEsdX6lA== 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=9uPT4QIdYcEJWn/aE89kbNFmygP1sAXd72uuhAxJF4k=; b=YO5xYMeR+6DoBsvRRx5ckz/iAmSltLuS3t+rkq0h7+Bz0dQo/A6xi+rJyStR4OzGvd4bO6SCfbmsdFvAyaw3AcfUauR03RztiWy0YxSSx0ZqHYRml57Z1K3Vns7OS+jJZb4V/C2IwMs4EFqChd/+pfoyV3AgFPAVdXgwx7Je/kFUPQkiWkx5MSAoUZTuvBV4K2DaXwCY3OFXGxcGeC3mpSdpjV7fXoev2hK0ao2O9xAZrfx3JKsfF/o52KN2zRiYhu1G+OP7c2xvEU3nnE1ZrqUCfIc7WbQosTH4WjKmuYunvmhscVnZrtTx1eElu6m3fVAdLfWWY8LQYBWxSWJRHQ== 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=9uPT4QIdYcEJWn/aE89kbNFmygP1sAXd72uuhAxJF4k=; b=uRIYkcvpHIgGRSu+9Lg8CG8hn/l8x9NpeqceTuuGX7dTJAgH+K1DBxfAXD6NpDAdkH78AoLIRPGSJuNOFf/AoWVQNxJeSU+ojxjBWyB8bvkI4BFaFgtYCMICvT8MIYelqKJCvypu3AM8SXpKQWOegKqI1w8k3bvcruAoHSNxSP8= Received: from SN6PR11MB2558.namprd11.prod.outlook.com (52.135.94.19) by SN6PR11MB3454.namprd11.prod.outlook.com (52.135.110.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2602.10; Tue, 7 Jan 2020 14:38:16 +0000 Received: from SN6PR11MB2558.namprd11.prod.outlook.com ([fe80::4d86:362a:13c3:8386]) by SN6PR11MB2558.namprd11.prod.outlook.com ([fe80::4d86:362a:13c3:8386%7]) with mapi id 15.20.2623.008; Tue, 7 Jan 2020 14:38:16 +0000 From: "Ananyev, Konstantin" To: Anoob Joseph , Akhil Goyal , "Nicolau, Radu" , Thomas Monjalon CC: Lukas Bartosik , Jerin Jacob Kollanukkaran , Narayana Prasad Raju Athreya , Ankur Dwivedi , Archana Muniganti , Tejasree Kondoj , "Vamsi Krishna Attunuru" , "dev@dpdk.org" Thread-Topic: [PATCH 09/14] examples/ipsec-secgw: add eventmode to ipsec-secgw Thread-Index: AQHVrcOQjf1Dol+ZoUa/RbcKkKjo2KfJUKOQgA+SlACABR0/UIAA80oAgAB/dsA= Date: Tue, 7 Jan 2020 14:38:16 +0000 Message-ID: References: <1575808249-31135-1-git-send-email-anoobj@marvell.com> <1575808249-31135-10-git-send-email-anoobj@marvell.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjZjYmI2ZmItOTViOC00ZGQxLWI2MTQtYTJjMjQxMzNhYjU5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiQWJkc3k4RDdLSm1DSDZcL1h6Rk5LVzdZU3FjNFpyT0lnMUpIZGowUTA1RTROcXVVbTIxd2JcLzF3Vjl1MEwxemtaIn0= dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 x-ctpclassification: CTP_NT authentication-results: spf=none (sender IP is ) smtp.mailfrom=konstantin.ananyev@intel.com; x-originating-ip: [192.198.151.179] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1eec4098-cf25-493a-c5f6-08d7937f3bc4 x-ms-traffictypediagnostic: SN6PR11MB3454: 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: 027578BB13 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(376002)(366004)(136003)(39860400002)(346002)(396003)(189003)(199004)(54906003)(7416002)(2906002)(66946007)(76116006)(66446008)(64756008)(66556008)(66476007)(316002)(71200400001)(110136005)(55016002)(9686003)(86362001)(186003)(33656002)(81166006)(8936002)(8676002)(7696005)(81156014)(6506007)(52536014)(4326008)(478600001)(26005)(5660300002); DIR:OUT; SFP:1102; SCL:1; SRVR:SN6PR11MB3454; H:SN6PR11MB2558.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: uWGoSqcMEYnnzSJ9brcbCIwKmV4N2uiafe+2WAxjO/+t0Zon8bEZAIeXdnCjJZFRRyKbyYlsJAVSfKl/oFZSDUFJTjm5bs/i/51b45j8o7j1JOG7ommKTma3FBvxh329NfLp4uoIDbvOuhQazSZRBRkYkCo9nnf2EfzKhPAmILrwH1dL7KDTFeJSBMGqdjLXE72nrdw/zADfycd4lgJY9vPBUJYxOJLFfmB23CbndW1O1cuqXtG73cnARBIsaMf5AdAP3oh9LqlQ88wumilu4WNoYlTVOA+/dtY/GIgQtIwVQ8Cd/sXE6a5wNCRFZJ32nLoifCPK6GMKoCRHaj4Q9NCfsGlbOk2XttXz8hQaAdeZh9Ungj24rZ3XB2XqqFPUFjndrDIJxjY8maTjGGPG7H6Q1AglYmlSlONY1zv9oavk3RGnypl6ntLorsUZkTWe Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 1eec4098-cf25-493a-c5f6-08d7937f3bc4 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jan 2020 14:38:16.7726 (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: oXV2Rnk4HNr8X5BuJiZ5xyEmgtxHCTvEzpYLWAdsMkiH6umDsJxOBQBimogtYaqN4BHK7JKgR9OycUkVCffEKwlQyP9HiiqOHXNHDMJ7ZJ4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3454 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 09/14] examples/ipsec-secgw: add eventmode to ipsec-secgw 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" > > > > > Add eventmode support to ipsec-secgw. This uses event helper to > > > > > setup and use the eventmode capabilities. Add driver inbound work= er. > > > > > > > > > > Example command: > > > > > ./ipsec-secgw -c 0x1 -w 0002:02:00.0,ipsec_in_max_spi=3D100 -w > > > > > 0002:07:00.0 -w 0002:0e:00.0 -w 0002:10:00.1 -- -P -p 0x3 -u 0x1 > > > > > --config "(0,0,0),(1,0,0)" -f a-aes-gcm-msa.cfg --transfer-mode 1 > > > > > --schedule-type 2 --process-mode drv --process-dir in > > > > > > > > As I can see new event mode is totally orthogonal to the existing = poll mode. > > > > Event mode has it is own data-path, and it doesn't reuse any part o= f > > > > poll- mode data-path code. > > > > Plus in event mode many poll-mode options: > > > > libirary/legacy mode, fragment/reassemble, replay-window, ESN, > > > > fall-back session, etc. > > > > are simply ignored. > > > > > > [Anoob] The features are not supported with the initial version. But > > > the features are equally applicable to eventmode and is planned for t= he future. > > Also, fragment/reassemble, replay-window, ESN, fall-back session etc ar= e not > > applicable for non-library mode. > > > > True, but in poll-mode library-mode support all functionality that lega= cy-mode > > does, plus some extra. > > Also I still hope that after perf-problems evaluation with NXP we will = be able to > > safely remove legacy poll-mode. > > > > >We can follow the > > > same logic and allow for an extra arg (which is --transfer-mode). > > > > > > > Also as I can read the current code - right now these modes can't b= e > > > > mixed and used together. > > > > User has to use either only event based or poll mode API/devices. > > > > > > [Anoob] Same like how we cannot mix library and non-library modes. > > > > > > > > > > > If so, then at least we need a check (and report with error exit) > > > > for these mutually exclusive option variants. > > > > > > [Anoob] Will do that. > > > > Ok. > > > > > > Probably even better would be to generate two separate binaries Let= say: > > > > ipsec-secgw-event and ipsec-secgw-poll. > > > > We can still keep the same parent directory, makefile, common src f= iles etc. > > > > for both. > > > > > > [Anoob] I would be inclined to not fork the current application. Do > > > you see any issues if the same binary could run in both modes. The de= fault > > behavior would be poll mode (with existing behavior). > > > > My main concern here that there will be over-helming number of options = (some > > of which are mutually exclusive) in the same app. > > So it will be really hard to maintain and use such app. > > My thought was that it might be cleaner to have two different apps each= with its > > own set of options. > > >=20 > [Anoob] Technically event mode would need only one extra argument. The on= e to specify "scheduling type". The direction can be > removed (discussed in another thread) and app-mode can be merged with exi= sting single_sa mode. >=20 > And we do want the event-mode to be supporting all features supported by = poll mode. Just that we will have to take it up gradually > (because of the volume of code change). >=20 > Thomas had opposed the idea of forking example applications for event mod= e. I also agree with him there. Event-mode just > establishes an alternate way to receive and send packets. Entire IPsec pr= ocessing can be maintained common. I didn't talk about forking. I talked about something like that - keep all code in examples/ipsec-secgw Probably move event/poll specific code into examples/ipsec-secgw/poll, examples/ipsec-secgw/event. Make changes in Makefile, meson.build to generate 2 binaries. But ok, one extra event-mode specific option doesn't seem that much. Let's try to keep unified binary and see how it goes. Konstantin=20