vpp.git
3 years agovirtio: add vhost sw_if_index filter for sw_interface_vhost_user_dump 30/27130/3
Steven Luong [Tue, 19 May 2020 00:12:56 +0000 (17:12 -0700)]
virtio: add vhost sw_if_index filter for sw_interface_vhost_user_dump

The filter sw_if_index was in the API sw_interface_vhost_user_dump. But
it was never implemented in the backend. This patch is to add the backend,
vat, and custom dump support for the filter.

Type: feature

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Iaa41a7e11bfbcbb4c60092375e4b0dcf0950077b

3 years agogso: fix the udp checksum in test 83/27483/4
Mohsin Kazmi [Wed, 10 Jun 2020 10:35:05 +0000 (12:35 +0200)]
gso: fix the udp checksum in test

Type: fix

Change-Id: I7005e4763e73f3679c40f94bdab26d439cd23188
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agoapi: check id is valid for bounce checking 71/24471/4
Benoît Ganne [Tue, 21 Jan 2020 17:33:14 +0000 (18:33 +0100)]
api: check id is valid for bounce checking

If the id is invalid we cannot check whether we must free the message or
not, free it anyway.

Type: fix

Change-Id: Ie4426f601390d1e5e14c739f670e8c1e6e3aaf1e
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agobuild: remove un-needed script 65/27565/2
Simon Chatterjee [Mon, 15 Jun 2020 17:17:18 +0000 (17:17 +0000)]
build: remove un-needed script

The move to cmake obviates the need for this build script (and its terminology).

Type: make

Signed-off-by: Simon Chatterjee <code@chatts.net>
Change-Id: Ie17429bfdf5a4b02ce2b70ba3568a7445c162d38

3 years agovcl: move helper functions out of header file 37/27537/2
Florin Coras [Mon, 15 Jun 2020 14:59:40 +0000 (07:59 -0700)]
vcl: move helper functions out of header file

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I3889fd80b145cf80f76f6054d63247e76bdf20ff

3 years agobuild: fix the build on centos8 69/27469/2
Yichen Wang [Tue, 9 Jun 2020 00:13:01 +0000 (17:13 -0700)]
build: fix the build on centos8

Add missing dependencies and correct the building to support CentOS8

Type: make

Change-Id: Ie15b9b1174fa9b6d5ae02bace36ebc77e17d770c
Signed-off-by: Yichen Wang <yicwang@cisco.com>
3 years agovxlan: remove judgement with always true 77/27477/2
Zhiyong Yang [Wed, 10 Jun 2020 13:23:50 +0000 (13:23 +0000)]
vxlan: remove judgement with always true

if ((A | B) == false)  it means both A and B are false, so for
the following code

if (PREDICT_FALSE (!good_udp1))
      {
        if ((flags1 & VNET_BUFFER_F_L4_CHECKSUM_COMPUTED) == 0)
          {
              ...
          }
      }
if ((flags1 & VNET_BUFFER_F_L4_CHECKSUM_COMPUTED) == 0) is always
true if the code run it. Remove it.

Type: improvement

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Change-Id: I6bd1e9340c7a00089fc1c9ae49773add832d309e

3 years agobuffers: fix non-default sized buffers initialization 31/27531/2
Benoît Ganne [Mon, 15 Jun 2020 10:24:36 +0000 (12:24 +0200)]
buffers: fix non-default sized buffers initialization

Type: fix

Change-Id: I4a93e1d9936414c514cb237a22624986b3ef5b3d
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agodpdk: cryptodev: fix non-null terminated strings 12/27412/2
Benoît Ganne [Tue, 2 Jun 2020 14:33:26 +0000 (16:33 +0200)]
dpdk: cryptodev: fix non-null terminated strings

Type: fix

Change-Id: Ib6f423e24f1a8d8439cd7e8893e4605e10984d48
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agoikev2: announce both 'ESN' and 'No ESN' 23/27523/2
Filip Tehlar [Sat, 6 Jun 2020 18:45:15 +0000 (18:45 +0000)]
ikev2: announce both 'ESN' and 'No ESN'

Type: fix

Change-Id: If73b88b9478b9314df6d9163c3a13724d4253c80
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agovlib: node recyling and node deletion missing triggering graph node sync 91/27491/6
Steven Luong [Thu, 11 Jun 2020 06:38:41 +0000 (23:38 -0700)]
vlib: node recyling and node deletion missing triggering graph node sync

When recycling a graph node vnet_register_interface, it is missing an
explicit call to vlib_worker_thread_node_runtime_update(). However,
there is an implicit call to vlib_worker_thread_node_runtime_update()
via vnet_sw_interface_set_flags_helper() if it enables a new feature on
the interface for the first time. But that implicit call is not
guaranteed. For example, if an interface is created, deleted, and
created, then it may skip the implicit call to
vlib_worker_thread_node_runtime_update(). When that happens, the graph
nodes on thread 0 are not sync'ed to the worker threads. So the worker
thread's graph nodes are out of sync momentarily with the main thread's
graph nodes until some other event happens which calls for a sync is
needed. During this window, the worker thread's graph node is
vulnerable and may experience a crash.

When deleting a graph node, we never trigger a sync to the worker
thread. A patch was committed 3 years ago via
https://gerrit.fd.io/r/c/vpp/+/7523 to fix a show run crash. In
hindsight, the approach taken by 7523 is not orthogonal. While at it,
let's fix it right for both issues with a call to
vlib_worker_thread_node_runtime_update() in the appropriate place and
remove 7523.

Type: fix
Ticket: VPPSUPP-86
Fixes: gerrit 7523 / 19e9d954bd9eb4f04d48640d6540198e84ef65d7

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ic9472bd2d3a212dbfeceb526506ed0400983a142

3 years agovirtio: interface type based improvements 83/25383/11
Mohsin Kazmi [Wed, 3 Jun 2020 16:20:17 +0000 (18:20 +0200)]
virtio: interface type based improvements

Type: improvement

Change-Id: I220ea6ab609e3c1628f5210be441d0d5e825a32c
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agoip: allocate ip4 mtrie pages in htlb memory 98/27498/2
Dave Barach [Thu, 11 Jun 2020 12:57:52 +0000 (08:57 -0400)]
ip: allocate ip4 mtrie pages in htlb memory

No change in default behavior. To use htlb pages for the ip4 mtrie,
use the "ip" command-line option "mtrie-hugetlb".

Type: improvement

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I5497e426a47200edff2c7e15563ed6a42af12e7f

3 years agoikev2: don't add DH group in ESP transform proposals 92/27492/4
Filip Tehlar [Sat, 6 Jun 2020 01:19:31 +0000 (01:19 +0000)]
ikev2: don't add DH group in ESP transform proposals

Type: fix

Anouncing DH group in esp transform proposals will enable PFS which is
not suppored now. This fixes issue during rekey when using strongswan as
responder.

Change-Id: Ib9f586113ae0ab9dc67e6ceadff43f8aac463820
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agonat: properly scale out2in-ed hash on init 96/27496/1
Klement Sekera [Thu, 11 Jun 2020 10:35:52 +0000 (10:35 +0000)]
nat: properly scale out2in-ed hash on init

Type: fix
Fixes: a1018c166a468f7692ab621c743503914266f508
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I86592f73a60fd146d3764e474f975881e940c244

3 years agonat: simplify bihash buckets/mem config 44/27444/9
Klement Sekera [Fri, 27 Mar 2020 10:54:53 +0000 (11:54 +0100)]
nat: simplify bihash buckets/mem config

Derive reasonable values from max translations/max users.

Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I41a96ab63ab138b4160cd60bd6df24fc73791c86

3 years agovapi: memset allocated messages to zero 72/27472/3
Klement Sekera [Tue, 9 Jun 2020 14:17:45 +0000 (14:17 +0000)]
vapi: memset allocated messages to zero

This avoids using dirty data from shared memory by client.

Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I96eecf655bf344ec29609cedbd8dc891b572e207

3 years agoip: reassembly: LRU algorithm should eliminate the longest unused nodes 09/27209/5
zhengdelun [Fri, 22 May 2020 07:42:28 +0000 (15:42 +0800)]
ip: reassembly: LRU algorithm should eliminate the longest unused nodes

Type: fix

Signed-off-by: zhengdelun <xszhengdelun@gmail.com>
Change-Id: I3f6240b4c0798f85960acc55a193a0cbf0c67ea4

3 years agonat: optimize prefetching 65/27465/2
Klement Sekera [Mon, 8 Jun 2020 11:28:53 +0000 (11:28 +0000)]
nat: optimize prefetching

Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Iea1748e8e39d213fcb3f3b52379bd37a6dd6aa3d

3 years agotap: enable gso/csum offload for tun 51/27451/3
Mohsin Kazmi [Fri, 5 Jun 2020 12:43:38 +0000 (14:43 +0200)]
tap: enable gso/csum offload for tun

Type: improvement

Change-Id: I5b9d5ea192776f14a45bf909acc4bef7793521e8
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agovxlan: fix the inner packet checksum calculation 95/27395/3
Mohsin Kazmi [Tue, 2 Jun 2020 13:21:03 +0000 (15:21 +0200)]
vxlan: fix the inner packet checksum calculation

Type: fix

Change-Id: I1da4ace9f3e548af4b5b3373d695e4214c5df2ff
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agomisc: add code styling for vxlan encap and vxlan_packet files 94/27394/3
Mohsin Kazmi [Tue, 2 Jun 2020 13:12:30 +0000 (15:12 +0200)]
misc: add code styling for vxlan encap and vxlan_packet files

Type: style

Change-Id: Id363ccd0e51c61388fb45ef10685929f629cccbd
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agotcp: improve rtt estimation with rate sampling 59/27459/11
Florin Coras [Sun, 7 Jun 2020 20:06:56 +0000 (20:06 +0000)]
tcp: improve rtt estimation with rate sampling

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I25043da84b2f2b3f37024ecfedac535df3004ea5

3 years agovlib: stop inlining vlib_add_trace(...) 67/27467/2
Dave Barach [Mon, 8 Jun 2020 15:17:19 +0000 (11:17 -0400)]
vlib: stop inlining vlib_add_trace(...)

Packet tracing performance doesn't justify inlining
vlib_add_trace(...) over 500 times.

It makes a 15% text-segment size difference in a representative use-case:

Inline:
$ size .../vnet_skx.dir/ipsec/ipsec_input.c.o
   text    data     bss     dec     hex filename
   6831      80       0    6911    1aff .../vnet_skx.dir/ipsec/ipsec_input.c.o

Not inline:
$ size .../vnet_skx.dir/ipsec/ipsec_input.c.o
   text    data     bss     dec     hex filename
   5776      80       0    5856    16e0 .../vnet_skx.dir/ipsec/ipsec_input.c.o

Retain the original code as vlib_add_trace_inline, instantiate once as
vlib_add_trace.

Type: refactor
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Iaf431dbf00c4aad03663d86f9dd1322e84d03962

3 years agovlib: Coverity fix 66/27466/3
Dave Barach [Mon, 8 Jun 2020 13:40:36 +0000 (09:40 -0400)]
vlib: Coverity fix

Fix a nit warning: we're not likely to create a vlib process with more
than 4gb of stack.

Type: fix
Ticket: VPP-1888

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I8bc7f64287c2802b0c286ce3d04443ac723a9a33

3 years agovxlan: Fixed checksum caclculation offset 95/27195/12
Vladimir Isaev [Thu, 21 May 2020 13:34:17 +0000 (16:34 +0300)]
vxlan: Fixed checksum caclculation offset

VXLAN uses csum_offload for IPv6 packets.

But without gso node we have csum calculated only for inner
packet.
This patch adds support for outer header csum calculation.
Checksum for inner packet should be calculated before
interface-output node (for example in vxlan node).

Type: fix

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Signed-off-by: Vladimir Isaev <visaev@netgate.com>
Change-Id: Ica68429ede4426293769207cd83c791ebe72fe56

3 years agonat: more long read after short write optimization 00/27400/5
Klement Sekera [Tue, 19 May 2020 17:47:23 +0000 (17:47 +0000)]
nat: more long read after short write optimization

Replace whitespread (mis)use of snat_session_key_t by proper function
arguments where applicable and inline functions to calculate hash keys
instead of using structs for that. Make all hash tables use same network
byte order port so that there is no longer a discrepancy between static
mappings using host byte order while in2out/out2in tables using network
byte order.

Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I80786d2f947c67824c101a13bb608f1fe1080f34

3 years agomactime: print error if feature not enabled 58/27458/1
Dave Barach [Sun, 7 Jun 2020 13:18:26 +0000 (09:18 -0400)]
mactime: print error if feature not enabled

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I8fbc4baefecf512573126c5085ed7a6e2e360fbe

3 years agofib: fix multiple dpo pool expand cases 54/27454/2
Dave Barach [Fri, 5 Jun 2020 13:42:50 +0000 (09:42 -0400)]
fib: fix multiple dpo pool expand cases

Add dpo_pool_barrier_sync/release, use them to clean up
thread-unsafe pool expansion cases.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I09299124a25f8d541e3bb4b75375568990e9b911

3 years agofib: fix adj pool expand cases 48/27448/1
Dave Barach [Fri, 5 Jun 2020 11:06:21 +0000 (07:06 -0400)]
fib: fix adj pool expand cases

adj_alloc (...) is not thread safe when the adj pool or combined
counter vectors expand.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I55710de6ecc083b7434e11798659cca9250c9131

3 years agobuild: add libssl-dev library for ubuntu 20.04 17/27417/3
Jieqiang Wang [Thu, 4 Jun 2020 06:09:57 +0000 (14:09 +0800)]
build: add libssl-dev library for ubuntu 20.04

Add the libssl-dev library for ubuntu 20.04 in Makefile.

Type: fix

Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com>
Change-Id: I4187cb041997e7457734ffdb18bdbec98a051669

3 years agofib: add barrier sync, pool/vector expand cases 07/27407/2
Dave Barach [Wed, 3 Jun 2020 12:05:15 +0000 (08:05 -0400)]
fib: add barrier sync, pool/vector expand cases

load_balance_alloc_i(...) is not thread safe when the
load_balance_pool or combined counter vectors expand.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I7f295ed77350d1df0434d5ff461eedafe79131de

3 years agonat: fix coverity warning 42/27442/2
Klement Sekera [Thu, 4 Jun 2020 12:41:43 +0000 (12:41 +0000)]
nat: fix coverity warning

Type: fix

Change-Id: I0e87021b11009a955f5839bdb68af897145816c1
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agoikev2: session cleanup after profile is deleted 88/27188/6
Filip Tehlar [Sun, 10 May 2020 22:13:55 +0000 (22:13 +0000)]
ikev2: session cleanup after profile is deleted

Type: fix

Change-Id: I3198461f3dfc13cd3cedf2b8611dc80bb6f959c8
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agodpdk: cleanup, add rx queue struct 13/27413/2
Damjan Marion [Wed, 3 Jun 2020 18:13:59 +0000 (20:13 +0200)]
dpdk: cleanup, add rx queue struct

Type: improvement
Change-Id: I3defde103ab245404de42d2be7abcb2c43d49a60
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agonat: fixed input validation 10/27410/2
Filip Varga [Wed, 3 Jun 2020 13:26:41 +0000 (15:26 +0200)]
nat: fixed input validation

Ticket: VPP-1887
Type: fix

Change-Id: I341ac7b455926a106d736f4de6771aae655db82e
Signed-off-by: Filip Varga <fivarga@cisco.com>
3 years agonat: add tracing for nat44-hairpinning 88/27288/5
Klement Sekera [Wed, 27 May 2020 12:41:34 +0000 (12:41 +0000)]
nat: add tracing for nat44-hairpinning

Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Ife437f959e29d3de88bd7ee77221ada86fb03e80

3 years agodocs: improve handoff queue writeup 93/27393/2
Dave Barach [Tue, 2 Jun 2020 12:57:36 +0000 (08:57 -0400)]
docs: improve handoff queue writeup

Type: docs
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I4d63a0fbbdb3cc00eac9116f122e5b831d059e33

3 years agovlib: improve node interrupt handling 04/27404/2
Damjan Marion [Wed, 3 Jun 2020 10:20:41 +0000 (12:20 +0200)]
vlib: improve node interrupt handling

 - add ability to pass data together with interrupt
 - avoid locking for local interrupts (same thread)

Type: improvement

Change-Id: I73a2ab2e716bb887a1f02c87788ae83e329f9b40
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agonat: refactor mss_clamping to not depend on snat_main_t 02/27402/1
Ole Troan [Wed, 3 Jun 2020 09:47:55 +0000 (11:47 +0200)]
nat: refactor mss_clamping to not depend on snat_main_t

Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I1110e425859a4f1f07952c91b50f263cb7323836

3 years agobash: functions to set up csit and sandbox env 67/26767/8
Andrew Yourtchenko [Wed, 29 Apr 2020 16:48:24 +0000 (16:48 +0000)]
bash: functions to set up csit and sandbox env

Type: test

Change-Id: Iceaebfe2faf29a893b9571069212e951273c3d2b
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Signed-off-by: John DeNisco <jdenisco@cisco.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
3 years agoikev2: remove unused hash computation 52/27352/3
Filip Tehlar [Mon, 25 May 2020 21:35:55 +0000 (21:35 +0000)]
ikev2: remove unused hash computation

Type: improvement

Change-Id: I99c2383dd0d30efd1837f3d10ff2e4cf3a784283
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agoip: fix IPv6 mask to prefix length conversion 16/27016/3
Andreas Schultz [Tue, 12 May 2020 12:41:16 +0000 (14:41 +0200)]
ip: fix IPv6 mask to prefix length conversion

make sure we don't pass a 0 (zero) to log2.

Type: fix

Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com>
Change-Id: Ib3386ad4686835d3836f48294cee4058e897847a

3 years agonat: update ip4-udp src port for checksum == 0 pkts 47/27347/2
Dave Barach [Fri, 29 May 2020 20:34:50 +0000 (16:34 -0400)]
nat: update ip4-udp src port for checksum == 0 pkts

Otherwise, the out2in path will discard return-path traffic with
probability 1.0.

Type: fix
Fixes: gerrit 23963 / f126e746fc01c75bc99329d10ce9127b26b23814

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I621ed99329c04ef358035747dde599c0016b58f5

3 years agolisp: fix api_format reference 48/27348/1
Paul Vinciguerra [Fri, 29 May 2020 23:01:18 +0000 (19:01 -0400)]
lisp: fix api_format reference

Type: fix
Ticket: VPP-1885

Change-Id: I474fffd4d36f439a19d475a8cb20171ca88274ec
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
3 years agobonding: Revert adjust link state 46/27346/2
Matthew Smith [Fri, 29 May 2020 17:29:45 +0000 (12:29 -0500)]
bonding: Revert adjust link state

This reverts commit 9121c415a91904be50071ec55143d9c89b2f1b91.

Reason for revert: causes deadlock with multiple worker threads

Type: fix

Change-Id: Icf3d6d343d99d887abacbaa03acbf04d4628514e
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
3 years agolisp: fix api_format 45/27345/2
Florin Coras [Fri, 29 May 2020 16:18:57 +0000 (16:18 +0000)]
lisp: fix api_format

Type: fix
Ticket: VPP-1885
Fixes: 58db6e1

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I6431e49b315e09490fed8fd70ac53872836c6a09

3 years agolisp: fix custom dump 32/27332/9
Florin Coras [Thu, 28 May 2020 18:01:26 +0000 (18:01 +0000)]
lisp: fix custom dump

Type: fix
Ticket: VPP-1886
Fixes: 58db6e1

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic40018a756e57bfec05ffbc5e30d18f4feb315db

3 years agofib: Safe adj walk 44/27344/2
Neale Ranns [Fri, 29 May 2020 14:19:41 +0000 (10:19 -0400)]
fib: Safe adj walk

Type: fix

the hash walk does not give the same guarantees as the bihash so
walk in a safe manner.

Change-Id: Idfe48c3a84ab3a341d887f7d196bc81ba34ae8b0
Signed-off-by: Neale Ranns <nranns@cisco.com>
3 years agogso: add checksum and payload size testing 34/27334/2
Mohsin Kazmi [Thu, 28 May 2020 18:49:46 +0000 (20:49 +0200)]
gso: add checksum and payload size testing

Type: test

Change-Id: I9e4f7cf44d465712aa26e5dd6a0ff38588964a39
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agogso: fix flag for inner header 33/27333/2
Mohsin Kazmi [Thu, 28 May 2020 18:56:43 +0000 (20:56 +0200)]
gso: fix flag for inner header

Type: fix

Change-Id: Ic3fc488521636f7f7c9402a20db45fdb599adaae
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agodocs: Minor updates to feature.yaml files 94/27194/3
John DeNisco [Thu, 21 May 2020 13:00:04 +0000 (09:00 -0400)]
docs: Minor updates to feature.yaml files

Type: docs

Signed-off-by: John DeNisco <jdenisco@cisco.com>
Change-Id: Iba106d33d34766b91e46980e7237fbdfc3710b8b

3 years agodocs: Minor fixes in publish_docs.sh and sanitizer.rst 40/27340/2
John DeNisco [Fri, 29 May 2020 12:56:38 +0000 (08:56 -0400)]
docs: Minor fixes in publish_docs.sh and sanitizer.rst

Fix a warning in sanitizer.rst and publish_docs.sh

Type: fix

Signed-off-by: John DeNisco <jdenisco@cisco.com>
Change-Id: I66d724f52a7b724a97a894e1cd35c1239aeedcdf

3 years agomisc: ipfix-export unformat u16 collector_port fix 80/27280/11
Elias Rudberg [Tue, 26 May 2020 23:03:46 +0000 (01:03 +0200)]
misc: ipfix-export unformat u16 collector_port fix

Use %U and unformat_udp_port instead of %u for unformat() call for
u16 collector_port number in set_ipfix_exporter_command_fn() to
avoid corruption of other variables which can happen if unformat()
with %u is used with a 16-bit variable. This avoids crash due to
corrupted fib_index value.

Type: fix

Signed-off-by: Elias Rudberg <elias.rudberg@bahnhof.net>
Change-Id: Id54273fcc458a7f9c5aa4025aa91711f160c1c1a

3 years agomisc: fix the pretty print for api trace 27/27327/2
Mohsin Kazmi [Thu, 28 May 2020 10:37:56 +0000 (12:37 +0200)]
misc: fix the pretty print for api trace

Type: style

Change-Id: I4ef8ba30be2696e8f63d5305027d2aa629cbdb88
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agomisc: Avoid sample.md from in the VPP docs, clean up the extraneous copy 05/27305/3
Andrew Yourtchenko [Thu, 21 May 2020 17:05:41 +0000 (17:05 +0000)]
misc: Avoid sample.md from in the VPP docs, clean up the extraneous copy

I had cleaned up the sample.md previously for 20.01, but when later
that was merged to master, the file was renamed. So, fix this issue.

Change-Id: I6347685af216901fbfdd445606735b9bf79f8fe5
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit e2e3c38be6d91c3deb15373992cd5a764e773060)

3 years agotap: fix rx queue index 69/27269/2
Mohsin Kazmi [Tue, 26 May 2020 12:34:34 +0000 (14:34 +0200)]
tap: fix rx queue index

Type: fix

Change-Id: I5601bdeb47d08118476ff7bd29435d2c1dba34b9
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agodhcp: use per-thread vlib main instead of global one 83/27183/3
Benoît Ganne [Wed, 20 May 2020 16:53:50 +0000 (18:53 +0200)]
dhcp: use per-thread vlib main instead of global one

Type: fix

Change-Id: I8890aa5cc3c576fc9fb68735549dfab721714310
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agodhcp: vat support for the dhcp_client_dump API 75/27275/3
Dave Barach [Tue, 26 May 2020 15:19:28 +0000 (11:19 -0400)]
dhcp: vat support for the dhcp_client_dump API

Also: permanently solve ordering issues with the vpp builtin vat
plugin loader, by explicitly loading vat plugins once we're sure that
all data plane plugins have registered their APIs / API message
handlers.

Fix compilation / link errors when the vpp builtin vat plugin loader
is disbled by cmake configuration.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Id553c63ae860ebfc196c5ad4b55c19e08fec2c9e
Signed-off-by: Ole Troan <ot@cisco.com>
3 years agobuild: make address sanitizer options configurable with cmake 02/27202/3
Damjan Marion [Thu, 21 May 2020 17:09:13 +0000 (19:09 +0200)]
build: make address sanitizer options configurable with cmake

Type: improvement
Change-Id: I9ee0407e0634f773862dd65ff5d5594814294c2c
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoipsec: Add/Del IPSec SA is not MP safe 90/27290/2
Neale Ranns [Wed, 27 May 2020 15:17:24 +0000 (15:17 +0000)]
ipsec: Add/Del IPSec SA is not MP safe

Type: fix

we can probably do better, but for now this is needed

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I07161f5ac07a70a0e6db6608ba31659d9bc2c9ed

3 years agoethernet: fix DMAC check and skip unnecessary ones (VPP-1868) 27/27027/11
John Lo [Wed, 13 May 2020 02:34:39 +0000 (22:34 -0400)]
ethernet: fix DMAC check and skip unnecessary ones (VPP-1868)

Fix and optimize DMAC check in ethernet-input node to utilize NIC or
driver which support L3 DMAC-filtering mode so that DMAC check can be
bypassed safely for interfaces/sub-interfaces in L3 mode.
Checking of interface in L3-DMAC-filtering state to avoid DMAC check
require the following:
a) Fix interface driver init sequence for devices which supports L3
   DMAC-filtering to indicate its capability and initialize interface
   to L3 DMAC-filtering state.
b) Fix ethernet_set_flags() function and its associated callback
   flags_change() functions registered by various drivers in interface
   infra to provide proper L3 DMAC filtering status.
Maintain interface/sub-interface L3 config count so DMAC checks can be
bypassed if L3 forwarding is not setup on any main/sub-interfaces.

Type: fix
Ticket: VPP-1868

Signed-off-by: John Lo <loj@cisco.com>
Change-Id: I204d90459c13e9e486cfcba4e64e3d479bc9f2ae

3 years agodpdk: bump to DPDK v20.05 79/27279/2
Damjan Marion [Tue, 26 May 2020 22:37:49 +0000 (00:37 +0200)]
dpdk: bump to DPDK v20.05

Type: improvement
Change-Id: I5f89fc3d994bd85d2c5138069ea2c58661814228
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovppinfra: fix SIGBUS in bihash init when running unpriviledged, take two 89/27289/1
Damjan Marion [Wed, 27 May 2020 14:43:35 +0000 (16:43 +0200)]
vppinfra: fix SIGBUS in bihash init when running unpriviledged, take two

Looks like MAP_LOCK is not enough, so call mlock(...) instead....

Type: fix
Change-Id: I1bc668a2bf3c861ca1c2d376c0fb6bfea87d4f48
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoip: reassembly: use correct IP header offset 66/27266/4
Klement Sekera [Tue, 26 May 2020 10:38:05 +0000 (10:38 +0000)]
ip: reassembly: use correct IP header offset

Type: fix
Ticket: VPP-1883
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Icf50a645e114fa3b7bd974f8c82f5ceebfcedcd7

3 years agobonding: adjust link state based on active slaves 41/27141/4
Matthew Smith [Mon, 18 May 2020 15:54:17 +0000 (10:54 -0500)]
bonding: adjust link state based on active slaves

Type: improvement

Bond link state is being maintained inconsistently. It is initially set to
up.  If the bond interface admin state is set to down, the link state is
set to down. If the bond interface admin state is set to up, the link
state is only set to up if there are active slave interfaces at that point.
If slaves become active at some later time, it does not get updated. Its
next chance to be updated is the next time the bond interface is set to
admin up.

To address this, do not set the link state to up after creating a bond.
Adjust the link state as slave interfaces are attached or detached
based on whether the bond is getting its first active slave or losing
its last one.

Unit test added to verify correct maintenance of link state.

Change-Id: I31f17321f7f0e727e1ab1e01713423af6566dad9
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
3 years agonat: fix regarding vm arg for vlib_time_now call 81/27281/3
Elias Rudberg [Wed, 27 May 2020 00:15:53 +0000 (02:15 +0200)]
nat: fix regarding vm arg for vlib_time_now call

Change in snat_ipfix_header_create() to use thread-specific
vlib_main_t *vm pointer to avoid problems with different threads
accessing the same vlib_main_t data structure. This avoids
assertion failure when vlib_time_now() is called with a vm
corresponding to a different thread.

Type: fix

Signed-off-by: Elias Rudberg <elias.rudberg@bahnhof.net>
Change-Id: I2096c1debb5688d3b97e5ed9a0ea78d94053d8b7

3 years agoapi: make vpp api handlers endian independent 19/27119/6
Ole Troan [Mon, 18 May 2020 09:14:05 +0000 (11:14 +0200)]
api: make vpp api handlers endian independent

Add a new boolean to signal that the API infrastructure should performan any required
endian conversions for the API handler.

  am->is_autoendian[mm->msg_id_base + VL_API_MAP_ADD_DOMAIN] = 1;

Similarly add new REPLY_ macros that perform endian conversion.

These changes do not change the on-the-wire encoding of the API messages, and therefore the API CRC is not changed.

Type: feature
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I7588f8ccb38b2d1e8d85ea17be99bac43f756267
Signed-off-by: Ole Troan <ot@cisco.com>
3 years agovcl: fix ldp fcntl64 78/27278/8
Florin Coras [Tue, 26 May 2020 19:45:45 +0000 (19:45 +0000)]
vcl: fix ldp fcntl64

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I342d8f928fcc7de74f9bd288c1a5d63ea1f90020

3 years agofib: Fix interpose source reactivate 63/27263/3
Neale Ranns [Tue, 26 May 2020 08:52:55 +0000 (08:52 +0000)]
fib: Fix interpose source reactivate

Type: fix

when the interpose is on an adj-fib and the cover is removed the adj
source will not install. this lead to no path list being found for the
interpose source and a crash. pick a drop path list in this case.

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Ied217da043926c913657080f5ffb151201225d23

3 years agofib: Use basic hash for adjacency neighbour table 30/27230/2
Neale Ranns [Mon, 25 May 2020 09:09:36 +0000 (09:09 +0000)]
fib: Use basic hash for adjacency neighbour table

Type: improvement

a bihash per-interface used too much memory.

Change-Id: I447bb66c0907e1632fa5d886a3600e518663c39e
Signed-off-by: Neale Ranns <nranns@cisco.com>
3 years agovcl: do not propagate epoll events if session closed 38/27238/7
Florin Coras [Tue, 26 May 2020 00:47:52 +0000 (00:47 +0000)]
vcl: do not propagate epoll events if session closed

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I1e9652b476bbc07852b4e701a948c36a0d8c67fa

3 years agopci: improve vfio logging 34/27234/2
Damjan Marion [Mon, 25 May 2020 17:31:42 +0000 (19:31 +0200)]
pci: improve vfio logging

Type: improvement
Change-Id: Ic49a43651b80b79fa278e29964da5cb2ead2a818
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoipsec: DES/3DES fixing the iv_len for openssl crypto 39/27239/2
Rajesh Goel [Tue, 26 May 2020 06:34:18 +0000 (12:04 +0530)]
ipsec: DES/3DES fixing the iv_len for openssl crypto

Type: fix

Signed-off-by: Rajesh Goel <rajegoel@cisco.com>
Change-Id: I8d128598b4c872f19b64c779c19b5908ba2f2c08

3 years agovcl: fix udp connected check 35/27235/2
Florin Coras [Mon, 25 May 2020 18:17:03 +0000 (18:17 +0000)]
vcl: fix udp connected check

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I83dafe10cdc78fbb9a751f32155cd84d281b12d9

3 years agotests: update pip and pip-tools 33/27233/2
Aloys Augustin [Mon, 25 May 2020 16:07:24 +0000 (18:07 +0200)]
tests: update pip and pip-tools

This fixes an issue where the pinned requirements file can be modified
when running the tests.

Change-Id: Ic89d1844d1fd8d00f62211a9b051a26ac34ee316
Type: fix
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
3 years agotcp: fix sack block validation on wrap 37/27237/2
Florin Coras [Mon, 25 May 2020 19:15:56 +0000 (19:15 +0000)]
tcp: fix sack block validation on wrap

Type: fix
Fixes: 487507f

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ia9813ae09d14111dc8edac0fa6ab082e13ab6e2e

3 years agoapi: add new stream message convention 91/20191/15
Ole Troan [Wed, 20 May 2020 13:47:06 +0000 (15:47 +0200)]
api: add new stream message convention

Instead of having to wrap dump/detail calls in control ping, send details messages in between a normal
reply / request pair. As expressed in the below service statement.

Example:

service {
  rpc map_domains_gets returns map_domains_get_reply
    stream map_domain_details;
};

define map_domains_get
{
  u32 client_index;
  u32 context;
  u32 cursor;
};

define map_domains_get_reply
{
  u32 context;
  i32 retval;
  u32 cursor;
};

To avoid blocking the main thread for too long, the replies are now sent in client message queue size
chunks. The reply message returns VNET_API_ERROR_EAGAIN when there is more to read.
The API handler must also include a "cursor" that is used to the next call to the get function.

API handler example:
  REPLY_AND_DETAILS_MACRO (VL_API_MAP_DOMAINS_GET_REPLY, mm->domains,
  ({
    send_domain_details (cursor, rp, mp->context);
  }));

The macro starts from cursor and iterates through the pool
until vl_api_process_may_suspend() returns true or the iteration
reaches the end of the list.

Client Example:

cursor = 0
d = []
while True:
    rv, details = map_domains_get(cursor=cursor)
    d += details
    if rv.retval == 0 or rv.retval != -165:
        break
    cursor = rv.cursor

or the convenience iterator:
for x in vpp.details_iter(vpp.api.map_domains_get):
  pass

or

list(details_iter(map_domains_get))

Change-Id: Iad9f6b41b0ef886adb584c97708dd91cf552749e
Type: feature
Signed-off-by: Ole Troan <ot@cisco.com>
3 years agodpdk: del warnings that duplicate counters in esp 97/27197/2
Alexander Chernavin [Thu, 21 May 2020 14:06:19 +0000 (10:06 -0400)]
dpdk: del warnings that duplicate counters in esp

Type: improvement

Change-Id: I51cbe5c76a88d7fa65fa24dc1528e4f991eba534
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
3 years agovppinfra: fix SIGBUS in bihash init when running unpriviledged 26/27226/1
Damjan Marion [Sun, 24 May 2020 18:43:10 +0000 (20:43 +0200)]
vppinfra: fix SIGBUS in bihash init when running unpriviledged

Obserbed when VPP is running in k8s container.

Type: fix
Change-Id: Ibbff9c3921bd7f4f97d47cb6f10eed8ed5efe269
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovcl: add sendmsg/recvmsg for vlsh in ldp 22/27222/6
Florin Coras [Fri, 22 May 2020 20:36:29 +0000 (20:36 +0000)]
vcl: add sendmsg/recvmsg for vlsh in ldp

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: If61eec3f5723e6b36e6f4a21c05d8d0dd3547fc7

3 years agotcp: track buffer alloc failures 23/27223/3
Florin Coras [Fri, 22 May 2020 21:51:30 +0000 (21:51 +0000)]
tcp: track buffer alloc failures

Reported as part of "show tcp stats"

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I499ab4e41d13aaf1a0d060e37f09087e63d09567

3 years agoipsec: fixed chaining ops after add footer and icv 85/26885/4
PiotrX Kleski [Tue, 5 May 2020 12:14:22 +0000 (14:14 +0200)]
ipsec: fixed chaining ops after add footer and icv

In case there is no free space in first buffer for ICV and footer,
additional buffer will be added, but esp_encrypt will stay in single
buffer mode.
The issue happens for the following payload sizes:
 - TCP packets with payload 1992
 - ICMP packets with payload 2004

This fix moves the single/chained buffer ops selection to after
esp_add_footer_and_icv call.

Type: fix

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Signed-off-by: PiotrX Kleski <piotrx.kleski@intel.com>
Change-Id: Ic5ceba418f738933f96edb3e489ca2d149033b79

3 years agovppinfra: remove include 21/27221/2
Damjan Marion [Fri, 22 May 2020 17:00:25 +0000 (19:00 +0200)]
vppinfra: remove include

Type: refactor
Change-Id: Iea83e0ea8a6e13f3c9ece1a13f891c1fa0956711
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoavf: interrupt mode, support for WB_ON_ITR 19/27219/2
Damjan Marion [Fri, 22 May 2020 15:53:49 +0000 (17:53 +0200)]
avf: interrupt mode, support for WB_ON_ITR

Type: improvement
Change-Id: I5c944c3f82e0f278b64f28e09a74f24514c029f0
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoavf: improve link speed handling 18/27218/1
Damjan Marion [Fri, 22 May 2020 15:22:41 +0000 (17:22 +0200)]
avf: improve link speed handling

Support VIRTCHNL_VF_CAP_ADV_LINK_SPEED.

Type: improvement
Change-Id: Ie45c9d557d0369464cbb6881ee1259ef3807d7d5
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agonat: fix dslite session port allocation 04/27204/2
Vladimir Ratnikov [Thu, 21 May 2020 17:52:51 +0000 (13:52 -0400)]
nat: fix dslite session port allocation

Fix allocation of port per dslite session.
After each session is created per protocol,
when new one should be created with new port,
instead it's trying to create with the same port
and while(1) loop is executed forever and VPP does
not response

Type: fix

Signed-off-by: Vladimir Ratnikov <vratnikov@netgate.com>
Change-Id: Ic91b8b07253498ef9846ca60bcd4c4c76a5fac91

3 years agonat: output fib index fix 96/27196/2
Filip Varga [Wed, 20 May 2020 12:34:01 +0000 (14:34 +0200)]
nat: output fib index fix

Type: fix

Change-Id: I7cb7e3716aee865b12235865009e39ed6ad16680
Signed-off-by: Filip Varga <fivarga@cisco.com>
3 years agovlib: enforce buffer alloc return value check 14/26414/4
Damjan Marion [Tue, 7 Apr 2020 22:52:53 +0000 (00:52 +0200)]
vlib: enforce buffer alloc return value check

Type: improvement
Change-Id: I33cd702f9c4d995520509fdb16e3b8f8fd50e535
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovcl: support connected udp listens 11/27111/4
Florin Coras [Sat, 16 May 2020 18:18:14 +0000 (18:18 +0000)]
vcl: support connected udp listens

Request connected udp listener behavior by setting
VPPCOM_ATTR_SET_CONNECTED attribute with vppcom_session_attr

Type: feature

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iba95155c0f41cea8c6e1a4263946270d49c213ac

3 years agoip: Dual loop error in midchain chksum 87/27187/2
Neale Ranns [Wed, 20 May 2020 19:58:20 +0000 (19:58 +0000)]
ip: Dual loop error in midchain chksum

Type: fix

Change-Id: Idf7c80b7d81f796bd0512bca4276bcfcf2af241a
Signed-off-by: Neale Ranns <nranns@cisco.com>
3 years agovlib: mmap process stacks 84/27184/4
Damjan Marion [Wed, 20 May 2020 20:01:44 +0000 (22:01 +0200)]
vlib: mmap process stacks

Instead of allocating stack from the main heap, this patch mmaps stack
memory together with guard page.

This aproach reduces main heap usage, and stack memory is prefaulted
on demand, so bigger process stacks will have zero impact on memory
usage as long as stack memory is not needed for real.

In addition, it fixes issue with systems which have bigger default page
size (observed with 65536).

Type: improvement
Change-Id: I593365c603d4702e428967d80fd425fdee2c4a21
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agodocs: asan: update doc to match current status 76/26976/2
Benoît Ganne [Mon, 11 May 2020 13:53:54 +0000 (15:53 +0200)]
docs: asan: update doc to match current status

Type: docs

Change-Id: I45265876c9c778f6b91d39f30eb6035f14d166ec
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agovcl: nest vcl_mq_epfd to support epoll_wait without high CPU usage 34/27134/4
hanlin [Tue, 19 May 2020 09:34:17 +0000 (17:34 +0800)]
vcl: nest vcl_mq_epfd to support epoll_wait without high CPU usage

Now, libc epfd and vls epfd are independent and can only epoll_wait independently without timeout, then app calling epoll_wait will occupy high CPU. So we nest vcl_mq_epfd into libc epfd when using eventfd with VPP, and then we can only epoll_wait libc epfd with specified timeout.

Type: feature
Signed-off-by: hanlin <hanlin_wang@163.com>
Change-Id: I6b6e0f501c769e186714bfbc187cfaed2533b4c2
Signed-off-by: hanlin <hanlin_wang@163.com>
3 years agosrv6-mobile: Update the doc for gtp4.dt and gtp6.dt funcitons. 18/27118/4
Satoru Matsushima [Mon, 18 May 2020 08:33:57 +0000 (17:33 +0900)]
srv6-mobile: Update the doc for gtp4.dt and gtp6.dt funcitons.

Document update to reflect merged SRv6 functions of lookup and forwarding for inner IP packet encapsulated with outer IP and GTP-U headers.

Type: docs

Signed-off-by: Satoru Matsushima <satoru.matsushima@gmail.com>
Change-Id: I85c9ddf6bf9fa63f2b8b6e03eff3ecec1e7615ab

3 years agovppinfra: refactor mpcap.h 40/27140/2
Dave Barach [Tue, 19 May 2020 13:56:22 +0000 (09:56 -0400)]
vppinfra: refactor mpcap.h

vppinfra source files MUST NOT #include <vlib/vlib.h>, <vnet/vnet.h>
or similar. Move mpcap_add_packet(...), mpcap_add_buffer(...) to a new
file: src/vnet/mpcap.h.

Type: refactor
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Id517aef6fe49b618f853ce32940b91ba45a1e60d

3 years agodpdk: change netvsc device port type 21/26221/4
Matthew Smith [Mon, 23 Mar 2020 16:27:49 +0000 (11:27 -0500)]
dpdk: change netvsc device port type

Netvsc devices have the port type determined from their link speed.
The link speed between reboots of an Azure VM does not always end
up at the same value, so an interface that was FortyGigabitEthernet0
earlier may be FiftyGigabitEthernet0 now. That makes it difficult
to maintain a persistent store of configurations and apply those at
startup.

Change the port type to be VF so the name will always be generated
as VirtualFunctionEthernetX.

Type: improvement

Change-Id: I58cab852b87c0bcd9f73afe239803f38dab5c159
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
3 years agodpdk: fix pktmbuf pool private data init 39/27139/2
Benoît Ganne [Tue, 19 May 2020 12:15:41 +0000 (14:15 +0200)]
dpdk: fix pktmbuf pool private data init

Type: fix

Change-Id: I7349840af48eec209532dab43a8ad0bd68993268
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agovppapigen: handle new api file for crcchekcer 37/27137/1
Ole Troan [Tue, 19 May 2020 10:33:00 +0000 (12:33 +0200)]
vppapigen: handle new api file for crcchekcer

Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I1b3ae8b348eb3cba628a55ea3e72e85b9a4288d5

3 years agointerface: fix interface rx mode config API 79/26879/5
Jakub Grajciar [Tue, 5 May 2020 10:30:30 +0000 (12:30 +0200)]
interface: fix interface rx mode config API

Swap byte order for fields of type vl_api_rx_mode_t.

Ticket: VPP-1871
Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Ia1745257b57209d41661d38067e0dd7618f9a9b9
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
(cherry picked from commit aefcd1a3579ec2c93f606b151d563d87ea211387)