From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: "Linus Lüssing" <linus.luessing@c0d3.blue>
Subject: Re: [PATCH v3 3/3] batman-adv: bcast: remove remaining skb-copy calls for broadcasts
Date: Tue, 17 Aug 2021 14:24:36 +0200 [thread overview]
Message-ID: <8357888.XYH0bx1MCn@ripper> (raw)
In-Reply-To: <20210516223309.12596-3-linus.luessing@c0d3.blue>
[-- Attachment #1: Type: text/plain, Size: 1217 bytes --]
On Monday, 17 May 2021 00:33:09 CEST Linus Lüssing wrote:
> + /* __batadv_forw_bcast_packet clones, make sure original
> + * skb stays writeable
> + */
> + return (skb_cow(skb, 0) < 0) ? NETDEV_TX_BUSY : NETDEV_TX_OK;
Just because we had this discussion a couple of hours ago: My last comment
from May was that the skb_cow might be unnecessary - not that you need a
skb_copy.
You wrote (for situation B):
> a packet is
> additionally decapsulated and is sent up the stack through
> batadv_recv_bcast_packet()->batadv_interface_rx(). Which needs an
> unshared skb data for potential modifications from other protocols.
And my reply to this was:
> Take for example the bridge code. You can find the skb_share_check in
> br_handle_frame. Afterwards, it knows that it has a clone of the skb (but not
> necessarily a private copy of the actual data). If it needs to modify the data
> then it is copying the skb.
>
> Another example is the IPv4 code. One of the first things it does is to check
> in ip_rcv_core for the shared skb. And if it needs to modify it (for example
> by forwarding it in ip_forward), it uses skb_cow directly.
Kind regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2021-08-17 12:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-16 22:33 [PATCH v3 1/3] batman-adv: bcast: queue per interface, if needed Linus Lüssing
2021-05-16 22:33 ` [PATCH v3 2/3] batman-adv: bcast: avoid skb-copy for (re)queued broadcasts Linus Lüssing
2021-05-16 22:33 ` [PATCH v3 3/3] batman-adv: bcast: remove remaining skb-copy calls for broadcasts Linus Lüssing
2021-05-30 11:52 ` Sven Eckelmann
2021-08-17 12:24 ` Sven Eckelmann [this message]
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=8357888.XYH0bx1MCn@ripper \
--to=sven@narfation.org \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=linus.luessing@c0d3.blue \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).