Re: load balancing between two chains

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



sbezverk <sbezverk@xxxxxxxxx> 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.





[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux