[dpdk-users] DPDK: MPLS packet processing

2021-01-17 Thread raktim bhatt
Hi All,

I am trying to build a multi-RX-queue dpdk program, using RSS to split the
incoming traffic into RX queues on a single port. Mellanox ConnectX-5 and
DPDK Version 19.11 is used for this purpose. It works fine when I use IP
over Ethernet packets as input. However when the packet contains IP over
MPLS over Ethernet, RSS does not seem to work. As a result, all packets
belonging to various flows (with different src & dst IPs, ports over MPLS)
are all sent into the same RX queue.


My queries are

1. Is there any parameter/techniques in DPDK to distribute MPLS packets to
multiple RX queues?

2. Is there any way to strip off MPLS tags (between Eth and IP) in
hardware, something like hw_vlan_strip?


My Port configuration is


const struct rte_eth_conf default_port_conf = {

.rxmode = {

.hw_vlan_strip  = 0,/* VLAN strip enabled. */

.header_split   = 0,/* Header Split disabled. */

.hw_ip_checksum = 0,/* IP checksum offload disabled. */

.hw_strip_crc   = 0,/* CRC stripping by hardware disabled.
*/

},

.rx_adv_conf = {

.rss_conf = {

.rss_key = NULL,

.rss_key_len = 0,

.rss_hf = ETH_RSS_IP,

},

} };

___


Thanks and Regards

Raktim Bhatt


[dpdk-users] Integration from Dpdk18.05 to Dpdk19.11 - rte_timer_subsystem_init(void)

2021-01-17 Thread Li, Jiu (NSB - CN/Hangzhou)
Hello!  Dpdk experts,

On Dpdk 18.05,  void rte_timer_subsystem_init(void)
On Dpdk 19.11,  intrte_timer_subsystem_init(void) implementation changed, 
which will return 0, -EALREADY or -ENOMEM;

There is still have  dpdk "process" mode (instead of pdkd thread mode) 
deployment in my side.
Can I have a question?

If rte_timer_subsystem_init() is called one time is enough?
After rte_timer_subsystem_init() called with return 0 by one process , then 
other processes are able to use "rte timer" service without issue, right?

Thanks in advance!

Best Regards.
  U-Plane
(Clark),  Jiu LI



[dpdk-users] A compilation problem on arm64

2021-01-17 Thread LemmyHuang
Dear Concerns,


I have a compilation problem on arm64.
My environment is dpdk-19.11, gcc-9.3.1 and kernel-5.10.0-0.0.0.7.aarch64. The 
errors are as follows:


 ...
 CC [M] 
/home/abuild/rpmbuild/BUILD/dpdk-19.11/arm64-armv8a-linux-gcc/build/kernel/linux/kni/kni_misc.o
 [0m
 CC [M] 
/home/abuild/rpmbuild/BUILD/dpdk-19.11/arm64-armv8a-linux-gcc/build/kernel/linux/kni/kni_net.o
 [0m
 LD librte_common_octeontx2.so.20.0 [0m
 INSTALL-LIB librte_common_octeontx2.so.20.0 [0m
 == Build drivers/bus [0m
 In file included from ./include/linux/atomic.h:7, [0m
 from 
./include/asm-generic/bitops/atomic.h:5, [0m
 from 
./arch/arm64/include/asm/bitops.h:26, [0m
 from 
./include/linux/bitops.h:29, [0m
 from 
./include/linux/kernel.h:12, [0m
 from 
./include/linux/list.h:9, [0m
 from 
./include/linux/rculist.h:10, [0m
 from 
./include/linux/pid.h:5, [0m
 from 
./include/linux/sched.h:14, [0m
 from 
./include/linux/ratelimit.h:6, [0m
 from 
./include/linux/dev_printk.h:16, [0m
 from 
./include/linux/device.h:15, [0m
 from 
/home/abuild/rpmbuild/BUILD/dpdk-19.11/arm64-armv8a-linux-gcc/build/kernel/linux/igb_uio/igb_uio.c:8:
 [0m
 ./include/linux/atomic-arch-fallback.h: In function 'igbuio_pci_open': 
[0m
 ./arch/arm64/include/asm/atomic.h:20:20: error: inlining failed in 
call to 'arch_atomic_sub.constprop': --param max-inline-insns-single-O2 limit 
reached [-Werror=inline] [0m
  20 | static inline void arch_##op(int i, atomic_t 
*v) \ [0m
   |  
^ [0m
 ./arch/arm64/include/asm/atomic.h:30:1: note: in expansion of macro 
'ATOMIC_OP' [0m
  30 | ATOMIC_OP(atomic_sub) [0m
   | ^ [0m
 In file included from ./include/linux/atomic.h:81, [0m
 from 
./include/asm-generic/bitops/atomic.h:5, [0m
 from 
./arch/arm64/include/asm/bitops.h:26, [0m
 from 
./include/linux/bitops.h:29, [0m
 from 
./include/linux/kernel.h:12, [0m
 from 
./include/linux/list.h:9, [0m
 from 
./include/linux/rculist.h:10, [0m
 from 
./include/linux/pid.h:5, [0m
 from 
./include/linux/sched.h:14, [0m
 from 
./include/linux/ratelimit.h:6, [0m
 from 
./include/linux/dev_printk.h:16, [0m
 from 
./include/linux/device.h:15, [0m
 from 
/home/abuild/rpmbuild/BUILD/dpdk-19.11/arm64-armv8a-linux-gcc/build/kernel/linux/igb_uio/igb_uio.c:8:
 [0m
 ./include/linux/atomic-arch-fallback.h:441:2: note: called from here 
[0m
 441 | arch_atomic_sub(1, v); [0m
   | ^ [0m
 cc1: all warnings being treated as errors [0m
 make[6]: *** [scripts/Makefile.build:279: 
/home/abuild/rpmbuild/BUILD/dpdk-19.11/arm64-armv8a-linux-gcc/build/kernel/linux/igb_uio/igb_uio.o]
 Error 1 [0m
 make[5]: *** [Makefile:1805: 
/home/abuild/rpmbuild/BUILD/dpdk-19.11/arm64-armv8a-linux-gcc/build/kernel/linux/igb_uio]
 Error 2 [0m
 make[4]: *** 
[/home/abuild/rpmbuild/BUILD/dpdk-19.11/mk/rte.module.mk:51: igb_uio.ko] Error 
2 [0m
 make[3]: *** 
[/home/abuild/rpmbuild/BUILD/dpdk-19.11/mk/rte.subdir.mk:37: igb_uio] Error 2 
[0m
 make[3]: *** Waiting for unfinished jobs [0m
 ...


Thanks  Regards,
Lemmy_Huang

[dpdk-users] use VF in promiscuous mode in dpdk to receive all traffic received by PF

2021-01-17 Thread Myth Ren
Hi, all
is it possible we are mirror traffic from switch/router to PF, then a
program based on DPDK
read packet from a VF related to the PF, presume we are mirror the traffic
from PF to the VF (promiscuous),
while the PF device still managed by the kernel driver(if it's possible),
or managed by UIO driver.
at least, restart the DPDK based program will not influence the PF device
state.

i have already read the the VFIO doc (
https://doc.dpdk.org/guides/linux_gsg/linux_drivers.html#vfio) and
test it, but not see what i want (maybe i mis-understood or take wrong
steps).

if VFIO can do what i want? which device i should use, which version
kernel i should use, which driver i
should use?

thank you