From: Florian Westphal <fw@strlen.de>
To: sbezverk <sbezverk@gmail.com>
Cc: Florian Westphal <fw@strlen.de>, Phil Sutter <phil@nwl.cc>,
"netfilter-devel@vger.kernel.org"
<netfilter-devel@vger.kernel.org>
Subject: Re: load balancing between two chains
Date: Tue, 21 Jan 2020 06:24:18 +0100 [thread overview]
Message-ID: <20200121052418.GJ795@breakpoint.cc> (raw)
In-Reply-To: <F21D35D7-3662-4E47-AACA-65E65DDC28F0@gmail.com>
sbezverk <sbezverk@gmail.com> wrote:
> Hello,
>
> After changing code to set element id as a non big-endian, loadbalancing started working, the side effect though, set shows large number for elements ID.
>
> 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 pod3 :)
> 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 pod1 :)
>
> chain k8s-nfproxy-svc-M53CN2XYVUHRQ7UB { # handle 60
> numgen inc mod 3 vmap { 0 : goto k8s-nfproxy-sep-TMVEFT7EX55F4T62, 16777216 : goto k8s-nfproxy-sep-23NTSA2UXPPQIPK4, 33554432 : goto k8s-nfproxy-sep-GTJ7BFLUOQRCGMD5 } # handle 155
> counter packets 0 bytes 0 comment "" # handle 136
> }
>
> Let me know if you plan to fix it eventually.
This is becuase nft tool stores the key endianess in metadata, so it
can know if it needs to byteswap or not.
See mnl_nft_set_add() in src/mnl.c in nftables source code. Look for
NFTNL_UDATA_SET_KEYBYTEORDER . If your library sets this to 1
(BYTEORDER_HOST_ENDIAN), nft will display the correct values.
prev parent reply other threads:[~2020-01-21 5:24 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
2020-01-21 4:18 ` sbezverk
2020-01-21 5:24 ` Florian Westphal [this message]
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=20200121052418.GJ795@breakpoint.cc \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=phil@nwl.cc \
--cc=sbezverk@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;
as well as URLs for NNTP newsgroup(s).