aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip_types_api.c
AgeCommit message (Collapse)AuthorFilesLines
2019-10-30ip: cleanup typos in documentationPaul Vinciguerra1-1/+1
Type: style Change-Id: I7d44b7fab1b8b196e4934cb4832ee51084c5bf98 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-07-26dhcp ip: DSCP settings for transmitted DHCP packetsNeale Ranns1-0/+12
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-06-26api: refactor format_vl_api_prefix_t return keysPaul Vinciguerra1-2/+2
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-18fib: fib api updatesNeale Ranns1-0/+3
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-04Punt: specify packets by IP protocol TypeNeale Ranns1-13/+12
Change-Id: I0c2d6fccd95146e52bb88ca4a6e84554d5d6b2ed Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-05-28Punt: socket register for exception dispatched/punted packets based on reasonNeale Ranns1-0/+67
- add to the Punt API to allow different descriptions of the desired packets: UDP or exceptions - move the punt nodes into punt_node.c - improve tests (test that the correct packets are punted to the registered socket) Change-Id: I1a133dec88106874993cba1f5a439cd26b2fef72 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-01-30Use IP and MAC API types for neighborsNeale Ranns1-2/+26
use address_t and mac_address_t for IPv6 and ARP entries and all other API calls in ip.api aprat from the route ones, that will follow in a separate commit Change-Id: I67161737c2184d3f8fc1e79ebd2b55121c5b0191 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-12-13make build failure.Paul Vinciguerra1-2/+2
[84/597] Building C object vnet/CMakeFiles/vnet.dir/ip/ip_types_api.c.o FAILED: ccache /usr/lib/ccache/cc -DWITH_LIBSSL=1 -Dvnet_EXPORTS -I/vpp/src -I. -Iinclude -march=corei7 -mtune=corei7-avx -g -O2 -DFORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror -fPIC -Wno-address-of-packed-member -Wall -MMD -MT vnet/CMakeFiles/vnet.dir/ip/ip_types_api.c.o -MF vnet/CMakeFiles/vnet.dir/ip/ip_types_api.c.o.d -o vnet/CMakeFiles/vnet.dir/ip/ip_types_api.c.o -c /vpp/src/vnet/ip/ip_types_api.c /vpp/src/vnet/ip/ip_types_api.c: In function 'ip_address_union_encode': /vpp/src/vnet/ip/ip_types_api.c:70:13: error: incompatible type for argument 1 of 'memcpy' memcpy (out->ip6, &in->ip6, sizeof (out->ip6)); ^ In file included from /usr/include/string.h:635:0, from /vpp/src/vppinfra/string.h:55, from /vpp/src/vppinfra/mem.h:55, from /vpp/src/vppinfra/vec.h:42, from /vpp/src/vppinfra/error.h:53, from /vpp/src/vppinfra/hash.h:41, from /vpp/src/vnet/ip/ip.h:43, from /vpp/src/vnet/ip/ip_types_api.h:23, from /vpp/src/vnet/ip/ip_types_api.c:16: /usr/include/x86_64-linux-gnu/bits/string3.h:50:42: note: expected 'void * restrict' but argument is of type 'vl_api_ip6_address_t {aka struct _vl_api_ip6_address}' __NTH (memcpy (void *__restrict __dest, const void *__restrict __src, ^ /vpp/src/vnet/ip/ip_types_api.c:72:13: error: incompatible type for argument 1 of 'memcpy' memcpy (out->ip4, &in->ip4, sizeof (out->ip4)); ^ In file included from /usr/include/string.h:635:0, from /vpp/src/vppinfra/string.h:55, from /vpp/src/vppinfra/mem.h:55, from /vpp/src/vppinfra/vec.h:42, from /vpp/src/vppinfra/error.h:53, from /vpp/src/vppinfra/hash.h:41, from /vpp/src/vnet/ip/ip.h:43, from /vpp/src/vnet/ip/ip_types_api.h:23, from /vpp/src/vnet/ip/ip_types_api.c:16: /usr/include/x86_64-linux-gnu/bits/string3.h:50:42: note: expected 'void * restrict' but argument is of type 'vl_api_ip4_address_t {aka struct _vl_api_ip4_address}' __NTH (memcpy (void *__restrict __dest, const void *__restrict __src, ^ /vpp/src/vnet/ip/ip_types_api.c: At top level: cc1: error: unrecognized command line option '-Wno-address-of-packed-member' [-Werror] cc1: all warnings being treated as errors [84/597] Building C object vnet/CMakeFiles/vnet.dir/ip/ip4_forward.c.o ninja: build stopped: subcommand failed. Makefile:691: recipe for target 'vpp-build' failed make[1]: *** [vpp-build] Error 1 make[1]: Leaving directory '/vpp/build-root' Makefile:394: recipe for target 'test' failed make: *** [test] Error 2 DBGvpp# show cpu Model name: Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz Microarchitecture: Haswell (Crystalwell) Flags: sse3 ssse3 sse41 sse42 avx avx2 aes invariant_tsc Base frequency: 2.49 GHz DBGvpp# show version verbose Version: v19.01-rc0~447-g3be662f Compiled by: vagrant Compile host: vpp Compile date: Mon Dec 10 14:55:24 PST 2018 Compile location: /vpp Compiler: GCC 5.4.0 20160609 Current PID: 14104 Change-Id: I6ff03bc5ad1c3517256e244b6986e9a1507a3349 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-12-06API: Change ip4_address and ip6_address to use type alias.Ole Troan1-2/+2
Change-Id: Id8669bbadd1d6b2054865a310a654e9b38d1667d Signed-off-by: Ole Troan <ot@cisco.com>
2018-11-07GBP Endpoint LearningNeale Ranns1-0/+1
Learning GBP endpoints over vxlan-gbp tunnels Change-Id: I1db9fda5a16802d9ad8b4efd4e475614f3b21502 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-11-05Genric API types format/unformat support for VAT and custom dumpNeale Ranns1-39/+0
Change-Id: I8bc3a991f0ede0605d78b51ba609fbe5889513f2 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-23c11 safe string handling supportDave Barach1-1/+1
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
2018-08-10Use IP address types on UDP encap APINeale Ranns1-30/+113
Change-Id: I3c714c519b6d0009329b50947ce250c18ee2a85a Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-07-09IGMP improvementsNeale Ranns1-0/+105
- Enable/Disable an interface for IGMP - improve logging - refactor common code - no orphaned timers - IGMP state changes in main thread only - Large groups split over multiple state-change reports - SSM range configuration API. - more tests Change-Id: If5674f1044e7e97274a711f47807c9ba689d7b9a Signed-off-by: Neale Ranns <nranns@cisco.com>