From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 28175A00C4; Tue, 26 Apr 2022 10:34:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 743FF4284B; Tue, 26 Apr 2022 10:32:59 +0200 (CEST) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80104.outbound.protection.outlook.com [40.107.8.104]) by mails.dpdk.org (Postfix) with ESMTP id CCCB24003F for ; Tue, 26 Apr 2022 01:38:20 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZPrbAGN2Sohsi2ZF+zfC5ykdcuo260f/0wDo/7cJXh7BIRa1XC14w9Ls6ml5iJvbnv8Kf6KFTEkLJpBuNREw+V5qsh+NJVPSp9UkOExHxzhamN1r/NsJexqIPrBGG4Oj7XdVkrcNaP2K0f6h305A7RakWjsQlwJ/pJawU8asuKRd+MyDCFgwq+n5BQKznX52hl8nD1SYq1w8QH+1s1/lMLnMw32pYoqRi/QR/qvn+5Pomp0V3JvK6uFIDrX5zK1fbIh4ur1fxkHQt0G6+crdgrkZt3kiGQetJUj5GXbB+Nwx//f4uPa4kkCkHJ6nkOH0ZxCXW9PNahfShnp2zzDctQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=z+RNzpOmMUoo4uvUfOeUdJgB2aRvZeq7K0P7NFL2jU0=; b=Lto2Y13DbNeKeOrOUgXrLW6oZVfc4GH7Sw/VihHvBVZb9194uxB5q0y2rU2yuvbfFsSZzm4+qmuHk7/7jgaTp6kdOplFLgEn8ebBBRCTdJHu9J+RW2/CCsywVUCLtK6Yh2/3AZZy820dffYMvYEIWCkXT7l6zkU7V0a5Rzxpcd1kpAJqO3dSFzKFSLqPvsTWxdJw267kQrpkf6axdWrHbUETeGP9G1HNIr1z/6cLNn1iJLRgncldpseroZ6q6+CYfMhkUbNF+hYywSvNqcQgZwFYwSipAfzGzdyVBQr8996Av+D1Ze0Bj0PqLmKmrU7t7dehN755K/Lfl75hjjPhPg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=est.tech; dmarc=pass action=none header.from=est.tech; dkim=pass header.d=est.tech; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=estab.onmicrosoft.com; s=selector2-estab-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z+RNzpOmMUoo4uvUfOeUdJgB2aRvZeq7K0P7NFL2jU0=; b=S7WeFNgtT+qHwzep+uLuUQwq8o93v7rRd8GJpMCD38bcZc4VponofhWfdyRi94Hn1qeJWfyQbpzO3forYTx+oszkok/txf8ln+2NnR5C71n8Ru28KRH9YG38sjzKoSDxWReREZW2/hw1E09qfp0PXPwVNDyL+YeXwd9xtwvCOco= Received: from DB9P189MB1833.EURP189.PROD.OUTLOOK.COM (2603:10a6:10:331::10) by PRAP189MB1900.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:293::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.18; Mon, 25 Apr 2022 23:38:18 +0000 Received: from DB9P189MB1833.EURP189.PROD.OUTLOOK.COM ([fe80::92:6236:9c3a:ae49]) by DB9P189MB1833.EURP189.PROD.OUTLOOK.COM ([fe80::92:6236:9c3a:ae49%6]) with mapi id 15.20.5164.025; Mon, 25 Apr 2022 23:38:18 +0000 From: =?iso-8859-1?Q?Bj=F6rn_Svensson_A?= To: "dev@dpdk.org" Subject: librte_bpf: roadmap or any specific plans for this library Thread-Topic: librte_bpf: roadmap or any specific plans for this library Thread-Index: AQHYWPyEcT8w0wvHWEmDHHosH/+8TA== Date: Mon, 25 Apr 2022 23:38:18 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=est.tech; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8bce8513-64a7-4205-6a77-08da2714ad4d x-ms-traffictypediagnostic: PRAP189MB1900:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: r4YuP5vQ4BhXr2ilHM/H1WuEnOf0nHpcLpUXRenkFylzDd+gCpVUael0xcOYvXJzoFPqfCbZRojlESMQwMtXyDV1O74Qb3FtlFWddz5E/4t7e10rHIYEUF9Nt/DBK9ZzQHyqAdhdgjTv3pQ5S1o0VGnlnLAydOOE5p33UwFdx4qxHVzutMB+ZZUUHFNmyiEpkZbcP/n3zjgCawksJ/J5Jas7TlGbu2esrWILE22fKHJreoTnIM6yypbwa3Rkx2Rc0oD2JPPZU+xYhOijKqGZQP1N/BW8ywEOVWpQURFLRosAgd237R21nSxBflL/QjAPABGGuTPszYFRUBF0m0Hpqe31d7v0kwGQjUHFFLkbEWmP6LH1KU2f63j/IDiGE05FBnix29otLCJCq1YpZeZAkfj60T2Q9cPtyQSacyTxCgUuRR4vI18kg/mKCp//OX3/rWMEIsJVMXhlLLwd6u214YNCwBzGE5DxM2YBElnPr2aNvmiyCOwwSDJ1zvkI9XSljU/zd8X9t93ZqoFtRekQqOjFhuRxaRHPSF0uPnGAhbhcmvnLF2/RX2m7TEGAohd6ji/69okVv/x2SEMrTtp68Re71HhEhgj5jGG7iiHxdErDzNjRukkAIJM+h9v1oPALCB4tl2g/9gNjkvqkdLQxrzsFO043S7UsAC79yjdXMbBjA3B6z/Bg3rjEIbTsz0iuoYgQBQvqFHw3R+A58jHuwQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB9P189MB1833.EURP189.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230001)(376002)(396003)(136003)(39840400004)(346002)(366004)(26005)(7696005)(91956017)(86362001)(76116006)(83380400001)(8676002)(66946007)(66446008)(6506007)(66476007)(64756008)(55016003)(71200400001)(316002)(9686003)(6916009)(38100700002)(38070700005)(66556008)(122000001)(2906002)(52536014)(8936002)(5660300002)(33656002)(186003)(19627405001)(508600001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?kc55Kvum+HRKebfHWx6F5om5VIDdpZyyokzXpMJhAMXmO20pI75ynDXf/H?= =?iso-8859-1?Q?ZHpkkMnOPKS+fAMYaJtmOd5VogIqwlKh6a3HWqxdIh46HhuSBIAJXvVqpI?= =?iso-8859-1?Q?vjFgWzUUVTWsythJRUdjy5QoG3TpCBouW/UDFIz+fUyY3R0JJQYWQO1HtQ?= =?iso-8859-1?Q?+UQ3KVkaLbzxk+pBcmlhIjLcs0MLaFcxdrvM+9303gXPzQSLk5oWPsNRls?= =?iso-8859-1?Q?vR3uwRtmx7+WdZOZJgRRVIPZZIqoqyLqa+w+3EddMAhpxmDUfRtYljk7rR?= =?iso-8859-1?Q?WICYYV4z0S98RaA/5ioMgbZ2IcoGak4Qt7EsLvvjZZUoj99J1kMUD6cD+s?= =?iso-8859-1?Q?i2U2zfhkDmxJ+QRh2bBVazdaLzADXaL/RhNB5Rtjra/St/AyHGEEtUdKBP?= =?iso-8859-1?Q?Ep3C6QG8rRUbBYkLtGTKXh4YPYtYFYaA6FLxzIP54l2C2e4kC+DlejXK3y?= =?iso-8859-1?Q?/rR4W5Nzs2ejgTztOwcGvtva7RXYIVXw8X59E6P6MYOqY9VjivuKrgiU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pHdDVGS1aB+ZFVrNCloiV?= =?iso-8859-1?Q?RNVFhoh6tMyq8LHulg9OVg8KFtOVNeUIAas7FCM3HANE8z4OO2AmqxQKQ1?= =?iso-8859-1?Q?PF4I+Wu01d3EfMrNaU+qqAlilf1CvhdUlulYmSkM1gbja7GuSI/0oXLIKp?= =?iso-8859-1?Q?58iwwXbaJW9c/7PG676R93qpYuQaR4nyfD681XAFkMJQIs2dpn0GbQfMGu?= =?iso-8859-1?Q?jYkdJHEqMtWA0qp55iBSXB8RRT+WUxEjhKbPGCQtW22AEmmRwueNBxfZH0?= =?iso-8859-1?Q?NJY9huwLMqDTY5hGCHfXeK/0irJ3FgGlRnTsvgU94sxuVahMjcENjwZ0yc?= =?iso-8859-1?Q?OTs24mUeikLfD2jMDYSCYPoKrbiisltxultayRChQQDWJlpBmD+drVEdo0?= =?iso-8859-1?Q?fsyy+yi+Ww=3D=3D?= Content-Type: multipart/alternative; boundary="_000_DB9P189MB1833A7A2AF6CBF68D14F4070B9F89DB9P189MB1833EURP_" MIME-Version: 1.0 X-OriginatorOrg: est.tech X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DB9P189MB1833.EURP189.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 8bce8513-64a7-4205-6a77-08da2714ad4d X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Apr 2022 23:38:18.5769 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: d2585e63-66b9-44b6-a76e-4f4b217d97fd X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: XYLnosDjj+F3CV8r+I6+jdJu/Eud+MeH32jaOeNfz5QILUzGfOtiK9vrkCzTfpuA43yqsdYCZlNDbRuGYe4macd5wwSQ7AMWDL+1hZMVCK8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PRAP189MB1900 X-Mailman-Approved-At: Tue, 26 Apr 2022 10:32:34 +0200 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org --_000_DB9P189MB1833A7A2AF6CBF68D14F4070B9F89DB9P189MB1833EURP_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi all, I hope this is the correct maillist for this topic. DPDK provides the nice library `librte_bpf` to load and execute eBPF byteco= de and we would like to broaden our usage of this library. Today there are hints that this library might have been purpose built to en= able inspection or modification of packets; for example the eBPF program is expected to only use a single input argumen= t, pointing to data of some sort. We believe it would be beneficial to be able to use this library to run gen= eric eBPF programs as well, as an alternative to run them as RX- TX-port/queue callbacks (i.e. generic = programs which only uses supported features) I have seen some discussions regarding moving towards using a common librar= y with the kernel implementation of bpf, but I couldn't figure out the outcome. My question is if there any plans to evolve this library or would improveme= nts possibly be accepted? Here are some improvements we are interested to look into: * Add additional API for loading eBPF code. Today it's possible to load eBPF code from an ELF file, but having an API= to load code from an ELF image from memory would open up for other ways to manage eBPF code. Example of the new API: struct rte_bpf * rte_bpf_elf_image_load(const struct rte_bpf_prm *prm, char *image, size_t size, const char *sname); * Add support of more than a single input argument. There are cases when additional information is needed. Being able to use = more than a single input argument would help when running generic eBPF programs. Example of change: struct rte_bpf_prm { ... - struct rte_bpf_arg prog_arg; /**< eBPF program input arg descripti= on */ + uint32_t nb_args; + struct rte_bpf_arg prog_args[EBPF_FUNC_MAX_ARGS]; /**< eBPF progra= m input args */ }; Any feedback regarding this is welcomed. Best regard Bjorn --_000_DB9P189MB1833A7A2AF6CBF68D14F4070B9F89DB9P189MB1833EURP_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi all,
I hope this is the correct maillist for this topic.

DPDK provides the nice library `librte_bpf` to load and execute eBPF b= ytecode
and we would like to broaden our usage of this library.

Today there are hints that this library might have been purpose built = to enable inspection or modification of packets;
for example the eBPF program is expected to only use a single input ar= gument, pointing to data of some sort.
We believe it would be beneficial to be able to use this library to ru= n generic eBPF programs as well,
as an alternative to run them as RX- TX-port/queue callbacks (i.e. gen= eric programs which only uses supported features)

I have seen some discussions regarding moving towards using a common l= ibrary with the kernel implementation of bpf,
but I couldn't figure out the outcome.
My question is if there any plans to evolve this library or would impr= ovements possibly be accepted?

Here are some improvements we are interested to look into:

* Add additional API for loading eBPF code.
  Today it's possible to load eBPF code from an ELF file, but hav= ing an API to load code from an ELF image from memory
  would open up for other ways to manage eBPF code.

  Example of the new API:
    struct rte_bpf *
    rte_bpf_elf_image_load(const struct rte_bpf_prm *prm, ch= ar *image,
                    =        size_t size, const char *sname);

* Add support of more than a single input argument.
  There are cases when additional information is needed. Being ab= le to use more than a single input argument
  would help when running generic eBPF programs.

  Example of change:
       struct rte_bpf_prm {
       ...
    -    struct rte_bpf_arg prog_arg; /**< eBPF= program input arg description */
    +    uint32_t nb_args;
    +    struct rte_bpf_arg prog_args[EBPF_FUNC_MA= X_ARGS]; /**< eBPF program input args */
       };

Any feedback regarding this is welcomed.
Best regard
Bjorn

--_000_DB9P189MB1833A7A2AF6CBF68D14F4070B9F89DB9P189MB1833EURP_--