netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Paasch <cpaasch@apple.com>
To: Florian Westphal <fw@strlen.de>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
	netdev@vger.kernel.org, peter.krystad@intel.com,
	mathew.j.martineau@linux.intel.com
Subject: Re: [PATCH net-next 02/13] sk_buff: add skb extension infrastructure
Date: Thu, 13 Dec 2018 09:00:21 -0800	[thread overview]
Message-ID: <20181213170021.GZ41383@MacBook-Pro-19.local> (raw)
In-Reply-To: <20181213103918.rfh3battqdn7u6b6@breakpoint.cc>

On 13/12/18 - 11:39:18, Florian Westphal wrote:
> Eric Dumazet <eric.dumazet@gmail.com> wrote:
> > > If its going to be used as I expect, then the extension could be
> > > discarded after the DSS mapping has been written to the tcp option
> > > space, i.e. before cloning occurs.
> > 
> > I do not see how this would work, without also discarding on the master skb
> > the needed info.
> 
> Ok, so lets assume this would result in one atomic_inc/dec due to clone
> for now for skbs coming from mptcp socket.
> 
> But I don't see why this would have to be.
> 
> > > For TCP, thats true.  But there are other places that could clone, e.g.
> > > when bridge has to flood-forward.
> > > 
> >
> > So you propose a mechanism that forces a preserve on clone, base on existing needs
> > for bridging.
> 
> secpath does the same thing:
> 
> static void __copy_skb_header(struct sk_buff *new, const struct sk_buff *old)
> {
> ...
> #ifdef CONFIG_XFRM
>         new->sp                 = secpath_get(old->sp);
> #endif
> ...
> 
> So I am not proposing anything new.
> 
> > > At least in bridge case the 'preseve on clone' is needed, else required
> > > information is missing from the cloned skb.
> > > 
> > 
> > We need something where MPTCP info does not need to be propagated all the way to the NIC...
> 
> Thats whats done in the MPTCP out-of-tree implementation, but I don't
> think its needed.

Yes, it indeed does not need to go all the way down to the NIC.

The info basically "just" needs to be propagated from the MPTCP-layer down
to the TCP-option space. Thus, it needs to remain on the skbs that are
sitting in the TCP-subflow's send-queue and rexmit tree as we need it when
retransmitting.

In tcp_transmit_skb, the clone is done at the beginning. Thus, we could for
example not inc the refcount on the clone and simply pass a pointer to the
original skb to tcp_established_options.

That way it the DSS option stays within the MPTCP/TCP layer and does not
make it down to the NIC.


Christoph

> 
> It could just delete the extension before ->queue_xmit() AFAIU.
> 
> > This skb extension is an incentive for adding more sticky things in the skbs
> > to violate layering of networking stacks :/
> 
> 8-(
> 
> Where do you see "layering violations"?

  parent reply	other threads:[~2018-12-13 17:01 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-10 14:49 [PATCH net-next 0/13] sk_buff: add extension infrastructure Florian Westphal
2018-12-10 14:49 ` [PATCH net-next 01/13] netfilter: avoid using skb->nf_bridge directly Florian Westphal
2018-12-10 14:49 ` [PATCH net-next 02/13] sk_buff: add skb extension infrastructure Florian Westphal
     [not found]   ` <CAPUCuiADYwjY4kpq76-w9BKL3uiRvNjnmzKG29mCrb=b8YeesA@mail.gmail.com>
2018-12-12  0:07     ` Mat Martineau
2018-12-12  0:11       ` Florian Westphal
2018-12-12 11:59         ` Florian Westphal
2018-12-12 16:59           ` Mat Martineau
2018-12-12 14:44   ` Willem de Bruijn
2018-12-12 15:40     ` Florian Westphal
2018-12-12 15:45       ` Willem de Bruijn
2018-12-12 17:23   ` Eric Dumazet
2018-12-12 18:44     ` Florian Westphal
2018-12-12 20:17       ` Eric Dumazet
2018-12-12 20:52         ` Florian Westphal
2018-12-13  5:40           ` Eric Dumazet
2018-12-13  9:27             ` Florian Westphal
2018-12-13 10:18               ` Eric Dumazet
2018-12-13 10:39                 ` Florian Westphal
2018-12-13 10:58                   ` Eric Dumazet
2018-12-13 11:03                     ` Florian Westphal
2018-12-13 11:16                       ` Eric Dumazet
2018-12-13 11:44                         ` Florian Westphal
2018-12-13 17:00                   ` Christoph Paasch [this message]
2018-12-12 18:16   ` Stephen Suryaputra
2018-12-12 18:38     ` Florian Westphal
2018-12-13  0:38     ` David Miller
2018-12-10 14:49 ` [PATCH net-next 03/13] net: convert bridge_nf to use " Florian Westphal
2018-12-10 14:49 ` [PATCH net-next 04/13] xfrm: change secpath_set to return secpath struct, not error value Florian Westphal
2018-12-10 14:49 ` [PATCH net-next 05/13] net: move secpath_exist helper to sk_buff.h Florian Westphal
2018-12-10 14:49 ` [PATCH net-next 06/13] net: use skb_sec_path helper in more places Florian Westphal
2018-12-10 14:50 ` [PATCH net-next 07/13] drivers: net: intel: use secpath helpers " Florian Westphal
2018-12-10 14:50 ` [PATCH net-next 08/13] drivers: net: ethernet: mellanox: use skb_sec_path helper Florian Westphal
2018-12-10 14:50 ` [PATCH net-next 09/13] drivers: net: netdevsim: " Florian Westphal
2018-12-10 14:50 ` [PATCH net-next 10/13] xfrm: use secpath_exist where applicable Florian Westphal
2018-12-10 14:50 ` [PATCH net-next 11/13] drivers: chelsio: use skb_sec_path helper Florian Westphal
2018-12-10 14:50 ` [PATCH net-next 12/13] xfrm: prefer secpath_set over secpath_dup Florian Westphal
2018-12-10 14:50 ` [PATCH net-next 13/13] net: switch secpath to use skb extension infrastructure Florian Westphal
2018-12-11  8:06   ` Steffen Klassert
2018-12-11 10:18     ` Florian Westphal
2018-12-11 10:20       ` Steffen Klassert
2018-12-12 11:52         ` Florian Westphal
2018-12-13  4:08 ` [PATCH net-next 0/13] sk_buff: add " Shannon Nelson

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=20181213170021.GZ41383@MacBook-Pro-19.local \
    --to=cpaasch@apple.com \
    --cc=eric.dumazet@gmail.com \
    --cc=fw@strlen.de \
    --cc=mathew.j.martineau@linux.intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=peter.krystad@intel.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).