From: Madhuker Mythri <madhuker.mythri@oracle.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "ferruh.yigit@amd.com" <ferruh.yigit@amd.com>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [External] : Re: [PATCH] net/tap: Modified TAP BPF program as per the new Kernel-version upgrade requirements.
Date: Sat, 6 Jan 2024 05:47:21 +0000 [thread overview]
Message-ID: <SJ0PR10MB4798202570133A00E3FE903797652@SJ0PR10MB4798.namprd10.prod.outlook.com> (raw)
In-Reply-To: <20240105093934.1a0b59a8@hermes.local>
I had tested with 5.4 and 5.15 kernel-versions with this new changes and works well.
I found that the helper functions were introduced in Kernel 4.7 version. So, thinking this code should work from Kernel-4.9, as mentioned in the TAP PMD link: https://doc.dpdk.org/guides/nics/tap.html.
Yes, I understand BPF program code is very sensitive and difficult to debug. However, as per testing this work well(able to load the RSS BPF instructions) on Azure/Hyper-V platforms with failsafe/tap PMD.
Thanks,
Madhuker.
-----Original Message-----
From: Stephen Hemminger <stephen@networkplumber.org>
Sent: 05 January 2024 23:10
To: Madhuker Mythri <madhuker.mythri@oracle.com>
Cc: ferruh.yigit@amd.com; dev@dpdk.org
Subject: Re: [External] : Re: [PATCH] net/tap: Modified TAP BPF program as per the new Kernel-version upgrade requirements.
On Fri, 5 Jan 2024 14:44:00 +0000
Madhuker Mythri <madhuker.mythri@oracle.com> wrote:
> Hi Stephen,
>
> The BPF helper man pages implies in that way and the SKB data pointer access was working till 5.4 kernel also, however from Kernel-5.15 version, we do see eBPF verifier throws error when we use SKB data pointer access.
> So, I had used this helper functions and able to resolve the errors. This is helper functions are safe to use and also protects from any non-linear skb data buffer access also.
>
> So, I think using helper functions is better and safe way to access the SKB data, instead of pointer access.
>
> Thanks,
> Madhuker.
Using the accessors may mean it won't work with older kernels, but that is not a huge concern given how fragile this code is.
next prev parent reply other threads:[~2024-01-06 5:47 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-04 17:27 madhuker.mythri
2024-01-04 20:32 ` Stephen Hemminger
2024-01-05 14:58 ` [External] : " Madhuker Mythri
2024-01-04 20:33 ` Stephen Hemminger
2024-01-04 20:35 ` Stephen Hemminger
2024-01-04 20:38 ` Stephen Hemminger
2024-01-05 14:58 ` [External] : " Madhuker Mythri
2024-01-05 17:40 ` Stephen Hemminger
2024-01-04 20:39 ` Stephen Hemminger
2024-01-04 20:41 ` Stephen Hemminger
2024-01-05 15:11 ` [External] : " Madhuker Mythri
2024-01-05 17:41 ` Stephen Hemminger
2024-01-04 20:42 ` Stephen Hemminger
2024-01-04 20:57 ` Stephen Hemminger
2024-01-05 14:44 ` [External] : " Madhuker Mythri
2024-01-05 17:39 ` Stephen Hemminger
2024-01-06 5:47 ` Madhuker Mythri [this message]
2024-01-05 19:30 ` Stephen Hemminger
2024-01-06 5:36 ` [External] : " Madhuker Mythri
2024-01-06 10:23 ` Madhuker Mythri
2024-01-06 16:54 ` Stephen Hemminger
2024-01-06 18:16 ` Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=SJ0PR10MB4798202570133A00E3FE903797652@SJ0PR10MB4798.namprd10.prod.outlook.com \
--to=madhuker.mythri@oracle.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).