netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
To: "Toke Høiland-Jørgensen" <toke@toke.dk>
Cc: David Miller <davem@davemloft.net>,
	Cake List <cake@lists.bufferbloat.net>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>,
	"netfilter-devel@vger.kernel.org"
	<netfilter-devel@vger.kernel.org>
Subject: Re: [Cake] [PATCH net-next v15 4/7] sch_cake: Add NAT awareness to packet classifier
Date: Thu, 24 May 2018 04:52:16 +0000	[thread overview]
Message-ID: <F5E3D9FC-F7FC-42AB-8F39-717C3E040402@darbyshire-bryant.me.uk> (raw)
In-Reply-To: <878t8axafk.fsf@toke.dk>

[-- Attachment #1: Type: text/plain, Size: 1839 bytes --]



> On 23 May 2018, at 23:40, Toke Høiland-Jørgensen <toke@toke.dk> wrote:
> 
<snip>
> 
> Hmm, and we still have an issue with ingress filtering (where cake is
> running on an ifb interface). That runs pre-NAT in the conntrack case,
> and we can't do the RX trick. Here we do the lookup manually in
> conntrack (and this part is actually what brings in most of the
> dependencies). Any neat tricks up your sleeve for this case? :)

I wonder here if our terminology with ‘ingress’ is causing confusion.  For avoidance of doubt:

Typical use case of cake on LAN/WAN router requires two instances.  One instance (the egress) is on the WAN interface itself.  It is post conntrack and hence uses skb->nfct to work out the real pre-nat source address of the LAN hosts.

Since we cannot apply this qdisc to the ingress of our WAN interface we use an IFB to mirror the ingress packets, and then use a cake instance on the ifb interface on its egress path to in essence control the ingress traffic.

Cake has two modes, the normal ‘egress’ mode which is designed to be used when controlling egress traffic output, and shapes post any dropped packets.  ‘ingress’ mode is designed to be used on the egress of our ingress IFB, where the shaper counts all packets used (well they got here!) even if we decide to drop them a bit later.

The ifb positioned cake has the additional fun factor that the conntrack field hasn’t yet been filled in, so the qdisc has to go looking in the conntrack tables itself to see if any NATting has taken place and balance LAN host fairness based on that.

As far as I understand it, the flow dissector doesn’t obviously help with working out the pre-NAT addressing as the flow has already been mangled in the egress case, and is awaiting mangling on the ingress case.


Kevin

[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-05-24  4:52 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-22 13:57 [PATCH net-next v15 0/7] sched: Add Common Applications Kept Enhanced (cake) qdisc Toke Høiland-Jørgensen
2018-05-22 13:57 ` [PATCH net-next v15 6/7] sch_cake: Add overhead compensation support to the rate shaper Toke Høiland-Jørgensen
2018-05-22 13:57 ` [PATCH net-next v15 3/7] sch_cake: Add optional ACK filter Toke Høiland-Jørgensen
2018-05-22 13:57 ` [PATCH net-next v15 2/7] sch_cake: Add ingress mode Toke Høiland-Jørgensen
2018-05-22 13:57 ` [PATCH net-next v15 5/7] sch_cake: Add DiffServ handling Toke Høiland-Jørgensen
2018-05-22 13:57 ` [PATCH net-next v15 1/7] sched: Add Common Applications Kept Enhanced (cake) qdisc Toke Høiland-Jørgensen
2018-05-22 13:57 ` [PATCH net-next v15 4/7] sch_cake: Add NAT awareness to packet classifier Toke Høiland-Jørgensen
2018-05-22 14:07   ` Pablo Neira Ayuso
2018-05-22 14:11     ` Toke Høiland-Jørgensen
2018-05-23 22:46       ` Pablo Neira Ayuso
2018-05-23 23:25         ` Toke Høiland-Jørgensen
2018-05-23 18:44   ` David Miller
2018-05-23 19:31     ` [Cake] " Jonathan Morton
2018-05-23 20:04       ` David Miller
2018-05-23 20:33         ` Jonathan Morton
2018-05-23 20:39           ` David Miller
2018-05-23 20:38     ` Toke Høiland-Jørgensen
2018-05-23 20:41       ` David Miller
2018-05-23 21:05         ` Toke Høiland-Jørgensen
2018-05-23 21:20           ` David Miller
2018-05-23 22:40             ` Toke Høiland-Jørgensen
2018-05-24  4:52               ` Kevin Darbyshire-Bryant [this message]
2018-05-22 13:57 ` [PATCH net-next v15 7/7] sch_cake: Conditionally split GSO segments Toke Høiland-Jørgensen

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=F5E3D9FC-F7FC-42AB-8F39-717C3E040402@darbyshire-bryant.me.uk \
    --to=kevin@darbyshire-bryant.me.uk \
    --cc=cake@lists.bufferbloat.net \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=toke@toke.dk \
    /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).