Age | Commit message (Collapse) | Author | Files | Lines |
|
Change-Id: Ib99058323c50f20fcdb44185aee027c5c6ef8c91
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
|
|
Change-Id: I2e311f8b7f50133678b9172e8d071826af491609
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
|
|
Saves memory at no appreciable performance cost.
before:
DBGvpp# sh fib mem
FIB memory
Name Size in-use /allocated totals
Entry 80 7 / 150 560/12000
after:
DBGvpp# sh fib mem
FIB memory
Name Size in-use /allocated totals
Entry 72 7 / 7 504/504
Change-Id: Ic5d3920ceb57b54260dc9af2078c26484335fef1
Signed-off-by: Neale Ranns <nranns@cisco.com>
|
|
- Global variables declared in header files without
the use of the 'extern' keword will result in multiple
instances of the variable to be created by the compiler
-- one for each different source file in which the
the header file is included. This results in wasted
memory allocated in the BSS segments as well as
potentially introducing bugs in the application.
Change-Id: I6ef1790b60a0bd9dd3994f8510723decf258b0cc
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
|
|
- always use 'va_args' as pointer in all format_* functions
- u32 for all 'indent' params as it's declaration was inconsistent
Change-Id: Ic5799309a6b104c9b50fec309cba789c8da99e79
Signed-off-by: Christophe Fontaine <christophe.fontaine@enea.com>
|
|
Change-Id: I0f58100a944e36f5b530101178303d4595b3207f
Signed-off-by: dongjuan <dong.juan1@zte.com.cn>
|
|
Change-Id: Ib7824bfc08cb3c8f20258379e1a1f2c159c4f687
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
crc_u32 was not defined for non x86_64 with SSE4.2 processors.
Calls to "crc_u32" are removed and replaced by either a call to
clib_crc32c or a call to clib_xxhash, as the result is not used
as a check value but as a hash.
Change-Id: I3af4d68e2e5ebd0c9b0a6090f848d043cb0f20a2
Signed-off-by: Christophe Fontaine <christophe.fontaine@enea.com>
|
|
(VPP-708)
Change-Id: I9ad636f80bf109ffac9ca1b6d80d5f2c31f2076a
Signed-off-by: Matus Fabian <matfabia@cisco.com>
|
|
tests). The DPO was incorrectly initialised with FIB_PROTO_MAX
Change-Id: I962df9e162e4dfb6837a5ce79ea795d5ff2d7315
Signed-off-by: Neale Ranns <nranns@cisco.com>
|
|
indirectiob throught the map-DPO
Change-Id: Ifb72a1c1258440fdc4845aca8aecf2abd63526b1
Signed-off-by: Neale Ranns <nranns@cisco.com>
|
|
after:
TenGigabitEthernet5/0/1-output active 107522 17375708 0 7.22e0 161.60
TenGigabitEthernet5/0/1-tx active 107522 17375708 0 6.93e1 161.60
ip4-input-no-checksum active 107522 17375708 0 2.52e1 161.60
ip4-lookup active 107522 17375708 0 3.10e1 161.60
ip4-rewrite active 107522 17375708 0 2.52e1 161.60
before
TenGigabitEthernet5/0/1-output active 433575 110995200 0 6.95e0 256.00
TenGigabitEthernet5/0/1-tx active 433575 110995200 0 7.14e1 256.00
ip4-input-no-checksum active 433575 110995200 0 2.66e1 256.00
ip4-lookup active 433575 110995200 0 3.29e1 256.00
ip4-rewrite active 433575 110995200 0 2.59e1 256.00
Change-Id: I46405bd22189f48a39f06e3443bb7e13f410b539
Signed-off-by: Neale Ranns <nranns@cisco.com>
|
|
next-hops. UT checks for no-leftover-state now pass
Change-Id: I9e980ee117c0b6aebc6c7a0fcc153a7c0eaf0c72
Signed-off-by: Neale Ranns <nranns@cisco.com>
|
|
Change-Id: I9ea16881caf7aee57f0daf4ac2e8b82c672f87e9
Signed-off-by: Neale Ranns <nranns@cisco.com>
|
|
In the CLI parsing, below is a common pattern:
/* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
return 0;
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (line_input, "x"))
x = 1;
:
else
return clib_error_return (0, "unknown input `%U'",
format_unformat_error, line_input);
}
unformat_free (line_input);
The 'else' returns if an unknown string is encountered. There a memory
leak because the 'unformat_free(line_input)' is not called. There is a
large number of instances of this pattern.
Replaced the previous pattern with:
/* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
return 0;
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (line_input, "x"))
x = 1;
:
else
{
error = clib_error_return (0, "unknown input `%U'",
format_unformat_error, line_input);
goto done:
}
}
/* ...Remaining code... */
done:
unformat_free (line_input);
return error;
}
In multiple files, 'unformat_free (line_input);' was never called, so
there was a memory leak whether an invalid string was entered or not.
Also, there were multiple instance where:
error = clib_error_return (0, "unknown input `%U'",
format_unformat_error, line_input);
used 'input' as the last parameter instead of 'line_input'. The result
is that output did not contain the substring in error, instead just an
empty string. Fixed all of those as well.
There are a lot of file, and very mind numbing work, so tried to keep
it to a pattern to avoid mistakes.
Change-Id: I8902f0c32a47dd7fb3bb3471a89818571702f1d2
Signed-off-by: Billy McFall <bmcfall@redhat.com>
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: I7b51f88292e057c6443b12224486f2d0c9f8ae23
Signed-off-by: Damjan Marion <damarion@cisco.com>
|