netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Paolo Abeni <pabeni@redhat.com>, netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
	Stephen Hemminger <stephen@networkplumber.org>,
	Pravin Shelar <pshelar@nicira.com>,
	Jesse Gross <jesse@kernel.org>, Flavio Leitner <fbl@sysclose.org>,
	Hannes Frederic Sowa <hannes@stressinduktion.org>
Subject: Re: [PATCH net-next v2 1/5] netdev: introduce ndo_set_rx_headroom
Date: Thu, 25 Feb 2016 17:21:32 +0300	[thread overview]
Message-ID: <56CF0DEC.6030308@cogentembedded.com> (raw)
In-Reply-To: <94f5bf927e514df4fecd50a1332a56501fff2945.1456397229.git.pabeni@redhat.com>

Hello.

On 2/25/2016 2:09 PM, Paolo Abeni wrote:

> This method allows the controlling device (i.e. the bridge) to specify
> additional headroom to be allocated for skb head on frame reception.
>
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
>
> ---
> v1 -> v2:
>   - fixed netdev_get_fwd_headroom()
>   - added netdev_set_rx_headroom() and netdev_reset_rx_headroom() helpers
> ---
>   include/linux/netdevice.h | 31 +++++++++++++++++++++++++++++++
>   1 file changed, 31 insertions(+)
>
> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index e52077f..8f53674 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -1093,6 +1093,12 @@ struct tc_to_netdev {
>    *	This function is used to get egress tunnel information for given skb.
>    *	This is useful for retrieving outer tunnel header parameters while
>    *	sampling packet.
> + * * int (*ndo_set_rx_headroom)(struct net_device *dev, int needed_headroom);

    It's *void* in the declaration.

> + *	This function is used to specify the headroom that the skb must
> + *	consider when allocation skb during packet reception. Setting
> + *	appropriate rx headroom value allows avoiding skb head copy on
> + *	forward. Setting a negative value reset the rx headroom to the
> + *	default value.
>    *
>    */
>   struct net_device_ops {
> @@ -1278,6 +1284,8 @@ struct net_device_ops {
>   							 bool proto_down);
>   	int			(*ndo_fill_metadata_dst)(struct net_device *dev,
>   						       struct sk_buff *skb);
> +	void			(*ndo_set_rx_headroom)(struct net_device *dev,
> +						       int needed_headroom);
>   };
>
>   /**
[...]

MBR, Sergei

  reply	other threads:[~2016-02-25 14:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-25 11:09 [PATCH net-next v2 0/5] bridge/ovs: avoid skb head copy on frame forwarding Paolo Abeni
2016-02-25 11:09 ` [PATCH net-next v2 1/5] netdev: introduce ndo_set_rx_headroom Paolo Abeni
2016-02-25 14:21   ` Sergei Shtylyov [this message]
2016-02-25 15:37     ` Paolo Abeni
2016-02-25 11:09 ` [PATCH net-next v2 2/5] bridge: notify ensabled devices of headroom changes Paolo Abeni
2016-02-25 11:09 ` [PATCH net-next v2 3/5] ovs: propagate per dp max headroom to all vports Paolo Abeni
2016-02-25 11:09 ` [PATCH net-next v2 4/5] net/tun: implement ndo_set_rx_headroom Paolo Abeni
2016-02-25 11:09 ` [PATCH net-next v2 5/5] veth: " Paolo Abeni

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=56CF0DEC.6030308@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=davem@davemloft.net \
    --cc=fbl@sysclose.org \
    --cc=hannes@stressinduktion.org \
    --cc=jesse@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pshelar@nicira.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).