114 Commits

Author SHA1 Message Date
Neale Ranns
cbe25aab3b ip: Protocol Independent IP Neighbors
Type: feature

 - ip-neighbour: generic neighbour handling; APIs, DBs, event handling,
aging
 - arp: ARP protocol implementation
 - ip6-nd; IPv6 neighbor discovery implementation; separate ND,
MLD, RA
 - ip6-link; manage link-local addresses
 - l2-arp-term; events separated from IP neighbours, since they are not
the same.

vnet retains just enough education to perform ND/ARP packet
construction.
arp and ip6-nd to be moved to plugins soon.

Change-Id: I88dedd0006b299344f4c7024a0aa5baa6b9a8bbe
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-12-17 10:56:20 +00:00
Jakub Grajciar
5de4fb7076 devices: tap API cleanup
Use consistent API types.

Type: fix

Change-Id: I11cc7f6347b7a60e5fd41e54f0c7994e2d81199f
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-12-11 09:39:42 +00:00
Mohsin Kazmi
3f4be92ce5 vom: get interface type from vpp device type
Type: feature

Change-Id: Ia626188c22dc80c2b7a06b61cf0af435ee53d1e7
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-12-04 23:16:21 +00:00
Jakub Grajciar
103ba6ba9e dhcp: API cleanup
Use consistent API types.

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Ia63d920788add2584060a240321acced7a471640
2019-10-03 10:07:21 +00:00
Jakub Grajciar
3d1ef873da bonding: API cleanup
Use consistent API types.

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Idbba4ab6a412b75338e3149e51476693f0862f16
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-09-11 15:14:02 +00:00
Ole Troan
e5ff5a36dd api: enforce vla is last and fixed string type
Enforce that variable length fields are the last element of API messages.

Add a 'fixed' version of string type, since dealing with
multiple variable length strings turned out too painful
for the C language bindings.

The string type is now:
{
  string name[64]; // NUL terminated C-string. Essentially decays to u8 name[64]
  string name[];   // Variable length string with embedded len field (vl_api_string_t)
};

The latter notation could be made available to other types as well.
e.g.
{
  vl_api_address_t addresses[];
}
instead of

{
  u32 n_addr;
  vl_api_address_t addresses[n_addr];
};

Type: fix
Change-Id: I18fa17ef47227633752ab50453e8d20a652a9f9b
Signed-off-by: Ole Troan <ot@cisco.com>
2019-09-03 20:04:13 +00:00
Jakub Grajciar
053204ab03 api: Cleanup APIs interface.api
Use of consistent API types for interface.api

Type: fix

Change-Id: I88206d7d0907cffd564031f73c9a996df2e5e21a
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-08-20 09:57:10 +00:00
Neale Ranns
e3282bae27 vom: export/install cmake files
Type: feature

allow other projects to use cmake modules to find VOM

Change-Id: I00e01e9bec3ecf79903cd522d2770bdb70e5399b
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-08-07 08:54:43 +00:00
Neale Ranns
83832e7ced qos: Store function
Type: feature

store: write a QoS value into the buffer meta-data
record: Extract a QoS value from a packet header and store it.
mark: Make a change to the content of a packet header by writing a stored
      QoS value

Change-Id: I07d1e87dd1ca90d40ac1ae1774fee1b272cab83f
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-31 16:17:36 +00:00
Neale Ranns
038e1dfbdf dhcp ip: DSCP settings for transmitted DHCP packets
Type: feature

- Define the ip_dscp_t and use in the IP headers
- Add DSCP setting to the DHCP client for use with packet TX

Change-Id: If220dde0017ea78793747d65f53e11daf23a28fa
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-26 13:27:14 +00:00
Neale Ranns
c17c1873a9 vom: QoS support
Type: feature

Change-Id: If517d10c318fc17fdbd797fac8d974d9851f6442
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-25 09:51:35 +00:00
Neale Ranns
6955ecd5d7 vom: Fix reference to flags in GBP bridge-domain
Type: fix
Fixes: 5e82b050

Change-Id: I8f709c5303861ea9984144ce5543c86c934869bb
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-11 12:08:22 +00:00
Neale Ranns
c2ac2357fb fib: allow route delete with no paths and multipath=0 to remove the
whole route

Type: fix
Fixes: 097fa66b

Change-Id: I017ab5797670eb278c27c6e306cd8cadaacddf9d
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-03 11:27:44 +00:00
Benoît Ganne
3c0d84c989 gbp: add anonymous l3-out subnets
An anonymous l3-out subnet is a locally attached l3-out subnet, and
differs from regular l3-out subnets in the way adjacencies are managed.
It is required for the anonymous l3-out external interfaces to correctly
classify locally attached l3-out hosts.

Type: feature

Change-Id: Ie7bc88b1f22abc4d0b46db5f3cfbf208bc53ba5f
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-07-02 14:19:15 +00:00
Neale Ranns
8d020854c8 vom: Fix [m]route dump
Type: fix
Fixes: 097fa66b

Change-Id: I4ada76982c680ee9b0af5828c7268b9b2098ce6b
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-02 11:03:22 +00:00
Neale Ranns
160c923f99 gbp: VRF scoped contracts
Type: feature

Change-Id: I01772cfc3a0118a5c49bf346339788824e6931b2
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-01 08:37:53 +00:00
Paul Vinciguerra
ab05508e1e api: refactor format_vl_api_prefix_t return keys
format_vl_api_prefix_t returns a dict with keys 'address' and 'address_length',
but other format_vl_api_prefix functions return a dict with 'prefix', and 'len'.

Refactor all format_vl_api_prefix_t to return consistent keys 'address' and 'len'.

Type: refactor

Change-Id: I5f9558fc2da8742a303266e011102f5b2db80aad
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-26 11:36:57 +00:00
Mohsin Kazmi
17da0c0d82 vom: Add getter for interface admin state
Type: feature

Change-Id: I3409bedb45f033210202c151a2267b036b8b97d6
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-06-26 08:51:25 +00:00
Neale Ranns
bc764c8bc2 l2: BD ARP termination entry API update
Type: refactor

Change-Id: I492b6e88acadf0ab0e4d7b1c0c5d1cab84c1726f
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-19 15:56:18 +00:00
Neale Ranns
097fa66b98 fib: fib api updates
Enhance the route add/del APIs to take a set of paths rather than just one.
Most unicast routing protocols calcualte all the available paths in one
run of the algorithm so updating all the paths at once is beneficial for the client.
two knobs control the behaviour:
  is_multipath - if set the the set of paths passed will be added to those
                 that already exist, otherwise the set will replace them.
  is_add - add or remove the set

is_add=0, is_multipath=1 and an empty set, results in deleting the route.

It is also considerably faster to add multiple paths at once, than one at a time:

vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.11
100000 routes in .572240 secs, 174751.80 routes/sec
vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.12
100000 routes in .528383 secs, 189256.54 routes/sec
vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.13
100000 routes in .757131 secs, 132077.52 routes/sec
vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.14
100000 routes in .878317 secs, 113854.12 routes/sec

vat# ip_route_add_del 1.1.1.1/32 count 100000 multipath via 10.10.10.11 via 10.10.10.12 via 10.10.10.13 via 10.10.10.14
100000 routes in .900212 secs, 111084.93 routes/sec

Change-Id: I416b93f7684745099c1adb0b33edac58c9339c1a
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-18 13:31:39 +00:00
Mohsin Kazmi
1bcb31102f vom: Add bridge domain unknown unicast flooding flag
UU flood can be disabled or enabled using this flag in a bd.

Change-Id: I799be2742b599783eec019b5fd295c3b940eb3e8
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-06-04 07:00:20 +00:00
Mohsin Kazmi
365e724ffe vom: Add bridge domain arp unicast forwarding flag
Change-Id: Iede47e8d9e168125bcd938cca6182c9270dcb5c4
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-06-03 10:42:31 +00:00
Ole Troan
233e468183 stats: support multiple works for error counters
The current code only allowed access to the main thread error counters.
That is not so useful for a multi worker instance.
No return a vector indexed by thread of counter_t values.

Type: fix

Change-Id: Ie322c8889c0c8175e1116e71de04a2cf453b9ed7
Signed-off-by: Ole Troan <ot@cisco.com>
2019-05-22 09:43:49 +00:00
Filip Varga
dd1e3e780c NAT: VPP-1531 api cleanup & update
Change-Id: I2492400a67b39a3adbc24ab7cf1ba17a409e95a8
Signed-off-by: Filip Varga <fivarga@cisco.com>
2019-04-24 11:09:37 +00:00
Ole Trøan
89fec713f8 Revert "NAT: VPP-1531 api cleanup & update"
This reverts commit bed1421b9f1b3643d93384084972337b596aec73.

/vpp/master3/src/plugins/nat/nat_api.c: In function ‘send_nat_worker_details’:
/vpp/master3/src/vppinfra/clib.h:62:33: error: division ‘sizeof (u8 * {aka unsigned char *}) / sizeof (u8 {aka unsigned char})’ does not compute the number of array elements [-Werror=sizeof-pointer-div]
 #define ARRAY_LEN(x) (sizeof (x)/sizeof (x[0]))
                                 ^
/vpp/master3/src/plugins/nat/nat_api.c:205:43: note: in expansion of macro ‘ARRAY_LEN’
   rmp = vl_msg_api_alloc (sizeof (*rmp) + ARRAY_LEN (w->name) - 1);
                                           ^~~~~~~~~

Change-Id: Ie82672c145fb2f6580827f95e535435307bc7a23
Signed-off-by: Ole Troan <ot@cisco.com>
2019-04-23 15:08:45 +00:00
Filip Varga
bed1421b9f NAT: VPP-1531 api cleanup & update
Change-Id: I519d7efc8ee3c86381d96be2e2a46017cd948895
Signed-off-by: Filip Varga <fivarga@cisco.com>
2019-04-23 11:25:29 +00:00
Neale Ranns
796c84b251 GBP: drop and contract counters
Change-Id: Ib436512a26e53f70f7b5e47bf34224ab73e5244e
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-08 21:55:07 +00:00
Jim Thompson
f324dec0a3 fixing typos
Change-Id: I215e1e0208a073db80ec6f87695d734cf40fabe3
Signed-off-by: Jim Thompson <jim@netgate.com>
2019-04-08 21:54:17 +00:00
Mohsin Kazmi
8ea109e40a gbp: Add bd flags
Add flags for unknown unicast drop, multicast and broadcast
drop and arp unicast.

Change-Id: I1203137510b8bee0a20ecfe5f2efad8043d4bac6
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-04-04 07:29:34 +00:00
Neale Ranns
db4cae5d43 VOM: recurive route update fix
Change-Id: Iff61904804d8218c4e02897521368f696002343d
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-29 15:17:11 +00:00
Neale Ranns
3b12aa97ca VOM: routes support multipath so set is_multipath in route update
Change-Id: Ib0249aec00c8a8306f2cf25394d39b4b7850d8f7
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-27 13:40:59 +00:00
Neale Ranns
4dd4cf4f9c GBP: fixes for l3-out routing
Change-Id: I4d73b712da911588d511a8401b73cdc3c66346fe
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-27 13:40:50 +00:00
Mohsin Kazmi
9c1f824366 vom: Add support for BVI interface
Change-Id: Ie93f3a2107df0452f7a7436b78c337f482904899
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-03-27 08:59:56 +00:00
Neale Ranns
40ddc31998 GBP: missing L3-out type coversion
Change-Id: Ic6455a930fcb21b055bcf093359bc8328f88140a
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-26 17:05:47 +00:00
Neale Ranns
5cbf7c7a88 VOM: GBP: L3-out subnets need only the sclass not an EPG
Change-Id: Ic600233ea69216aeee707a103bf840fbeec5c205
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-18 15:27:20 +00:00
Ole Trøan
3b0d7e42f6 Revert "API: Cleanup APIs interface.api"
This reverts commit e63325e3ca03c847963863446345e6c80a2c0cfd.

Allow time for CSIT to accommodate.

Change-Id: I59435e4ab5e05e36a2796c3bf44889b5d4823cc2
Signed-off-by: ot@cisco.com
2019-03-15 17:34:06 +00:00
Jakub Grajciar
e63325e3ca API: Cleanup APIs interface.api
Use of consistent API types for interface.api

Change-Id: Ieb54cebb4ac96b432a3f0b41596718aa2f34885b
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-03-15 10:24:22 +00:00
Neale Ranns
2331e48ff9 GBP: Endpoint flags
Change-Id: I4d70985ad078e84ec23ce704c8b76e2ac7809419
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-14 13:05:46 +00:00
Neale Ranns
fa0ac2c566 GBP: contracts API fixed length of allowed ethertypes
VAPI does not handle two VLAs in one struct.

Change-Id: I259c998bef4398ead2bbb9e788350d50c2f05694
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-12 15:45:25 +00:00
Neale Ranns
4ba67723d7 GBP: use sclass in the DP for policy
Change-Id: I154e18f22ec7708127b8ade98e80546ab1dcd05b
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-06 12:15:10 +00:00
Neale Ranns
8da9fc659b GBP: learn from ARP and L2 packets
Change-Id: I8af7bca566ec7c9bd2b72529d49e04c6e649b44a
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-06 10:31:38 +00:00
Neale Ranns
dc8d93b029 VOM: GBP show allowed ethertypes in contracts
Change-Id: I8314f51d519966b1d9aef96318f6836ace944c9a
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-05 23:59:15 -08:00
Neale Ranns
32f6d8e0ca GBP: per-group EP retention policy
Change-Id: I3ed4e2e92f74f15b07fcd3e7fbc3fa8718d5249d
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-05 13:51:32 +00:00
Neale Ranns
4f89a804d5 GBP: Global config for EP retention
Change-Id: I9508c67b494b5edecb2bc393a53e7d47c2574978
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-04 12:37:58 +00:00
Neale Ranns
4689da0c61 GBP: fix and print GBP BD flags
Change-Id: If3fe2752c9339049123ff4674e3a29449b520374
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-04 11:16:23 +00:00
Neale Ranns
bbe2de1fbf VOM: mprefix and mpath encode fixes
Change-Id: Id3c281e680683c7267c9db66cc806fed58c8cfcb
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-01 07:16:40 -08:00
Neale Ranns
038243064b VOM: vxlan-tunnel mcast interface fix
Change-Id: Ica6a0b4133ccc1997ef0547274982d0cc9761724
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-01 11:39:20 +00:00
Ole Troan
703908aaf4 stats: Add interface name to sw_if_index as /if/names
Expose interface name to sw_if_index table as a directory node in the stats segment.

Change-Id: Ie50e4af01997d141880f02e3a8496bfeb91b9944
Signed-off-by: Ole Troan <ot@cisco.com>
2019-02-28 13:25:22 +00:00
Neale Ranns
8b409635b4 VOM: child accessors on GBP route domain
Change-Id: I7b74b0b98b2c427bf29bb1d2932044d9924588cb
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-02-28 09:33:46 +00:00
Neale Ranns
d7d6e97d3c VOM: GBP table IDs in GBP route-domain create
Change-Id: I606b28dfb820f8f19e338c7642bfe0e4c116ca58
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-02-25 19:40:05 +00:00