netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: sbezverk <sbezverk@gmail.com>
To: Florian Westphal <fw@strlen.de>
Cc: Phil Sutter <phil@nwl.cc>,
	"netfilter-devel@vger.kernel.org"
	<netfilter-devel@vger.kernel.org>
Subject: Re: load balancing between two chains
Date: Mon, 20 Jan 2020 17:50:08 -0500	[thread overview]
Message-ID: <3A3D5C9C-86A9-432E-A64F-6F0014E7DD99@gmail.com> (raw)
In-Reply-To: <20200120221225.GI795@breakpoint.cc>

It started working?!?!?!?!

sbezverk@kube-4:~$ curl http://57.141.53.140:808
Still alive pod1 :)
sbezverk@kube-4:~$ curl http://57.141.53.140:808
Still alive from pod2 :)
sbezverk@kube-4:~$ curl http://57.141.53.140:808
Still alive from pod3 :)
sbezverk@kube-4:~$ curl http://57.141.53.140:808
Still alive pod1 :)
sbezverk@kube-4:~$ curl http://57.141.53.140:808
Still alive from pod2 :)
sbezverk@kube-4:~$ curl http://57.141.53.140:808
Still alive from pod3 :)
sbezverk@kube-4:~$ curl http://57.141.53.140:808
Still alive pod1 :)
sbezverk@kube-4:~$ curl http://57.141.53.140:808
Still alive from pod2 :)

        chain k8s-nfproxy-svc-M53CN2XYVUHRQ7UB { # handle 60
                numgen inc mod 3 vmap { 0 : goto k8s-nfproxy-sep-TMVEFT7EX55F4T62, 1 : goto k8s-nfproxy-sep-GTJ7BFLUOQRCGMD5, 2 : goto k8s-nfproxy-sep-23NTSA2UXPPQIPK4, 16777216 : goto endianbug } # handle 174
                counter packets 4 bytes 240 comment "" # handle 76
        }


        chain endianbug { # handle 171
                counter packets 0 bytes 0 # handle 172
        }

Why is that?

Thank you
Serguei

On 2020-01-20, 5:12 PM, "Florian Westphal" <fw@strlen.de> wrote:

    Florian Westphal <fw@strlen.de> wrote:
    > sbezverk <sbezverk@gmail.com> wrote:
    > > Numgen has GOTO directive and not Jump (Phil asked to change it), I thought it means after hitting any chains in numgen the processing will go back to service chain, no?
    > > 
    > > It is Ubuntu 18.04
    > > 
    > > sbezverk@kube-4:~$ uname -a
    > > Linux kube-4 5.4.10-050410-generic #202001091038 SMP Thu Jan 9 10:41:11 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
    > > sbezverk@kube-4:~$ sudo nft --version
    > > nftables v0.9.1 (Headless Horseman)
    > > sbezverk@kube-4:~$
    > > 
    > > I also want to remind you that I do NOT use nft cli to program rules, I use nft cli just to see resulting rules.
    > 
    > In that case, please include "nft --debug=netlink list ruleset".
    > 
    > It would also be good to check if things work when you add it via nft
    > tool.
    
    Oh, and for the fun of it, you could also try this:
    
    chain k8s-nfproxy-svc-M53CN2XYVUHRQ7UB {
    	numgen inc mod 2 vmap { 0 : goto k8s-nfproxy-sep-I7XZOUOVPIQW4IXA, 1 : goto k8s-nfproxy-sep-ZNSGEJWUBCC5QYMQ, 16777216 : goto endianbug }
    	counter packets 0 bytes 0 } 
            chain endianbug {
    		 counter packets 0 bytes 0
    	}
     ...
    
    numgen generates a 32bit number in host byte order, so nft internally
    converts the keys accordingly (16777216 is htonl(1)).
    



  reply	other threads:[~2020-01-20 22:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-20  2:46 load balancing between two chains sbezverk
2020-01-20 11:23 ` Phil Sutter
2020-01-20 16:31   ` sbezverk
2020-01-20 17:06     ` Florian Westphal
2020-01-20 17:42       ` sbezverk
2020-01-20 21:39         ` Florian Westphal
2020-01-20 21:54           ` sbezverk
2020-01-20 22:00             ` Florian Westphal
2020-01-20 22:07               ` sbezverk
2020-01-20 22:12               ` Florian Westphal
2020-01-20 22:50                 ` sbezverk [this message]
2020-01-21  4:18                 ` sbezverk
2020-01-21  5:24                   ` Florian Westphal

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=3A3D5C9C-86A9-432E-A64F-6F0014E7DD99@gmail.com \
    --to=sbezverk@gmail.com \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=phil@nwl.cc \
    /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).