Re: [**EXTERNAL**] [vpp-dev] Understanding feature-arcs & features

2019-02-06 Thread Gudimetla, Leela Sankar
Dave/Neale,

Sharing any details would help to understand better on top of ‘use the force 
and read the source’.

Thanks,
Leela sankar

From:  on behalf of Leela Gudimetla 
Date: Wednesday, February 6, 2019 at 11:35 AM
To: "vpp-dev@lists.fd.io" 
Subject: [**EXTERNAL**] [vpp-dev] Understanding feature-arcs & features

Hello All,

I have a use case with VPP as below.

  1.  Need to send customized packets (similar to some L3 control packets. ARP, 
ICMP, etc) from ‘my-node’ to loopback.
  2.  The loopback interface is attached to a bridge-domain. So, the customized 
packets need to be either flooded in the bridge-domain or

sent on a particular interface based on the destination-MAC in the packet.

From the code-walk, I see that loopback-interface has a set of nodes i.e. 
‘output-node’ and ‘tx-node’ created as part of interface creation.
And I also see that the loopback-interface tx-node is added next to its 
output-node. And the output-node is added to ‘interface-output’ feature-arc.

I looked at the https://wiki.fd.io/view/VPP/Feature_Arcs and also lot of code 
that does VPP_FEATURE_ARC_INIT & VPP_FEATURE_INIT, to get a clear understanding 
on how my customized packet would traverse the VPP’s node graph. But somehow I 
am missing the full packet traversal after the loopback-interface’s output-node.

Could someone share details on how the feature-arcs and ‘features that use the 
feature-arcs’ work?
And to be specific how the ‘interface-output’ feature-arc works in order to 
send the packet out from loopback-interface output-node to the corresponding 
NIC?
And why is that ‘tx-node’ needed/used?

Too many questions, but any help understanding the flow would really help.

Thanks,
Leela sankar

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#12199): https://lists.fd.io/g/vpp-dev/message/12199
Mute This Topic: https://lists.fd.io/mt/29685539/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] Question about crypto dev queue pairs #vpp

2019-02-06 Thread Sergio G.M.
Hi Manuel,

Could you try modifying your config with something like below?
By the way, I am not sure you need to set any arp entries, I am assuming
you have connected back-to-back the interfaces with IPs in the
192.168.30.0/24 net.
You can check with 'show ip arp' that you have entries for the remote
endpoint, otherwise use the commands below (please double check that the
macs are correct for those IPs)

## SENDER
set interface ip address VirtualFunctionEthernet1/0/1 192.168.100.1/24
set interface ip address VirtualFunctionEthernet1/0/2 192.168.30.100/24

# ROUTING
ip route add 192.168.200.0/24 via 192.168.30.200
VirtualFunctionEthernet1/0/2

 # ARP
set ip arp VirtualFunctionEthernet1/0/2 192.168.30.200 02:0f:b7:00:00:01

## RECEIVER
 # INTERFACE SETUP
set int state VirtualFunctionEthernet1/0/1 up
set int state VirtualFunctionEthernet1/0/2 up

set interface ip address VirtualFunctionEthernet1/0/1 192.168.30.200/24
set interface ip address VirtualFunctionEthernet1/0/2 192.168.200.1/24

# ROUTING
ip route add 192.168.100.0/24 via 192.168.30.100
VirtualFunctionEthernet1/0/1

# ARP
vppctl -s /run/vpp/cli.sock set ip arp VirtualFunctionEthernet1/0/1
192.168.30.200 02:0f:b7:00:00:10



On Wed, Feb 6, 2019 at 10:36 AM  wrote:

> See attached files, setup is taking place in the scripts via vppctl
> instead of using the 'exec path_to_file' used in startup.cnf
> Let me know if you see anything suspicious
>
> BR,
> Manuel -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
>
> View/Reply Online (#12186): https://lists.fd.io/g/vpp-dev/message/12186
> Mute This Topic: https://lists.fd.io/mt/29538345/682142
> Mute #vpp: https://lists.fd.io/mk?hashtag=vpp&subid=1498673
> Group Owner: vpp-dev+ow...@lists.fd.io
> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [
> sergio.gonzalez.mon...@outlook.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#12198): https://lists.fd.io/g/vpp-dev/message/12198
Mute This Topic: https://lists.fd.io/mt/29538345/21656
Mute #vpp: https://lists.fd.io/mk?hashtag=vpp&subid=1480452
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[vpp-dev] Graph Dispatch Pcap Trace HowTo video now on the fd.io YouTube channel

2019-02-06 Thread Dave Barach via Lists.Fd.Io
See https://youtu.be/wmp3X8NipEM...

HTH... Dave

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#12197): https://lists.fd.io/g/vpp-dev/message/12197
Mute This Topic: https://lists.fd.io/mt/29682831/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[vpp-dev] Understanding feature-arcs & features

2019-02-06 Thread Gudimetla, Leela Sankar
Hello All,

I have a use case with VPP as below.

  1.  Need to send customized packets (similar to some L3 control packets. ARP, 
ICMP, etc) from ‘my-node’ to loopback.
  2.  The loopback interface is attached to a bridge-domain. So, the customized 
packets need to be either flooded in the bridge-domain or

sent on a particular interface based on the destination-MAC in the packet.

From the code-walk, I see that loopback-interface has a set of nodes i.e. 
‘output-node’ and ‘tx-node’ created as part of interface creation.
And I also see that the loopback-interface tx-node is added next to its 
output-node. And the output-node is added to ‘interface-output’ feature-arc.

I looked at the https://wiki.fd.io/view/VPP/Feature_Arcs and also lot of code 
that does VPP_FEATURE_ARC_INIT & VPP_FEATURE_INIT, to get a clear understanding 
on how my customized packet would traverse the VPP’s node graph. But somehow I 
am missing the full packet traversal after the loopback-interface’s output-node.

Could someone share details on how the feature-arcs and ‘features that use the 
feature-arcs’ work?
And to be specific how the ‘interface-output’ feature-arc works in order to 
send the packet out from loopback-interface output-node to the corresponding 
NIC?
And why is that ‘tx-node’ needed/used?

Too many questions, but any help understanding the flow would really help.

Thanks,
Leela sankar

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#12196): https://lists.fd.io/g/vpp-dev/message/12196
Mute This Topic: https://lists.fd.io/mt/29681700/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] DPDK and SR-IOV #vpp

2019-02-06 Thread Damjan Marion via Lists.Fd.Io


> On 6 Feb 2019, at 05:37, amir...@rad.com wrote:
> 
> Thanks, 
> Is there any option to attach \ detach interface from the VPP (without 
> restarting the service) ?

With DPDK interfaces, no.

Native AVF driver supports that but that is intel x722/xl710/x710/xxv710 only 
(and 100G intel  E810 hopefully soon).

-- 
Damjan

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#12195): https://lists.fd.io/g/vpp-dev/message/12195
Mute This Topic: https://lists.fd.io/mt/29158489/21656
Mute #vpp: https://lists.fd.io/mk?hashtag=vpp&subid=1480452
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] DPDK and SR-IOV #vpp

2019-02-06 Thread amir_so
Thanks, 
Is there any option to attach \ detach interface from the VPP (without 
restarting the service) ?
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#12194): https://lists.fd.io/g/vpp-dev/message/12194
Mute This Topic: https://lists.fd.io/mt/29158489/21656
Mute #vpp: https://lists.fd.io/mk?hashtag=vpp&subid=1480452
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] DPDK and SR-IOV #vpp

2019-02-06 Thread Damjan Marion via Lists.Fd.Io

> On 5 Feb 2019, at 05:08, amir...@rad.com wrote:
> 
> Hi Damjan,
> 
> My main goal is to use the PF inside the VPP using DPDK in addition to SR-IOV 
> connection to the VMs.
> Currently (before enabling SR-IOV VFs ) all interfaces is connected to VPP 
> with DPDK using VFIO-PCI driver.
> I've enabled below patch to the VFIO driver in order to create VF on the 
> Physical port:
> https://patchwork.kernel.org/patch/10103353/
>  
> The problem is that once I bind VFIO driver to the created VF I expect to see 
> new device node /dev/vfio/X with the relevant IOMMU group.
> In my setup this device note isn't created therefore I can't connect the VF 
> to VM using Libvirt which is looking for this file.
>  
> The sequence I did is:
> #Create 4 VF on the PF 
> echo '4' > /sys/bus/pci/devices/\:06\:00.0/sriov_numvfs
> #Unbind the 4 VF from the default driver
> echo ":06:10.0" > /sys/bus/pci/drivers/ixgbevf/unbind
> echo ":06:10.2" > /sys/bus/pci/drivers/ixgbevf/unbind
> echo ":06:10.4" > /sys/bus/pci/drivers/ixgbevf/unbind
> echo ":06:10.6" > /sys/bus/pci/drivers/ixgbevf/unbind
> #Bind the VF to VFIO-PCI driver
> echo "8086 15c5" > /sys/bus/pci/drivers/vfio-pci/new_id
> #After this command I expect to see new /dev/vfio/X file for each VF.
> I can see that each VF is in different IOMMU group.
>  
> What I'm missing here ?
> Is there any other option to connect VM with SR-IOV once using DPDK driver on 
> the PF ?

I'm afraid you will need to keep PF bound to linux driver if you want VFs to 
show up...

-- 
Damjan

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#12193): https://lists.fd.io/g/vpp-dev/message/12193
Mute This Topic: https://lists.fd.io/mt/29158489/21656
Mute #vpp: https://lists.fd.io/mk?hashtag=vpp&subid=1480452
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] [NAT] Assign same external IP

2019-02-06 Thread JB
Hi Matus,

That's unfortunate.
That would work as an immediate solution. I've considered a solution like that, 
but I'm worried it might be wasteful. I considered that very setup when I was 
contemplating a sort of hybrid NAT between dynamic NAT and CGN. In CGN, just as 
we allocate a number of ports per IP by dividing all external IPs and ports 
with the number of internal IPs, we'd allocate a block of ports for each new 
user created, just as you say. In reality, you have some users who only occupy 
a handful of ports, and others who occupy hundreds.
I'd imagine a potential sane compromise might be to have both a limit for the 
max number of local users per global IP, and max translations per user. That 
way we can avoid having, say, ten thousand local clients on a global IP with 
just a few ports each, and at the same time we can ensure that no single client 
takes up too many ports.
It would be a compromise that can scale, and won't necessarily punish the 
system if most users only use a few ports, rather than allocating the ports in 
advance. The downside is that if we have, say, a limit of 120 clients, and each 
client only uses a handful of ports, we'll have thousands of unused ports on 
that global IP.
For the sake of such an implementation, it might be good if the limit can be 
changed during runtime instead of only at startup.

As I mentioned, PAP seems less efficient than AAP, but it might be a necessary 
loss of efficiency in order to maintain functionality with all the services 
that break without it, as per the RFC4787 requirements and recommendations.

Thanks,
John
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#12192): https://lists.fd.io/g/vpp-dev/message/12192
Mute This Topic: https://lists.fd.io/mt/29639823/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] [NAT] Assign same external IP

2019-02-06 Thread Matus Fabian -X (matfabia - PANTHEON TECHNOLOGIES@Cisco) via Lists.Fd.Io
Hi,

There is no plan to implement PAP.
There is one solution in my mind “port block allocation”. When creating user 
(first session), instead of allocating single port multiple ports of single IP 
address are allocated for given user. Block size should be configurable and 
will be free when deleting user (last session deleted).

Matus

From: vpp-dev@lists.fd.io  On Behalf Of JB
Sent: Wednesday, February 6, 2019 11:40 AM
To: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] [NAT] Assign same external IP

Hi Matus,

Thanks once again.

That seems to be it. After reading RFC4787 section 4.1 REQ 1, their mention of 
PAP (Paired-Address-Pooling) seems to be on-point.
As they mention:

NATs that use an "IP address

   pooling" behavior of "Arbitrary" can cause issues for applications

   that use multiple ports from the same endpoint, but that do not

   negotiate IP addresses individually (e.g., some applications using

   RTP and RTCP).
and the REQ 2 mentions the standard recommendation:

It is RECOMMENDED that a NAT have an "IP address pooling"

  behavior of "Paired".  Note that this requirement is not

  applicable to NATs that do not support IP address pooling.
That's the issues we've faced and are attempting to avoid, since it would seem 
that arbitrary address pooling causes issues for a lot of services when we use 
multiple external addresses.
Are there any plans to implemented PAP? I'm unsure how a clean and efficient 
implementation would look since we don't want to reserve the entire public IP 
for a single internal IP, but still attempt to keep traffic over the same 
external IP. Would a feasible implementation perhaps reserve a number of slots 
for the internal IP (wasteful)? Would it perhaps make it so that for each new 
internal user, we bump them to the least-used external address in the vector, 
so that we lessen the likelihood of running out of ports?

It's sadly extremely frustrating that a lot of services depend so much on all 
connections being from the same IP in order to maintain user authentication, as 
I'd imagine more service providers migrating to NAT-based solutions (such as 
for CGN), and PAP doesn't seem to be as efficient as AAP.

Thanks,
John
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#12191): https://lists.fd.io/g/vpp-dev/message/12191
Mute This Topic: https://lists.fd.io/mt/29639823/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] [NAT] Assign same external IP

2019-02-06 Thread JB
After reading Cisco's implementation for PAP for IOS XE, it seems they limit 
the number of local addresses per global address. The default is 120 local 
addresses per global address. That way we can make sure that there are never 
more than a certain number of local users per global IP, but can still impose 
limits such as maximum translations per user 
https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipaddr_nat/configuration/xe-3s/nat-xe-3s-book/iadnat-addr-pool.html
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#12190): https://lists.fd.io/g/vpp-dev/message/12190
Mute This Topic: https://lists.fd.io/mt/29639823/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] Want to subscribe Ipv6 Router Advertisement packets

2019-02-06 Thread chetan bhasin
Hi Ole,

After register via the api , then RA packets to be consumed by our node, or
sent futher down the line to any next node in VPP ? (on your existing
thread)

Thanks,
Chetan Bhasin




On Mon, Feb 4, 2019 at 3:57 PM Ole Troan  wrote:

> Chetan,
>
> > Is there a way by which I can get RA packets on my node. I am ready to
> register on any existing arc.
>
> Instead of having the IPv6 ND code in vnet/ip register, you can register
> for the RA type yourself.
>   icmp6_register_type (vm, ICMP6_router_advertisement,
>ip6_icmp_router_advertisement_node.index);
>
> Cheers,
> Ole
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#12189): https://lists.fd.io/g/vpp-dev/message/12189
Mute This Topic: https://lists.fd.io/mt/29620449/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] [NAT] Assign same external IP

2019-02-06 Thread JB
Hi Matus,

Thanks once again.

That seems to be it. After reading RFC4787 section 4.1 REQ 1, their mention of 
PAP (Paired-Address-Pooling) seems to be on-point.
As they mention:

> 
> NATs that use an "IP address pooling" behavior of "Arbitrary" can cause
> issues for applications that use multiple ports from the same endpoint,
> but that do not negotiate IP addresses individually (e.g., some
> applications using RTP and RTCP).

and the REQ 2 mentions the standard recommendation:

> 
> It is RECOMMENDED that a NAT have an "IP address pooling" behavior of
> "Paired". Note that this requirement is not applicable to NATs that do not
> support IP address pooling.

That's the issues we've faced and are attempting to avoid, since it would seem 
that arbitrary address pooling causes issues for a lot of services when we use 
multiple external addresses.
Are there any plans to implemented PAP? I'm unsure how a clean and efficient 
implementation would look since we don't want to reserve the entire public IP 
for a single internal IP, but still attempt to keep traffic over the same 
external IP. Would a feasible implementation perhaps reserve a number of slots 
for the internal IP (wasteful)? Would it perhaps make it so that for each new 
internal user, we bump them to the least-used external address in the vector, 
so that we lessen the likelihood of running out of ports?

It's sadly extremely frustrating that a lot of services depend so much on all 
connections being from the same IP in order to maintain user authentication, as 
I'd imagine more service providers migrating to NAT-based solutions (such as 
for CGN), and PAP doesn't seem to be as efficient as AAP.

Thanks,
John
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#12188): https://lists.fd.io/g/vpp-dev/message/12188
Mute This Topic: https://lists.fd.io/mt/29639823/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] [NAT] Assign same external IP

2019-02-06 Thread Matus Fabian -X (matfabia - PANTHEON TECHNOLOGIES@Cisco) via Lists.Fd.Io
Hi,

There is no guarantee that user always get same external address if you have 
multiple external addresses. What you are referring to mean standard/vanilla 
NAT use endpoint-independent mapping (RFC4787 section 4.1.) and filtering 
(RFC4787 section 5.), something different. What you want is address paired 
pooling behaviour but NAT plugin has arbitrary pooling behaviour (RFC4787 
section 4.1.)

Matus


From: vpp-dev@lists.fd.io  On Behalf Of JB
Sent: Wednesday, February 6, 2019 9:51 AM
To: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] [NAT] Assign same external IP

Hi Matus,

Thanks for the response!

Ah, I see, that makes more sense as to why we check against the FIB.
However, if we just pick a random port (per protocol) from the "first address 
with some available ports" (dictated by the "busy ports" I presume), how does 
this ensure that a user ever gets the same external IP? I can see it happening 
if we only have one external IP, or by sheer luck. Looking at the algorithm, 
it's just as you say, we take it from the first available one, but there's no 
logic in place to assign a user a previously-assigned external IP, or am I 
missing some logic in the code here?

I'm referring to an older discussion you and I had where you mentioned
Session/mapping key is 4-tuple (client address, port, fib index and protocol), 
internal address and port is mapped always to same external address and port no 
matter what is the endpoint 
https://gerrit.fd.io/r/gitweb?p=vpp.git;a=blob;f=src/plugins/nat/nat.h;h=3ce83ea26022fac43045fc88bfb37466c78c98dd;hb=HEAD#l58
The link refers to the definition of the snat session key (4-tuple). Trying to 
find the above logic in the code. Is that due to the nature of the 4-tuple and 
has nothing to do with the assignment algorithm?

Thanks,
John
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#12187): https://lists.fd.io/g/vpp-dev/message/12187
Mute This Topic: https://lists.fd.io/mt/29639823/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] Question about crypto dev queue pairs #vpp

2019-02-06 Thread manuel . alonso
See attached files, setup is taking place in the scripts via vppctl instead of 
using the 'exec path_to_file' used in startup.cnf
Let me know if you see anything suspicious

BR,
Manuel


start_vpp_ipsec_board_a_xaui30_p2.sh
Description: application/shellscript


start_vpp_ipsec_board_b_xaui50_p2.sh
Description: application/shellscript
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#12186): https://lists.fd.io/g/vpp-dev/message/12186
Mute This Topic: https://lists.fd.io/mt/29538345/21656
Mute #vpp: https://lists.fd.io/mk?hashtag=vpp&subid=1480452
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] [NAT] Assign same external IP

2019-02-06 Thread JB
Hi Matus,

Thanks for the response!

Ah, I see, that makes more sense as to why we check against the FIB.
However, if we just pick a random port (per protocol) from the "first address 
with some available ports" (dictated by the "busy ports" I presume), how does 
this ensure that a user ever gets the same external IP? I can see it happening 
if we only have one external IP, or by sheer luck. Looking at the algorithm, 
it's just as you say, we take it from the first available one, but there's no 
logic in place to assign a user a previously-assigned external IP, or am I 
missing some logic in the code here?

I'm referring to an older discussion you and I had where you mentioned
> 
> Session/mapping key is 4-tuple (client address, port, fib index and
> protocol), internal address and port is mapped always to same external
> address and port no matter what is the endpoint 
> https://gerrit.fd.io/r/gitweb?p=vpp.git;a=blob;f=src/plugins/
> nat / nat.h;h=3ce83ea26022fac43045fc88bfb37466c78c98dd;hb=HEAD#l58

The link refers to the definition of the snat session key (4-tuple). Trying to 
find the above logic in the code. Is that due to the nature of the 4-tuple and 
has nothing to do with the assignment algorithm?

Thanks,
John
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#12185): https://lists.fd.io/g/vpp-dev/message/12185
Mute This Topic: https://lists.fd.io/mt/29639823/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] [NAT] Assign same external IP

2019-02-06 Thread Matus Fabian -X (matfabia - PANTHEON TECHNOLOGIES@Cisco) via Lists.Fd.Io
Hi,

Default assignment algorithm support address per fib (tenant) 
https://wiki.fd.io/view/VPP/NAT#NAT44_add_pool_address_for_specific_tenant
It just pick random port (per protocol) from first address with some available 
ports. In case of multithread ports a divided between worker threads.

Matus


From: vpp-dev@lists.fd.io  On Behalf Of JB
Sent: Wednesday, February 6, 2019 8:19 AM
To: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] [NAT] Assign same external IP

Hi Ole!

Thanks for the response!

I've followed the code you mentioned which has lead me to the default address 
and port assignment algorithm. I can see how we can easily plug our own, but 
I'm trying to first break down the code for the default one in order to 
understand how exactly the algorithm works right now. Is the default algorithm 
also responsible for the endpoint independent logic?

It's a bit lost on me as to why the default one checks against the fib_index 
(the other ones do not).
The second time we check if it's a bitwise all 1 (~0), before then running the 
exact same code. Is this a hack for a previous issue?
else if (a->fib_index == ~0)






{





ga = a;





}




Thanks,
John
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#12184): https://lists.fd.io/g/vpp-dev/message/12184
Mute This Topic: https://lists.fd.io/mt/29639823/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-