[PATCH v6] kni: allow configuring the kni thread granularity

2022-01-20 Thread Tudor Cornea
+0x6d/0x80 This patch also attempts to remove this option. References: [1] https://www.kernel.org/doc/Documentation/timers/timers-howto.txt Signed-off-by: Tudor Cornea Acked-by: Padraig Connolly Reviewed-by: Ferruh Yigit --- v6: * Removed tabs and newline in the description of the

Re: [PATCH v5] kni: allow configuring the kni thread granularity

2022-01-17 Thread Tudor Cornea
On Fri, 14 Jan 2022 at 18:44, Ferruh Yigit wrote: > On 1/14/2022 4:24 PM, Stephen Hemminger wrote: > > On Fri, 14 Jan 2022 17:18:19 +0200 > > Tudor Cornea wrote: > > > >> +module_param(min_scheduling_interval, long, 0644); > >> +MODULE_PARM_DESC(min_sch

Re: [PATCH] kernel/kni: retry the xmit in case ring is full

2022-01-17 Thread Tudor Cornea
Hi Stephen, > NAK > Doing this risks having a CPU lockup if userspace does not keep up > or the DPDK application gets stuck. > > There are better ways to solve the TCP stack queue overrun issue: > 1. Use a better queueing discipline on the kni device. The Linux default >of pfifo_fast has buff

[PATCH v5] kni: allow configuring the kni thread granularity

2022-01-14 Thread Tudor Cornea
+0x6d/0x80 This patch also attempts to remove this option. References: [1] https://www.kernel.org/doc/Documentation/timers/timers-howto.txt Signed-off-by: Tudor Cornea Acked-by: Padraig Connolly Reviewed-by: Ferruh Yigit --- v5: * Rebased the patch on top of the dpdk-next-net branch v4

[PATCH] kernel/kni: retry the xmit in case ring is full

2021-12-17 Thread Tudor Cornea
to returning NETDEV_TX_BUSY seems to add some extra overhead, and degrade the control-plane performance a bit. Signed-off-by: Tudor Cornea --- kernel/linux/kni/kni_net.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni

[PATCH v4] kni: allow configuring the kni thread granularity

2021-11-24 Thread Tudor Cornea
+0x6d/0x80 This patch also attempts to remove this option. References: [1] https://www.kernel.org/doc/Documentation/timers/timers-howto.txt Signed-off-by: Tudor Cornea --- v4: * Removed RTE_KNI_PREEMPT_DEFAULT configuration option v3: * Fixed unwrapped commit description warning * Changed from

Re: [PATCH v3] kni: allow configuring the kni thread granularity

2021-11-24 Thread Tudor Cornea
Hi Ferruh, > As I tested both with KNI sample app and KNI PMD, change looks good, > practically we can't change the scheduler delay with existing code but > this patch enables it and lets configure performance/CPU usage trade of. > > Only possible change is to remove 'RTE_KNI_PREEMPT_DEFAULT' ma

[dpdk-dev] [PATCH v3] kni: allow configuring the kni thread granularity

2021-11-08 Thread Tudor Cornea
+0x6d/0x80 References: [1] https://www.kernel.org/doc/Documentation/timers/timers-howto.txt Signed-off-by: Tudor Cornea --- v3: * Fixed unwrapped commit description warning * Changed from hrtimers to Linux High Precision Timers in docs * Added two tabs at the beginning of the new params

Re: [dpdk-dev] [PATCH v2] kni: allow configuring the kni thread granularity

2021-11-03 Thread Tudor Cornea
On Tue, 2 Nov 2021 at 17:53, Stephen Hemminger wrote: > On Tue, 2 Nov 2021 17:51:13 +0200 > Tudor Cornea wrote: > > > +#ifdef RTE_KNI_PREEMPT_DEFAULT > > +module_param(min_scheduling_interval, long, 0644); > > +MODULE_PARM_DESC(min_scheduling_interval, > > +&q

[dpdk-dev] [PATCH v4] net/af_packet: fix ignoring full ring on tx

2021-11-03 Thread Tudor Cornea
consistent, and does not recover. ifconfig eth1 down; sleep 7; ifconfig eth1 up [1] http://code.dpdk.org/pktgen-dpdk/pktgen-20.11.2/source/INSTALL.md Signed-off-by: Mihai Pogonaru Signed-off-by: Tudor Cornea Reviewed-by: Ferruh Yigit --- v4: * Updated comment regarding POLLERR Removed

[dpdk-dev] [PATCH v2] kni: allow configuring the kni thread granularity

2021-11-02 Thread Tudor Cornea
[] watchdog_timer_fn+0x160/0x160 [] __run_hrtimer.isra.4+0x42/0xd0 [] hrtimer_interrupt+0xe7/0x1f0 [] smp_apic_timer_interrupt+0x67/0xa0 [] apic_timer_interrupt+0x6d/0x80 References: [1] https://www.kernel.org/doc/Documentation/timers/timers-howto.txt Signed-off-by: Tudor Cornea --- v2: * Fixed some

[dpdk-dev] [PATCH v3] net/af_packet: fix ignoring full ring on tx

2021-11-02 Thread Tudor Cornea
consistent, and does not recover. ifconfig eth1 down; sleep 7; ifconfig eth1 up [1] http://code.dpdk.org/pktgen-dpdk/pktgen-20.11.2/source/INSTALL.md Signed-off-by: Mihai Pogonaru Signed-off-by: Tudor Cornea --- v2: * Added check for POLLERR * Used tx_ring_status_available() fo

Re: [dpdk-dev] [PATCH v2] net/af_packet: fix ignoring full ring on tx

2021-11-02 Thread Tudor Cornea
On Tue, 26 Oct 2021 at 17:41, Ferruh Yigit wrote: > Hi Tudor, > > I have used testpmd, 'txonly' forwarding. Tx recovers after interface up, > but by adding some debug logs I can see 'poll()' returns with POLLOUT even > there is no space in the buffer. > > According the logic in the PMD, when 'pol

[dpdk-dev] [PATCH] kni: allow configuring the kni thread granularity

2021-11-02 Thread Tudor Cornea
[] watchdog_timer_fn+0x160/0x160 [] __run_hrtimer.isra.4+0x42/0xd0 [] hrtimer_interrupt+0xe7/0x1f0 [] smp_apic_timer_interrupt+0x67/0xa0 [] apic_timer_interrupt+0x6d/0x80 References: [1] https://www.kernel.org/doc/Documentation/timers/timers-howto.txt Signed-off-by: Tudor Cornea --- doc/guides

Re: [dpdk-dev] [PATCH v2] net/ixgbe: initialize port even if mtu config fails

2021-10-21 Thread Tudor Cornea
On Thu, 21 Oct 2021 at 18:33, Ferruh Yigit wrote: > On 10/20/2021 7:13 PM, Tudor Cornea wrote: > > On a VMware ESXi 6.0 setup with an Intel 82599 NIC the ports don't > > seem to initialize anymore, while running testpmd. > > > > Configuring Port 0 (socket 0) &g

[dpdk-dev] [PATCH v2] net/ixgbe: initialize port even if mtu config fails

2021-10-20 Thread Tudor Cornea
consistent with the overall kernel ixgbevf implementation. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c#n2015 Signed-off-by: Tudor Cornea --- v2: * Change title * Remove max_rx_pkt_len fix in ixgbe_ethdev.c It

Re: [dpdk-dev] [PATCH] net/ixgbe: initialize max_rx_pkt_len if rlpml_set_vf fails

2021-10-20 Thread Tudor Cornea
> > -Original Message- > > From: Yigit, Ferruh > > Sent: Tuesday, October 19, 2021 8:58 PM > > To: Tudor Cornea ; Zhang, Qi Z > > > > Cc: Zhang, AlvinX ; Wang, Haiyue > > ; dev@dpdk.org > > Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: initi

Re: [dpdk-dev] [PATCH] net/ixgbe: initialize max_rx_pkt_len if rlpml_set_vf fails

2021-10-15 Thread Tudor Cornea
dk.org/api/rte__ethdev_8h.html Thanks, Tudor On Fri, 15 Oct 2021 at 17:06, Tudor Cornea wrote: > It seems that if the call to ixgbevf_rlpml_set_vf fails, > we will not initialize dev_conf.rxmode.max_rx_pkt_len correctly anymore. > > This happens with a 82599EB NIC and a VMware ESXI 6.0 setup, > an

[dpdk-dev] [PATCH] net/ixgbe: initialize max_rx_pkt_len if rlpml_set_vf fails

2021-10-15 Thread Tudor Cornea
seem to have an older version of the PF driver as default. Signed-off-by: Tudor Cornea --- drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++-- drivers/net/ixgbe/ixgbe_rxtx.c | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe

Re: [dpdk-dev] [PATCH v2] net/af_packet: fix ignoring full ring on tx

2021-10-05 Thread Tudor Cornea
-n 4 \ --proc-type=primary \ --no-pci \ --no-telemetry \ --no-huge \ -m 512 \ --vdev=net_af_packet0,iface=eth1,blocksz=16384,framesz=8192,framecnt=2048,qpairs=1,qdisc_bypass=0 \ -- \ -P \ -T \ -m "3.0" \ -f themes/black-yellow.theme se

Re: [dpdk-dev] [PATCH v4] net/af_packet: reinsert the stripped vlan tag

2021-10-01 Thread Tudor Cornea
ruh Yigit wrote: > On 9/29/2021 3:08 PM, Tudor Cornea wrote: > > The af_packet pmd driver binds to a raw socket and allows > > sending and receiving of packets through the kernel. > > > > Since commit [1], the kernel strips the vlan tags early in > > __netif_receiv

[dpdk-dev] [PATCH v5] net/af_packet: reinsert the stripped vlan tag

2021-10-01 Thread Tudor Cornea
terms of packet rate. [1] https://github.com/torvalds/linux/commit/bcc6d47903612c3861201cc3a866fb604f26b8b2 Signed-off-by: Tudor Cornea --- v5: * Updated the af_packet documentation * Updated the af_packet release notes v4: * Updated the af_packet documentation v3: * Updated release note an

Re: [dpdk-dev] [PATCH v3] net/af_packet: reinsert the stripped vlan tag

2021-09-29 Thread Tudor Cornea
Thanks Stephen, for the suggestion I've sent v4 of the patch, which adds the succinct description in the af_packet documentation.. On Fri, 24 Sept 2021 at 18:11, Stephen Hemminger wrote: > On Fri, 24 Sep 2021 14:44:45 +0300 > Tudor Cornea wrote: > > > +Features an

[dpdk-dev] [PATCH v4] net/af_packet: reinsert the stripped vlan tag

2021-09-29 Thread Tudor Cornea
terms of packet rate. [1] https://github.com/torvalds/linux/commit/bcc6d47903612c3861201cc3a866fb604f26b8b2 Signed-off-by: Tudor Cornea --- v4: * Updated the af_packet documentation v3: * Updated release note and documentation * Updated commit with performance measurements v2: * Added DEV_RX_OFF

Re: [dpdk-dev] [PATCH v2] net/af_packet: fix ignoring full ring on tx

2021-09-29 Thread Tudor Cornea
edge (probably excepting patches that are back-ported by Ubuntu maintainers from newer releases). On Mon, 20 Sept 2021 at 20:44, Ferruh Yigit wrote: > On 9/13/2021 2:45 PM, Tudor Cornea wrote: > > The poll call can return POLLERR which is ignored, or it can return > > POLLOUT, even if th

[dpdk-dev] [PATCH v3] net/af_packet: reinsert the stripped vlan tag

2021-09-24 Thread Tudor Cornea
terms of packet rate [1] https://github.com/torvalds/linux/commit/bcc6d47903612c3861201cc3a866fb604f26b8b2 Signed-off-by: Tudor Cornea --- v3: * Updated release note and documentation * Updated commit with performance measurements v2: * Added DEV_RX_OFFLOAD_VLAN_STRIP to rxmode->offloads --

[dpdk-dev] [PATCH v3] net/af_packet: remove timestamp from packet status

2021-09-23 Thread Tudor Cornea
ed. This allows compatibility with non-timestamp aware user-space code which checks tp_status == TP_STATUS_AVAILABLE; not expecting additional timestamp flags to be set in tp_status. [1] https://www.spinics.net/lists/kernel/msg3959391.html Signed-off-by: Mihai Pogonaru Signed-off-by: Tudor Cornea --- v3: *

Re: [dpdk-dev] [PATCH v2] net/af_packet: remove timestamp from packet status

2021-09-21 Thread Tudor Cornea
Thanks for the suggestion. I will send a new version of the patch with the required changes. Tudor On Mon, 20 Sept 2021 at 20:49, Ferruh Yigit wrote: > On 9/13/2021 6:23 PM, Tudor Cornea wrote: > > We should eliminate the timestamp status from the packet > > status. This should

Re: [dpdk-dev] [PATCH v2] net/af_packet: reinsert the stripped vlan tag

2021-09-21 Thread Tudor Cornea
Thanks, Ferruh I will perform the suggested recommendations in version 3 of the patch. On Mon, 20 Sept 2021 at 18:41, Ferruh Yigit wrote: > On 9/8/2021 9:59 AM, Tudor Cornea wrote: > > The af_packet pmd driver binds to a raw socket and allows > > sending and receiving of pack

Re: [dpdk-dev] [PATCH] net/af_packet: remove timestamp from packet status

2021-09-13 Thread Tudor Cornea
Thanks for the observation. I have removed the compile-time kernel version check in v2 of the patch On Mon, 13 Sept 2021 at 18:09, Stephen Hemminger wrote: > On Mon, 13 Sep 2021 17:09:11 +0300 > Tudor Cornea wrote: > > > +static inline bool tx_ring_status_unavailable(uin

[dpdk-dev] [PATCH v2] net/af_packet: remove timestamp from packet status

2021-09-13 Thread Tudor Cornea
ed. This allows compatibility with non-timestamp aware user-space code which checks tp_status == TP_STATUS_AVAILABLE; not expecting additional timestamp flags to be set in tp_status. [1] https://www.spinics.net/lists/kernel/msg3959391.html Signed-off-by: Mihai Pogonaru Signed-off-by: Tudor Cornea --- v2: *

[dpdk-dev] [PATCH] net/af_packet: remove timestamp from packet status

2021-09-13 Thread Tudor Cornea
ed. This allows compatibility with non-timestamp aware user-space code which checks tp_status == TP_STATUS_AVAILABLE; not expecting additional timestamp flags to be set in tp_status. [1] https://www.spinics.net/lists/kernel/msg3959391.html Signed-off-by: Mihai Pogonaru Signed-off-by: Tudor Cornea -

[dpdk-dev] [PATCH v2] net/af_packet: fix ignoring full ring on tx

2021-09-13 Thread Tudor Cornea
The poll call can return POLLERR which is ignored, or it can return POLLOUT, even if there are no free frames in the mmap-ed area. We can account for both of these cases by re-checking if the next frame is empty before writing into it. Signed-off-by: Mihai Pogonaru Signed-off-by: Tudor Cornea

[dpdk-dev] [PATCH v2] net/af_packet: reinsert the stripped vlan tag

2021-09-08 Thread Tudor Cornea
/commit/bcc6d47903612c3861201cc3a866fb604f26b8b2 Signed-off-by: Tudor Cornea --- v2: * Add DEV_RX_OFFLOAD_VLAN_STRIP to rxmode->offloads --- drivers/net/af_packet/rte_eth_af_packet.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/net/af_packet/rte_eth_af_packet.c

Re: [dpdk-dev] [PATCH] net/af_packet: fix ignoring full ring on tx

2021-09-06 Thread Tudor Cornea
s from an old config, but only in the first 2048 packets (which is the queue size) [1] https://www.spinics.net/lists/kernel/msg3959391.html [2] https://www.spinics.net/lists/netdev/msg739372.html On Wed, 1 Sept 2021 at 19:34, Ferruh Yigit wrote: > On 8/20/2021 2:39 PM, Tudor Cornea wrote: &

Re: [dpdk-dev] [PATCH] net/af_packet: try to reinsert the stripped vlan tag

2021-09-03 Thread Tudor Cornea
rate at first glance, but maybe the experiment could be repeated on different setups as I'm using a virtual environment. Would it be reasonable if I send v2 of the patch for review, with the above changes ? On Thu, 2 Sept 2021 at 13:49, Ferruh Yigit wrote: > On 9/1/2021 10:34 PM, Stephen He

Re: [dpdk-dev] [PATCH] net/af_packet: try to reinsert the stripped vlan tag

2021-09-01 Thread Tudor Cornea
effect of vlan stripping for the af_packet PMD, in an uniform way, similar to other PMDs. Would this be considered an acceptable solution ? On Tue, 31 Aug 2021 at 18:31, Ferruh Yigit wrote: > On 8/20/2021 1:46 PM, Tudor Cornea wrote: > > The af_packet pmd driver binds to a raw sock

[dpdk-dev] [PATCH] net/af_packet: fix ignoring full ring on tx

2021-08-20 Thread Tudor Cornea
status. Signed-off-by: Mihai Pogonaru Signed-off-by: Tudor Cornea --- drivers/net/af_packet/rte_eth_af_packet.c | 47 +-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet

[dpdk-dev] [PATCH] net/af_packet: try to reinsert the stripped vlan tag

2021-08-20 Thread Tudor Cornea
thing similar was done for the netvsc pmd. [1] https://github.com/torvalds/linux/commit/bcc6d47903612c3861201cc3a866fb604f26b8b2 Signed-off-by: Tudor Cornea --- drivers/net/af_packet/rte_eth_af_packet.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/af_packet/rte_eth_af_packet

[dpdk-dev] [PATCH] net/iavf: fix overflow in maximum packet length config

2021-08-06 Thread Tudor Cornea
s 5, the computation mentioned above could potentially result in a value which might be bigger than MAX_USHORT. The result will be that Jumbo Frames will not work properly A similar fix was submitted for the ice driver Signed-off-by: Tudor Cornea --- drivers/net/iavf/iavf_ethdev.c | 7 ---

[dpdk-dev] [PATCH] net/af_packet: run on kernels without qdisc bypass support

2021-07-14 Thread Tudor Cornea
older kernel. Setting the socket option only if it is specifically requested from the EAL arguments, allows us to have a way to run the PMD compiled against newer kernel headers, on platforms having older kernels. Signed-off-by: Tudor Cornea --- drivers/net/af_packet/rte_eth_af_packet.c | 16

[dpdk-dev] [PATCH] net/ice: fix integer overflow when computing max_pkt_len

2021-06-15 Thread Tudor Cornea
the computation mentioned above could potentially result in a value which might be bigger than MAX_USHORT. The result will be that Jumbo Frames will not work properly Signed-off-by: Tudor Cornea --- drivers/net/ice/ice_dcf_ethdev.c | 7 --- drivers/net/ice/ice_rxtx.c | 6 +++--- 2 files chan

[dpdk-dev] [PATCH] net/ice: fix integer overflow when computing max_pkt_len

2021-06-15 Thread Tudor Cornea
to have a large value (i.e 13312), and ICE_SUPPORT_CHAIN_NUM is defined as 5, the computation mentioned above could potentially result in a value which might be bigger than MAX_USHORT. The result will be that Jumbo Frames will not work properly Signed-off-by: Tudor Cornea --- drivers/net/