History log of /dpdk/app/test/test_cmdline_ipaddr.c (Results 1 – 17 of 17)
Revision Date Author Comments
# 52e04a63 18-Oct-2024 Robin Jarry <rjarry@redhat.com>

cmdline: use IPv6 address structure

The previous commits introduced a new rte_ipv6_addr structure without
any alignment requirements. It is not compatible with the in6_addr POSIX
type available in n

cmdline: use IPv6 address structure

The previous commits introduced a new rte_ipv6_addr structure without
any alignment requirements. It is not compatible with the in6_addr POSIX
type available in netinet/in.h.

The main issue is that in6_addr is not uniform on all platforms which
causes unaligned access warnings when compiling without
-Wno-address-of-packed-member (set in dpdk by default).

In order to have a consistent code base, replace in6_addr with
rte_ipv6_addr in the cmdline library. Update all code accordingly.

Signed-off-by: Robin Jarry <rjarry@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

show more ...


# 987d40a0 26-Jan-2022 Jie Zhou <jizh@linux.microsoft.com>

test: remove POSIX-specific code

- Replace POSIX-specific code with DPDK equivalents or
conditionally disable it on Windows
- Use NUL on Windows as /dev/null for Unix
- Exclude tests not supported

test: remove POSIX-specific code

- Replace POSIX-specific code with DPDK equivalents or
conditionally disable it on Windows
- Use NUL on Windows as /dev/null for Unix
- Exclude tests not supported on Windows yet
* multi-process
* PMD performance statistics display on signal

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>

show more ...


# 414245bb 20-Apr-2021 Kevin Traynor <ktraynor@redhat.com>

test/cmdline: fix inputs array

clang 12 gives a warning about string concatenation in arrays.
In this case it looks like it was unintentional to concatenate
the strings. Separate with a comma.

$ cl

test/cmdline: fix inputs array

clang 12 gives a warning about string concatenation in arrays.
In this case it looks like it was unintentional to concatenate
the strings. Separate with a comma.

$ clang --version
clang version 12.0.0 (Fedora 12.0.0-0.3.rc1.fc34)

../app/test/test_cmdline_ipaddr.c:259:3: warning:
suspicious concatenation of string literals in an array initialization;
did you mean to separate the elements with a comma?
[-Wstring-concatenation]
"random invalid text",
^
../app/test/test_cmdline_ipaddr.c:258:3: note:
place parentheses around the string literal to silence warning
"1234:1234:1234:1234:1234:1234:1234:1234:1234:1234:1234"
^

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>

show more ...


# 71bdd8a1 24-Jan-2020 Pavan Nikhilesh <pbhagavatula@marvell.com>

app: use common macro RTE_DIM

Use RTE_DIM macro to calculate array size.

Suggested-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by:

app: use common macro RTE_DIM

Use RTE_DIM macro to calculate array size.

Suggested-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>

show more ...


# 08a23478 08-Nov-2019 Stephen Hemminger <stephen@networkplumber.org>

cmdline: remove unnecessary #ifdef

The #ifdef to conditionally include <sys/socket.h> on BSD
is unnecessary. It is harmless to include the header on other
OS's. An extra include is better than an #i

cmdline: remove unnecessary #ifdef

The #ifdef to conditionally include <sys/socket.h> on BSD
is unnecessary. It is harmless to include the header on other
OS's. An extra include is better than an #ifdef.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>

show more ...


# 14cba9ee 06-Nov-2019 Thomas Monjalon <thomas@monjalon.net>

cmdline: replace FreeBSD ifdef for IP address parsing

The constants like AF_INET are in sys/socket.h in FreeBSD.
The #ifdef macro __FreeBSD__ is replaced with RTE_EXEC_ENV_FREEBSD
in order to be con

cmdline: replace FreeBSD ifdef for IP address parsing

The constants like AF_INET are in sys/socket.h in FreeBSD.
The #ifdef macro __FreeBSD__ is replaced with RTE_EXEC_ENV_FREEBSD
in order to be consistent across DPDK files, and allow to grep
for EXEC_ENV among other benefits.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>

show more ...


# 384b0a33 12-Aug-2019 David Marchand <david.marchand@redhat.com>

clean bare metal support traces

Bare metal support has been gone for quite some time but we still had
some checks on system includes.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked

clean bare metal support traces

Bare metal support has been gone for quite some time but we still had
some checks on system includes.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>

show more ...


# a9de470c 26-Feb-2019 Bruce Richardson <bruce.richardson@intel.com>

test: move to app directory

Since all other apps have been moved to the "app" folder, the autotest app
remains alone in the test folder. Rather than having an entire top-level
folder for this, we ca

test: move to app directory

Since all other apps have been moved to the "app" folder, the autotest app
remains alone in the test folder. Rather than having an entire top-level
folder for this, we can move it back to where it all started in early
versions of DPDK - the "app/" folder.

This move has a couple of advantages:
* This reduces clutter at the top level of the project, due to one less
folder.
* It eliminates the separate build task necessary for building the
autotests using make "make test-build" which means that developers are
less likely to miss something in their own compilation tests
* It re-aligns the final location of the test binary in the app folder when
building with make with it's location in the source tree.

For meson builds, the autotest app is different from the other apps in that
it needs a series of different test cases defined for it for use by "meson
test". Therefore, it does not get built as part of the main loop in the
app folder, but gets built separately at the end.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

show more ...


# 7d3b1ec4 16-Feb-2017 Ferruh Yigit <ferruh.yigit@intel.com>

test: move unit tests to separate directory

This is to logically group unit tests into their own folder,
separating them from "app" folder.

Hopefully this will make the unit test in DPDK more visib

test: move unit tests to separate directory

This is to logically group unit tests into their own folder,
separating them from "app" folder.

Hopefully this will make the unit test in DPDK more visible.

Following binaries moved to "test" folder:
cmdline-test
test-acl
test-pipeline
test <-- various DPDK unit tests

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

show more ...


# aaa662e7 05-Dec-2014 Alan Carew <alan.carew@intel.com>

cmdline: fix overflow on bsd

When using test-pmd with flow director in FreeBSD, the application will
segfault/Bus error while parsing the command-line. This is due to how
each commands result struct

cmdline: fix overflow on bsd

When using test-pmd with flow director in FreeBSD, the application will
segfault/Bus error while parsing the command-line. This is due to how
each commands result structure is represented during parsing, where the offsets
for each tokens value is stored in a character array(char result_buf[BUFSIZ])
in cmdline_parse()(./lib/librte_cmdline/cmdline_parse.c).

The overflow occurs where BUFSIZ is less than the size of a commands result
structure, in this case "struct cmd_pkt_filter_result"
(app/test-pmd/cmdline.c) is 1088 bytes and BUFSIZ on FreeBSD is 1024 bytes as
opposed to 8192 bytes on Linux.

The problem can be reproduced by running test-pmd on FreeBSD:
./testpmd -c 0x3 -n 4 -- -i --portmask=0x3 --pkt-filter-mode=perfect
And adding a filter:
add_perfect_filter 0 udp src 192.168.0.0 1024 dst 192.168.0.0 1024 flexbytes
0x800 vlan 0 queue 0 soft 0x17

This patch removes the OS dependency on BUFSIZ and defines and uses a
library #define CMDLINE_PARSE_RESULT_BUFSIZE 8192

Added boundary checking to ensure this buffer size cannot overflow, with
an error message being produced.

Suggested-by: Olivier Matz <olivier.matz@6wind.com>
http://git.droids-corp.org/?p=libcmdline.git;a=commitdiff;h=b1d5b169352e57df3fc14c51ffad4b83f3e5613f

Signed-off-by: Alan Carew <alan.carew@intel.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Tested-by: Bruce Richardson <bruce.richardson@intel.com>

show more ...


# 6f41fe75 24-Jun-2014 Stephen Hemminger <stephen@networkplumber.org>

eal: deprecate rte_snprintf

The function rte_snprintf serves no useful purpose. It is the
same as snprintf() for all valid inputs. Deprecate it and
replace all uses in current code.

Leave the tests

eal: deprecate rte_snprintf

The function rte_snprintf serves no useful purpose. It is the
same as snprintf() for all valid inputs. Deprecate it and
replace all uses in current code.

Leave the tests for the deprecated function in place.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>

show more ...


# 3031749c 03-Jun-2014 Bruce Richardson <bruce.richardson@intel.com>

remove trailing whitespaces

This commit removes trailing whitespace from lines in files. Almost all
files are affected, as the BSD license copyright header had trailing
whitespace on 4 lines in it [

remove trailing whitespaces

This commit removes trailing whitespace from lines in files. Almost all
files are affected, as the BSD license copyright header had trailing
whitespace on 4 lines in it [hence the number of files reporting 8 lines
changed in the diffstat].

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
[Thomas: remove spaces before tabs in libs]
[Thomas: remove more trailing spaces in non-C files]
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>

show more ...


# 764bf268 10-Feb-2014 Bruce Richardson <bruce.richardson@intel.com>

add FreeBSD support

Changes to allow compilation and use on FreeBSD. Includes:
* contigmem and nic_uio driver for FreeBSD
* new EAL instance
* new "bsdapp" compilation target
* various compilation f

add FreeBSD support

Changes to allow compilation and use on FreeBSD. Includes:
* contigmem and nic_uio driver for FreeBSD
* new EAL instance
* new "bsdapp" compilation target
* various compilation fixes due to differences between linux and freebsd

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

show more ...


# e9d48c00 10-Feb-2014 Bruce Richardson <bruce.richardson@intel.com>

update Intel copyright years to 2014

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>


# 1c1d4d7a 18-Sep-2013 Intel <intel.com>

doc: whitespace changes in licenses

Signed-off-by: Intel


# b6df9fc8 12-Mar-2013 Intel <intel.com>

update copyright date to 2013

Signed-off-by: Intel


# dbb860e0 19-Dec-2012 Intel <intel.com>

cmdline: tests

Signed-off-by: Intel