From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM04-CO1-obe.outbound.protection.outlook.com (mail-eopbgr690069.outbound.protection.outlook.com [40.107.69.69]) by dpdk.org (Postfix) with ESMTP id C68C81B3A3 for ; Sun, 17 Jun 2018 15:58:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WbFfyJ3OImX5Pm10jElGldbYCaiNS+yv7ASza+24EoU=; b=CvSNUV6J0rGW0nrHZbUZLwhWSx/Kf7ugyu5xFFWXHidjJx5g+BxbKmD304KJRXSo2PyTCcTDQJu2sRFkRcHZ8tSQIK01C/UkE4Ow6W7nfcrNK24Zt2zdsSJtxCjdpVCIldoCAus0p30dZ/ecPGS6P5lTX4/0D2f8g18zsQjFBak= Received: from jerin (171.61.94.72) by SN2PR07MB2525.namprd07.prod.outlook.com (2603:10b6:804:6::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.863.16; Sun, 17 Jun 2018 13:58:12 +0000 Date: Sun, 17 Jun 2018 19:28:00 +0530 From: Jerin Jacob To: Nikhil Rao Cc: dev@dpdk.org Message-ID: <20180617135758.GA22497@jerin> References: <1528482256-75854-1-git-send-email-nikhil.rao@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1528482256-75854-1-git-send-email-nikhil.rao@intel.com> User-Agent: Mutt/1.10.0 (2018-05-17) X-Originating-IP: [171.61.94.72] X-ClientProxiedBy: MA1PR01CA0093.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00::33) To SN2PR07MB2525.namprd07.prod.outlook.com (2603:10b6:804:6::25) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 513a6be0-d9e7-4d4e-4503-08d5d45a5e2a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(711020)(2017052603328)(7153060)(7193020); SRVR:SN2PR07MB2525; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2525; 3:KMOCrU2bSqlavOxYJxCO/TQ2mv1I9Hx1U4MRiVmyO+TZhZmo7hsxhmkcRlzcykgvCwWPvZBpUwnArp2FK6t+SeFiEKVg6a5SenNVQ1mGrWL7327+X7t1WvMrmOe42Hn3huo7Hte0Gv54xKliXjd2fSb5pOM2BokOWGsNRj0hdBpyafU7CzyPOqj5o5nIai95/759d5UkUo6ujqqcDr07V5a9hUFg8wCIuXKrPzmcBQ1uUj2eCm8s9ZrETb9iL2gG; 25:Ce+ZD/KQCdXofBjhFGXgO/X7U5inkIZw+ihifepb2gmSMtnK6KQikGZRNGg/LUg9/Rzta0YMXROIN6F/DvkxX8Lai8l59XK8/3Oz0sc5pNA7GBAbC4Z+ljuo8h/NSHgRvLCIQj/yfK66I5v0T3ha6xoclSKMLXrfD60oio6YjWHXuGdcRagk6KAkWw3Pun1Fso7RSzrIfIgIC4Z6qYTsiJ3VPW4YZCC4EgXMuWtZe/psdcYeGS23kxd6IFRl9oBivf+5QEupZfir3vBrXckDqhdCP2GKOMdtOi3CLeK/x2R2cpGs4b5CcZDdsBD5nrzATE45Up22wqqdLydw06wKoQ==; 31:ypNvD5NgLg4IKSNKgtRw500FUaJkaCo7KMfZy3Pl3qiAhXnHsGnmAMMCuQVUfW/kZo1a9s/01s5KUm9fhOM/nSYzrddQey5GGhOLNvUXcIaQM4tT2fhgEsCIrqP9e0lkS7z4mq21zmOA36PvPjj4Z1N8o/IqzHhktFpYxMX6753s4qZVw0KU+r/5n6jfPcJqnH5moD5gXJwehWs9GW4VQuh26/RdzbK/XG8nWzSxfB8= X-MS-TrafficTypeDiagnostic: SN2PR07MB2525: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2525; 20:gwmt5fkjKBDv1jBvK6v56D1w4n1ZbPedWR1T+gBTV8b9waK9l9+mGXUx+R+NWQaeT187EjZF70O++UMeNZXqDKYS79uLwLcmHz6nuUvAattcp4AaZgOtupf3pXV8vFlrnAQ2ENw3slaz0LCOiSbpPDwmIyBJub+EO5JwrCd5wIsbqkt3fxxy+7lpUIe+hRcQa+hIKGHovuIpneI7UEkfUhrgPzlnbz5foYa93uXMq70g+A4dwJ48bCLBufPYydQjEKKHsCcFXfMcLFc+sVS2uv/QJz7N2Hn3YZcK2sCH6TuLZCgpkWqk9vwVR/svUlJgvWcHn5a6uACKKNehQ3xFEqXX2L5uhHDddqxo5SlNh8QcKMVjuGurN3QD1YieVDmsDHxIG5zDgPtRGaQ46i+13jlv1b1ZJNLnUR2kGPRKtvXud9Vp+cuLFYOfT+TjFs2NiULDUK+xUXUAjRGtruiNdOtWePon2pKaisySc5e/C1MxEDWCzJgGojIGPBzw0QPuAIK2HDDwC+utrGJN+hZ9Ijz+CsSMoLj4kxPUzKl7qDYE/JIA6eHzL+8AnrUM6jrFB9yNaolnYBepZP/4EFLF+VdHeG01bk/tSkLWpBYSxbQ=; 4:8/EX6NjFcT0lv4+ptr8YO0MBu2++IpnCwJTlT/jQs3i8bmgj75KVsr2c9SV2xEq5X9sja4OURLByL1mWSkoihEPhpvivjt3phMtN/Ovgo3qZKF92WEC2t3oZgz0XouCUfzQmmfR6/QY3bOOWazfl/qZNakuo492V50IRggTTNrbVCqtavioITyxPj6IxQEMgcj4PWjbZSHCmwHAhxF9rRdbsht78Qkm59OOEcEnLyQmkiWFY+hWDIZ1qifF2dOe+clFb8I4ftmGAu93u865xwXRQydnju8rBLGBy7x1ZZPN6ws//AbVAfm0bN9U0mbIk X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3231254)(944501410)(52105095)(93006095)(3002001)(149027)(150027)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:SN2PR07MB2525; BCL:0; PCL:0; RULEID:; SRVR:SN2PR07MB2525; X-Forefront-PRVS: 07063A0A30 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(376002)(346002)(366004)(396003)(39850400004)(189003)(199004)(13464003)(106356001)(1076002)(23726003)(53936002)(72206003)(6116002)(478600001)(3846002)(486006)(476003)(446003)(44832011)(33716001)(11346002)(229853002)(186003)(9686003)(55016002)(26005)(16526019)(956004)(105586002)(68736007)(33896004)(42882007)(81156014)(59450400001)(81166006)(8676002)(6916009)(386003)(6666003)(76176011)(6496006)(305945005)(97736004)(4326008)(33656002)(316002)(25786009)(8936002)(66066001)(58126008)(16586007)(47776003)(50466002)(6246003)(52116002)(7736002)(5660300001)(2906002)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR07MB2525; H:jerin; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR07MB2525; 23:koUsOpckjQ3rapUYLl7YCp5sn/agAFTW88VqXpp8O?= =?us-ascii?Q?/kqklju5qSLrCLqOkZNfFfDk4wDI0rBfPGjAhRs107benun+l6BcFXrZtVS5?= =?us-ascii?Q?lmZuO7HfkUY5ynJJSX8f29aEJhbkCRnzYwk2NFuDXDZCBZIHKlNrFmm710eo?= =?us-ascii?Q?9D0qq182KtG5vcpEsk/gMz52hihGSi3/0GA5Ph0E5K0gOW+y59clWfD0cb6z?= =?us-ascii?Q?Q7tbyPUUtLaY8vQmkR9PMNz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NsKRvvK5FvrtKTOyh46sMm85Et9DOCSN8MrHpmjSrpM4rFeWlttMOBsT5VCe2DK3ac14Aa4oP7GOTgnrOCKPW7D2o+NAbagBwA4Hbed+drauryPA9IP12QpzGCs9eC7zw=; 24:9FDLOjTZyCBmL7rVcZvMPbpWBkYsaOcaDtLvUpH2SoiaAn68mo6gLFfeR729ixa6UUqhnKDQLhowSB9f+1hnsrxsqXrT1AX3LDSGL4dhyCw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2525; 7:SFdU/m/19VPokez8E4NRbiqmF8azyUHOPa+776mgqwB+JFDBIhhPGtVrLJMBE9xe17Mmwew99i5e91XCNQBBSp3I5vIqp6ukgKax+Mzd4Toa7iSCD016Wiw4j22KxuacnDcIL62OAJHuDkdGcocAx4J1hk6wOHmJHj+hlp4VrAqnGM7idmfIvssvAv9+hjx9FoVclpvdiUkFMmiUQej7q5vgA+UclNbGO2FNN4pnJsECI1j4ZbUK8Cbys9ltr7CO X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2018 13:58:12.2110 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 513a6be0-d9e7-4d4e-4503-08d5d45a5e2a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR07MB2525 Subject: Re: [dpdk-dev] [PATCH] eventdev: add callback for Rx adapter SW transfers 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: Sun, 17 Jun 2018 13:58:16 -0000 -----Original Message----- > Date: Fri, 8 Jun 2018 23:54:16 +0530 > From: Nikhil Rao > To: jerin.jacob@caviumnetworks.com > CC: dev@dpdk.org, Nikhil Rao > Subject: [PATCH] eventdev: add callback for Rx adapter SW transfers > X-Mailer: git-send-email 1.8.3.1 > > Add ability for application to register a callback function > for SW transfers, the callback can decide which packets can > be enqueued to the event device. > > Signed-off-by: Nikhil Rao > --- > lib/librte_eventdev/rte_event_eth_rx_adapter.h | 78 ++++++++++++++++++++++ > lib/librte_eventdev/rte_event_eth_rx_adapter.c | 69 +++++++++++++++++-- > .../prog_guide/event_ethernet_rx_adapter.rst | 14 ++++ > lib/librte_eventdev/rte_eventdev_version.map | 1 + > 4 files changed, 158 insertions(+), 4 deletions(-) > > diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.h b/lib/librte_eventdev/rte_event_eth_rx_adapter.h > index 97f25e9..23d2ed5 100644 > --- a/lib/librte_eventdev/rte_event_eth_rx_adapter.h > +++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.h > @@ -63,6 +63,17 @@ > * rte_event_eth_rx_adapter_service_id_get() function can be used to retrieve > * the service function ID of the adapter in this case. > * > + * For SW based packet transfers, the service function temporarily enqueues I think, you can mention this case is valid when !RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT > + * mbufs to an event buffer before batch enqueueing these to the event device. > + * If the buffer fills up, the service function stops dequeueing packets from > + * the ethernet device. The application may want to monitor the buffer fill > + * level and instruct the service function to selectively buffer packets > + * The application may also use some other criteria to decide which packets > + * should enter the event device even when the event buffer fill level is low. > + * The rte_event_eth_rx_adapter_cb_register() function allows the > + * application to register a callback that selects which packets to enqueue > + * to the event device. > + * > * Note: > * 1) Devices created after an instance of rte_event_eth_rx_adapter_create > * should be added to a new instance of the rx adapter. > @@ -206,6 +217,47 @@ struct rte_event_eth_rx_adapter_stats { > * @warning > * @b EXPERIMENTAL: this API may change without prior notice > +/** > + * @warning > + * @b EXPERIMENTAL: this API may change without prior notice > + * > + * Register callback to process Rx packets, this is supported for > + * SW based packet transfers. > + * @see rte_event_eth_sw_rx_cb_fn > + * > + * @param id > + * Adapter identifier. > + * @param eth_dev_id > + * Port identifier of Ethernet device. > + * @param cb_fn > + * Callback function. > + * @param cb_arg > + * Callback arg. > + * @return > + * - 0: Success > + * - <0: Error code on failure. > + */ > +int __rte_experimental > +rte_event_eth_rx_sw_cb_register(uint8_t id, > + uint16_t eth_dev_id, > + rte_event_eth_rx_sw_cb_fn cb_fn, > + void *cb_arg); The documentation is using rte_event_eth_rx_adapter_cb_register(), I think, it is better to keep that name. Remove *_sw_* from normative DPDK APIs. > + > #ifdef __cplusplus > } > #endif > diff --git a/lib/librte_eventdev/rte_eventdev_version.map b/lib/librte_eventdev/rte_eventdev_version.map > index c3f18d6..6bc81c6 100644 > --- a/lib/librte_eventdev/rte_eventdev_version.map > +++ b/lib/librte_eventdev/rte_eventdev_version.map > @@ -109,4 +109,5 @@ EXPERIMENTAL { > rte_event_crypto_adapter_stats_get; > rte_event_crypto_adapter_stats_reset; > rte_event_crypto_adapter_stop; > + rte_event_eth_rx_sw_cb_register; Use alphabetical order. With above changes: Acked-by: Jerin Jacob > }; > -- > 1.8.3.1 >