DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: madhuker.mythri@oracle.com
Cc: ferruh.yigit@amd.com, dev@dpdk.org
Subject: Re: [PATCH] net/tap: Modified TAP BPF program as per the new Kernel-version upgrade requirements.
Date: Thu, 4 Jan 2024 12:57:05 -0800	[thread overview]
Message-ID: <20240104125705.3171fe53@hermes.local> (raw)
In-Reply-To: <20240104172756.2213-1-madhuker.mythri@oracle.com>

On Thu,  4 Jan 2024 22:57:56 +0530
madhuker.mythri@oracle.com wrote:

> ------------------------
> 
> RCA:  These errors started coming after from the Kernel-5.15 version, in which lots of new BPF verification restrictions were added for safe execution of byte-code on to the Kernel, due to which existing BPF program verification does not pass.
> Here are the major BPF verifier restrictions observed:
> 1) Need to use new BPF maps structure.
> 2) Kernel SKB data pointer access not allowed.

I noticed you are now using bpf_skb_load_bytes(), but the bpf helper man page
implies it is not needed.

     long bpf_skb_load_bytes(const void *skb, u32 offset, void *to,
       u32 len)

              Description
                     This helper was provided as an easy way to load
                     data from a packet. It can be used to load len
                     bytes from offset from the packet associated to
                     skb, into the buffer pointed by to.

                     Since Linux 4.7, usage of this helper has mostly
                     been replaced by "direct packet access", enabling
                     packet data to be manipulated with skb->data and
                     skb->data_end pointing respectively to the first
                     byte of packet data and to the byte after the last
                     byte of packet data. However, it remains useful if
                     one wishes to read large quantities of data at once
                     from a packet into the eBPF stack.

              Return 0 on success, or a negative error in case of

  parent reply	other threads:[~2024-01-04 20:57 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 [this message]
2024-01-05 14:44   ` [External] : " Madhuker Mythri
2024-01-05 17:39     ` Stephen Hemminger
2024-01-06  5:47       ` Madhuker Mythri
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=20240104125705.3171fe53@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=madhuker.mythri@oracle.com \
    /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).