Introduce the RTE_LOG_REGISTER macro to avoid the code duplication
in the logtype registration process.
It is a wrapper macro for declaring the logtype, registering it and
setting its level in the constructor context.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Sachin Saxena <sachin.saxena@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
The macros RTE_MARKER and __rte_cache_aligned can be used
for consistency for describing MEMIF_CACHELINE_ALIGN_MARK.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Remove setting ALLOW_EXPERIMENTAL_API individually for each Makefile and
meson.build. Instead, enable ALLOW_EXPERIMENTAL_API flag across app, lib
and drivers.
This changes reduces the clutter across the project while still
maintaining the functionality of ALLOW_EXPERIMENTAL_API i.e. warning
external applications about experimental API usage.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
This patch fixes the situation when there is already connected pair of
memif interfaces and another slave tries to initiate the connection with
(already occupied) master. Expected behavior is that the second slave
is refused and gets disconnect message with reason: "Already connected",
while old connection remains functional.
Fixes: 09c7e63a71 ("net/memif: introduce memory interface PMD")
Cc: stable@dpdk.org
Signed-off-by: Július Milan <jmilan.dev@gmail.com>
Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
With this patch it is possible to connect 2 DPDK memifs into loopback,
i.e. when they have the same id and different roles, as for example:
"--vdev=net_memif0,role=master,id=0"
"--vdev=net_memif1,role=slave,id=0"
Signed-off-by: Július Milan <jmilan.dev@gmail.com>
Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
This information is useful or needed for user applications as t-rex.
Signed-off-by: Július Milan <jmilan.dev@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Merge all versions in linker version script files to DPDK_20.0.
This commit was generated by running the following command:
:~/DPDK$ buildtools/update-abi.sh 20.0
Signed-off-by: Pawel Modrak <pawelx.modrak@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Since the library versioning for both stable and experimental ABI's is
now managed globally, the LIBABIVER and version variables no longer
serve any useful purpose, and can be removed.
The replacement in Makefiles was done using the following regex:
^(#.*\n)?LIBABIVER\s*:=\s*\d+\n(\s*\n)?
(LIBABIVER := numbers, optionally preceded by a comment and optionally
succeeded by an empty line)
The replacement for meson files was done using the following regex:
^(#.*\n)?version\s*=\s*\d+\n(\s*\n)?
(version = numbers, optionally preceded by a comment and optionally
succeeded by an empty line)
[David]: those variables are manually removed for the files:
- drivers/common/qat/Makefile
- lib/librte_eal/meson.build
[David]: the LIBABIVER is restored for the external ethtool example
library.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Zero-copy slave support for memif PMD.
Slave interface exposes DPDK memory to
master interface. Only single file segments
are supported (EAL option --single-file-segments).
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
When Multiple slave/master Memif's interfaces are created in single
process data transmission over second connection is not successful.
Issue is because of "mq->in_port" is not initialized with
"dev->data->port_id" in memif_tx_queue_setup() function, and while
transmitting packets over second connection in eth_memif_tx function
it refer "mq->in_port" which is always zero, which leads to data
transmission always in 0th port.
To mitigate the issue,"mq->in_port" is initialized with
"dev->data->port_id" in memif_tx_queue_setup() function.
Signed-off-by: Anand Sunkad <anand.sunkad@benisontech.com>
Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
Define MEMIF_SOCKET_UN_SIZE to size of unix domain socket address.
Report error in case of longer path.
Fixes: b923866c69 ("net/memif: allow for full key size in socket name")
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Using 'rte_mb' to synchronize the shared ring head/tail between producer
and consumer will stall the pipeline and damage performance on the weak
memory model platforms, such like aarch64. Meanwhile update the shared
ring head and tail are observable and ordered between CPUs on IA.
Optimized this full barrier with the one-way barrier can improve the
throughput. On aarch64 n1sdp server this patch make testpmd throughput
boost 2.1%. On Intel E5-2640, testpmd got 3.98% performance gain.
Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
The return value of rte_eth_link_get() was changed from void to int.
Update the usage of the function according to the new return type.
Just log error if something goes wrong.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Change return value of the callbacks from void to int. Make
implementations across all drivers return negative errno
values in case of error conditions.
Both callbacks are updated together because a large number of
drivers assign the same function to both callbacks.
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
The key size for memif is 256 but the unix domain socket structure has
space for 100 bytes. Change it to use a larger buffer and not hard
code the keysize everywhere.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Jakub Grajciar <jgrajcia@cisco.com>
Change eth_dev_infos_get_t return value from void to int.
Make eth_dev_infos_get_t implementations across all drivers to return
negative errno values if case of error conditions.
Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Some drivers were missing reasons text for their disabling in meson.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Luca Boccassi <bluca@debian.org>
gcc-9 is stricter on NULL arguments for printf.
Fix the following build error by avoiding NULL argument to printf.
In file included from drivers/net/memif/memif_socket.c:26:
In function 'memif_socket_create',
inlined from 'memif_socket_init' at net/memif/memif_socket.c:965:12:
net/memif/rte_eth_memif.h:35:2: error:
'%s' directive argument is null [-Werror=format-overflow=]
35 | rte_log(RTE_LOG_ ## level, memif_logtype, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36 | "%s(): " fmt "\n", __func__, ##args)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fixes: 09c7e63a71 ("net/memif: introduce memory interface PMD")
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
When working as a secondary process, it uses eth_memif_rx in PMD egress.
It should be eth_memif_tx.
Fixes: c41a04958b ("net/memif: support multi-process")
Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
n_err reflects the number of packets that the driver did not manage to
send.
This is a temporary situation, those packets are not freed and the
application can still retry to send them later.
Hence, we can't count them as transmit failed.
Fixes: 09c7e63a71 ("net/memif: introduce memory interface PMD")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Use rte_ether_unformat_addr rather than sscanf.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Formatting Ethernet address and getting a random value are
not in critical path so they should not be inlined.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Rami Rosen <ramirose@gmail.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Multi-process support for memif PMD.
Primary process handles connection establishment.
Secondary process queries for memory regions.
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Shared memory packet interface (memif) PMD allows for DPDK and any other
client using memif (DPDK, VPP, libmemif) to communicate using shared
memory. The created device transmits packets in a raw format. It can be
used with Ethernet mode, IP mode, or Punt/Inject. At this moment, only
Ethernet mode is supported in DPDK memif implementation. Memif is Linux
only.
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>