From: Florian Fainelli <f.fainelli@gmail.com>
To: Vladimir Oltean <olteanv@gmail.com>,
vivien.didelot@gmail.com, andrew@lunn.ch, davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 4/9] net: dsa: Keep private info in the skb->cb
Date: Fri, 3 May 2019 19:04:35 -0700 [thread overview]
Message-ID: <4d3ea715-676c-c550-cff6-18c94a9d93e6@gmail.com> (raw)
In-Reply-To: <20190504011826.30477-5-olteanv@gmail.com>
On 5/3/2019 6:18 PM, Vladimir Oltean wrote:
> Map a DSA structure over the 48-byte control block that will hold
> persistent skb info on transmit and receive.
>
On receive you cannot quite do that because you don't know if the DSA
master network device calls netif_receive_skb() or napi_gro_receive().
The latter arguably may not be able to aggregate flows at all because it
does not know how to parse the SKB, but the point remains that skb->cb[]
on receive may already be used, up to 48 bytes already. I tried to make
use of it for storing the HW extracted Broadcom tag, but it blew the
budge on 64-bit hosts:
https://www.spinics.net/lists/netdev/msg337777.html
Not asking you to change anything here, just to be aware of it.
> Also add a DSA_SKB_CB_PRIV() macro which retrieves a pointer to the
> space up to 48 bytes that the DSA structure does not use. This space can
> be used for drivers to add their own private info.
>
> One use is for the PTP timestamping code path. When cloning a skb,
> annotate the original with a pointer to the clone, which the driver can
> then find easily and place the timestamp to. This avoids the need of a
> separate queue to hold clones and a way to match an original to a cloned
> skb.
>
> Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
next prev parent reply other threads:[~2019-05-04 2:04 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-04 1:18 [PATCH net-next 0/9] Traffic support for SJA1105 DSA driver Vladimir Oltean
2019-05-04 1:18 ` [PATCH net-next 1/9] net: dsa: Call driver's setup callback after setting up its switchdev notifier Vladimir Oltean
2019-05-04 1:18 ` [PATCH net-next 2/9] net: dsa: Optional VLAN-based port separation for switches without tagging Vladimir Oltean
2019-05-04 1:18 ` [PATCH net-next 3/9] net: dsa: Allow drivers to filter packets they can decode source port from Vladimir Oltean
2019-05-04 2:00 ` Florian Fainelli
2019-05-04 1:18 ` [PATCH net-next 4/9] net: dsa: Keep private info in the skb->cb Vladimir Oltean
2019-05-04 2:04 ` Florian Fainelli [this message]
2019-05-04 2:23 ` Vladimir Oltean
2019-05-04 1:18 ` [PATCH net-next 5/9] net: dsa: Add support for deferred xmit Vladimir Oltean
2019-05-04 2:07 ` Florian Fainelli
2019-05-04 2:10 ` Vladimir Oltean
2019-05-04 1:18 ` [PATCH net-next 6/9] net: dsa: Add a private structure pointer to dsa_port Vladimir Oltean
2019-05-04 2:08 ` Florian Fainelli
2019-05-04 1:18 ` [PATCH net-next 7/9] net: dsa: sja1105: Add support for traffic through standalone ports Vladimir Oltean
2019-05-04 1:18 ` [PATCH net-next 8/9] net: dsa: sja1105: Add support for Spanning Tree Protocol Vladimir Oltean
2019-05-04 2:10 ` Florian Fainelli
2019-05-04 1:18 ` [PATCH net-next 9/9] Documentation: net: dsa: sja1105: Add info about supported traffic modes Vladimir Oltean
2019-05-04 2:17 ` Florian Fainelli
2019-05-04 2:36 ` Vladimir Oltean
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=4d3ea715-676c-c550-cff6-18c94a9d93e6@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=vivien.didelot@gmail.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
Powered by JetHome