Re: [dpdk-dev] [PATCH 2/2] kni: fix rtnl deadlocks and race conditions v4

2021-03-01 Thread Dan Gora
Hi All, Sorry to butt in on this, but I fixed this same issue about 3 years ago in my application, but I was never able to get the changes integrated and eventually just gave up trying. The rule with KNI is: 1) The app should have a separate control thread per rte_kni which just spins calling rte

Re: [dpdk-dev] [PATCH 2/2] kni: fix rtnl deadlocks and race conditions v4

2021-03-01 Thread Dan Gora
s function removes the struct kni_dev from the list of interfaces to poll (and kills the per-dev kthread, if configured for multi-thread), then frees the memory in the FIFOs. Signed-off-by: Dan Gora I'm not sure that this is exactly the problem that you're seeing, but it

Re: [dpdk-dev] [PATCH v2 1/5] kni: add API to set link status on kernel interface

2018-10-03 Thread Dan Gora
On Fri, Sep 28, 2018 at 5:03 AM Ferruh Yigit wrote: > > On 9/28/2018 12:51 AM, Dan Gora wrote: > > On Thu, Sep 27, 2018 at 8:44 PM, Ferruh Yigit > > wrote: > >>> Well, yes the link_status (link up, link down) _is_ applied to the KNI > >>> interface.

Re: [dpdk-dev] [PATCH v2 1/5] kni: add API to set link status on kernel interface

2018-10-10 Thread Dan Gora
On Wed, Oct 10, 2018 at 11:09 AM Ferruh Yigit wrote: > > Yes, I understand that.. As I pointed out previously, if there is no > > physical device which corresponds to this KNI interface, the > > application can: > > > > 1) Not use this API at all, just as they do now. > > This API has nothing wit

Re: [dpdk-dev] [PATCH v3 0/6] kni: add API to set link status on kernel interface

2018-10-10 Thread Dan Gora
On Wed, Oct 10, 2018 at 11:16 AM Ferruh Yigit wrote: > > On 9/27/2018 1:32 AM, Dan Gora wrote: > > Hi All, > > > > Attached is version 3 of a patchset to add a new API function to > > set the link status on kernel interfaces created with the KNI kernel > > m

Re: [dpdk-dev] [PATCH v2 02/10] kni: separate releasing netdev from freeing KNI interface

2018-10-10 Thread Dan Gora
On Wed, Oct 10, 2018 at 2:25 PM Ferruh Yigit wrote: > > On 9/4/2018 1:36 AM, Dan Gora wrote: > > Hi Ferruh, > > > > I remembered now the motivation behind separating rte_kni_release() > > and rte_kni_free(). > > > > The problem is that the DPDK thread whi

Re: [dpdk-dev] [PATCH v3 0/6] kni: add API to set link status on kernel interface

2018-10-10 Thread Dan Gora
On Wed, Oct 10, 2018 at 8:00 PM Ferruh Yigit wrote: > > I'm incredibly frustrated with this whole process to be honest... > > Please don't be so, you are spending time/effort to improve an open source > project which is great, thank you again. > > Why don't we take this as incremental steps, first

Re: [dpdk-dev] [PATCH v2 02/10] kni: separate releasing netdev from freeing KNI interface

2018-10-10 Thread Dan Gora
I'll have a look at this.. Maybe it will work, I'll have to try it and test it to see if there are any gotchas that are not obvious. d On Wed, Oct 10, 2018 at 7:51 PM Ferruh Yigit wrote: > >> Very simply, what about prevent kni_net_release() send callback to > >> userspace? > > > > No, because

[dpdk-dev] [PATCH] test: fix compilation error in external memory test

2018-10-16 Thread Dan Gora
; i++) { ^ test_external_mem.c:375:2: note: use option -std=c99 or -std=gnu99 to compile your code Fixes: b270daa43b3d ("test: support external memory") Cc: anatoly.bura...@intel.com Signed-off-by: Dan Gora --- test/test/test_external_mem.c | 3 ++- 1 file changed, 2 ins

[dpdk-dev] [PATCH v4 0/6] kni: add API to set link status on kernel interface

2018-10-16 Thread Dan Gora
ovements to examples/kni: Add log message showing how > to show/zero stats. Improve zeroing statistics. > > Note that checkpatches.sh compains about patch 1/5, but this appears > to be a bug with check-symbol-change or something. If I move the > fragment of the patch modifying r

[dpdk-dev] [PATCH v4 1/6] kni: add API to set link status on kernel interface

2018-10-16 Thread Dan Gora
Add a new API function to KNI, rte_kni_update_link() to allow DPDK applications to update the link status for KNI network interfaces in the linux kernel. Signed-off-by: Dan Gora --- lib/librte_kni/rte_kni.c | 41 ++ lib/librte_kni/rte_kni.h | 20

[dpdk-dev] [PATCH v4 2/6] kni: add link status test

2018-10-16 Thread Dan Gora
Test changing the link status of the KNI interface with rte_kni_update_link(). Signed-off-by: Dan Gora --- test/test/test_kni.c | 77 1 file changed, 77 insertions(+) diff --git a/test/test/test_kni.c b/test/test/test_kni.c index cf64c0b27

[dpdk-dev] [PATCH v4 4/6] examples/kni: monitor and update link status continually

2018-10-16 Thread Dan Gora
Update KNI example to add the command line flag '-m' to enable a function to continuously monitor the Ethernet link status of the physical link and update the link status of the corresponding interfaces with rte_kni_update_link(). Signed-off-by: Dan Gora --- examples/kni/Mak

[dpdk-dev] [PATCH v4 6/6] examples/kni: improve zeroing statistics

2018-10-16 Thread Dan Gora
rx/tx_packets in worker threads by a non-zero amount. This limits the race to the periods in which traffic is actually being received or transmitted. Signed-off-by: Dan Gora --- examples/kni/main.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/kni/main.c b

[dpdk-dev] [PATCH v4 5/6] examples/kni: add log msgs to show and clear stats

2018-10-16 Thread Dan Gora
Add logging messages showing the commands necessary for the user to have the application display and zero the statistics. Signed-off-by: Dan Gora --- examples/kni/main.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/examples/kni/main.c b/examples/kni

[dpdk-dev] [PATCH v4 3/6] kni: set default carrier state of interface

2018-10-16 Thread Dan Gora
n be set to 'on'. This enables the KNI interface to be used without having to explicity set the carrier state to 'on' using rte_kni_update_link(). Signed-off-by: Dan Gora --- kernel/linux/kni/kni_dev.h | 3 +++ kernel/linux/kni/kni_misc.c | 40 +++

[dpdk-dev] Multiple compilation failures in recent commits on branch master.

2018-10-17 Thread Dan Gora
Hi All, I sent a patch yesterday to fix a compilation failure in the test_external_mem test and I pulled origin yesterday and now there is another compilation failure which was introduced in commit c3e0a706fd7595733cf51 (net/dpaa2: read hardware provided MAC for DPNI devices): /home/dg/Network_Fa

Re: [dpdk-dev] Multiple compilation failures in recent commits on branch master.

2018-10-17 Thread Dan Gora
Ok, never mind.. I see that it was fixed right after I pulled yesterday... commit 41c24ea294fe6c69ee8c1b814c2475af0e74d821 (net/dpaa2: fix MAC address initialization) On Wed, Oct 17, 2018 at 8:44 PM Dan Gora wrote: > > Hi All, > > I sent a patch yesterday to fix a compilation fa

Re: [dpdk-dev] [PATCH v4 1/6] kni: add API to set link status on kernel interface

2018-10-18 Thread Dan Gora
On Thu, Oct 18, 2018 at 10:44 AM Ferruh Yigit wrote: > > KNI sample application calls this API each 100ms, so this keeps writing > "carrier" file. > > What do you think writing to "carrier" file only if status changed? > > And it is possible to register to RTE_ETH_EVENT_INTR_LSC event in sample >

[dpdk-dev] [PATCH v5 0/5] kni: add API to set link status on kernel interface

2018-10-18 Thread Dan Gora
show/zero stats. Improve zeroing statistics. > > Note that checkpatches.sh compains about patch 1/5, but this appears > to be a bug with check-symbol-change or something. If I move the > fragment of the patch modifying rte_kni_version.map to the bottom of > the patch file, it doesn'

[dpdk-dev] [PATCH v5 1/5] kni: add API to set link status on kernel interface

2018-10-18 Thread Dan Gora
Add a new API function to KNI, rte_kni_update_link() to allow DPDK applications to update the link status for KNI network interfaces in the linux kernel. Signed-off-by: Dan Gora --- lib/librte_kni/rte_kni.c | 41 lib/librte_kni/rte_kni.h | 20 lib

[dpdk-dev] [PATCH v5 2/5] kni: set default carrier state of interface

2018-10-18 Thread Dan Gora
n be set to 'on'. This enables the KNI interface to be used without having to explicity set the carrier state to 'on' using rte_kni_update_link(). Signed-off-by: Dan Gora --- .../prog_guide/kernel_nic_interface.rst | 203 ++ kernel/linux/kni/kni_dev.h

[dpdk-dev] [PATCH v5 4/5] examples/kni: add log msgs to show and clear stats

2018-10-18 Thread Dan Gora
Add logging messages showing the commands necessary for the user to have the application display and zero the statistics. Signed-off-by: Dan Gora --- examples/kni/main.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/examples/kni/main.c b/examples/kni

[dpdk-dev] [PATCH v5 5/5] examples/kni: improve zeroing statistics

2018-10-18 Thread Dan Gora
rx/tx_packets in worker threads by a non-zero amount. This limits the race to the periods in which traffic is actually being received or transmitted. Signed-off-by: Dan Gora --- examples/kni/main.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/kni/main.c b

[dpdk-dev] [PATCH v5 3/5] examples/kni: monitor and update link status continually

2018-10-18 Thread Dan Gora
Update KNI example to add the command line flag '-m' to enable a function to continuously monitor the Ethernet link status of the physical link and update the link status of the corresponding interfaces with rte_kni_update_link(). Signed-off-by: Dan Gora --- .../sam

Re: [dpdk-dev] maintenance on DPDK patchwork today

2018-06-18 Thread Dan Gora
Hi Thomas, I don't know if this has anything to do with the upgrade of patchwork, but I can no longer sign into patchwork with (what I'm 99.9% sure is) my password. I tried the "forgot your password" button, but it sends me a link to a 404 page. Should I just try to re-register? thanks dan On

Re: [dpdk-dev] maintenance on DPDK patchwork today

2018-06-18 Thread Dan Gora
On Mon, Jun 18, 2018 at 4:21 PM, Thomas Monjalon wrote: > 19/06/2018 01:08, Dan Gora: >> Hi Thomas, >> >> I don't know if this has anything to do with the upgrade of patchwork, > > Patchwork has moved to patches.dpdk.org, so the password must be > filled again

[dpdk-dev] [PATCH v2 0/4] mbuf: Add new private data area accessor function.

2018-06-18 Thread Dan Gora
to 'm' in rte_mbuf_to_priv(). * Remove check of m->priv_len in rte_mbuf_to_priv() to avoid confusion if used with indirect mbufs. Dan Gora (4): mbuf: add accessor function for private data area examples/ipsec-secgw: use rte fcn to access private area examples/ipsec-secgw: use ipse

[dpdk-dev] [PATCH v2 1/4] mbuf: add accessor function for private data area

2018-06-18 Thread Dan Gora
. No checks are made to ensure that a private data area actually exists in the buffer. Signed-off-by: Dan Gora --- lib/librte_mbuf/rte_mbuf.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index 8e6b4d292..08c58335d

[dpdk-dev] [PATCH v2 2/4] examples/ipsec-secgw: use rte fcn to access private area

2018-06-18 Thread Dan Gora
Update get_priv() to use rte_mbuf_to_priv() to access the private area in the mbuf. Signed-off-by: Dan Gora --- examples/ipsec-secgw/ipsec.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ipsec-secgw/ipsec.h b/examples/ipsec-secgw/ipsec.h index 9b87278c1..3b5c3ec8c

[dpdk-dev] [PATCH v2 3/4] examples/ipsec-secgw: use ipsec fcn to access private area

2018-06-18 Thread Dan Gora
In inbound_sa_check(), use the application's get_priv() function to access the private area in the mbuf. Signed-off-by: Dan Gora --- examples/ipsec-secgw/sa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c

[dpdk-dev] [PATCH v2 4/4] vhost/crypto: use rte fcn to access private area

2018-06-18 Thread Dan Gora
Use rte_mbuf_to_priv() to access the private data area in the mbuf. Signed-off-by: Dan Gora --- lib/librte_vhost/vhost_crypto.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c index f1650738a..57341ef8f

Re: [dpdk-dev] maintenance on DPDK patchwork today

2018-06-18 Thread Dan Gora
Mon, Jun 18, 2018 at 4:26 PM, Dan Gora wrote: >>> but I can no longer sign into patchwork with (what I'm 99.9% sure is) >>> my password. I tried the "forgot your password" button, but it sends >>> me a link to a 404 page. >> >> Strange, I

Re: [dpdk-dev] [PATCH] examples: fix RSS hash function configuration

2018-06-20 Thread Dan Gora
Hi Ferruh, Thanks for this.. I had started working on a patch to do this as well because I got bit by this error. Shouldn't all of the example applications also add the code to strip the unsupported Tx and Rx offload bits as well? It would help new users (like me!) to understand that this is a r

Re: [dpdk-dev] [PATCH] examples: fix RSS hash function configuration

2018-06-20 Thread Dan Gora
rte_eth_[rt]x_queue_setup(). thanks dan On Wed, Jun 20, 2018 at 10:03 AM, Dan Gora wrote: > Hi Ferruh, > > Thanks for this.. I had started working on a patch to do this as well > because I got bit by this error. > > Shouldn't all of the example applications also add the code

Re: [dpdk-dev] Reviewathon

2018-06-27 Thread Dan Gora
Someone should add this IRC board to the dpdk.org website... I had no idea it existed until this email. > [2] > IRC freenode #dpdk-board > web client: https://webchat.freenode.net/

[dpdk-dev] [PATCH 00/10] kni: Interface detach and link status fixes.

2018-06-28 Thread Dan Gora
e both new "features" introduce new ioctls to the rte_kni kernel module, so the order in which the patches get applied affects which number each new ioctl gets. I thought it better to bundle them together to try to get them applied as a series to avoid any issues with this. Please have a look!

[dpdk-dev] [PATCH 01/10] kni: remove unused variables from struct kni_dev

2018-06-28 Thread Dan Gora
Remove the unused fields 'status' and 'synchro' from the struct kni_dev. Signed-off-by: Dan Gora --- kernel/linux/kni/kni_dev.h | 4 1 file changed, 4 deletions(-) diff --git a/kernel/linux/kni/kni_dev.h b/kernel/linux/kni/kni_dev.h index 6275ef27f..ed42989cc 100644 --

[dpdk-dev] [PATCH 02/10] kni: separate releasing netdev from freeing KNI interface

2018-06-28 Thread Dan Gora
rforms the RTE_KNI_IOCTL_FREE ioctl which calls kni_ioctl_free(). This function removes the struct kni_dev from the list of interfaces to poll (and kills the per-dev kthread, if configured for multi-thread), then frees the memory in the FIFOs. Signed-off-by: Dan Gora --- kernel/linux/kni/

[dpdk-dev] [PATCH 03/10] kni: don't touch struct kni_dev after freeing

2018-06-28 Thread Dan Gora
the net_dev with unregister_netdev from freeing the net_device and kni_dev structures into separate functions and ensure that we do not touch anything in the kni_dev structure after freeing it (ie don't call list_del(), etc...). Signed-off-by: Dan Gora --- kernel/linux/kni/kni_dev.h

[dpdk-dev] [PATCH 04/10] kni: add rte_kni_free to KNI library

2018-06-28 Thread Dan Gora
Add the new rte_kni_free() API function to the KNI library. This function will be called by DPDK applications after rte_kni_release() to free the KNI interface resources from the kernel driver. Signed-off-by: Dan Gora --- lib/librte_kni/rte_kni.c | 32 +--- lib

[dpdk-dev] [PATCH 06/10] kni: increase length of timeout for KNI responses

2018-06-28 Thread Dan Gora
rte_kni_handle_request(). Signed-off-by: Dan Gora --- kernel/linux/kni/kni_net.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c index 7fcfa106c..0850be434 100644 --- a/kernel/linux/kni/kni_net.c +++ b/kernel/linux/kni/kni_net.c

[dpdk-dev] [PATCH 05/10] kni: don't run rte_kni_handle_request after interface release

2018-06-28 Thread Dan Gora
Check to ensure that the KNI interface is still in use before accessing the KNI interface FIFOs to kernel space. This will help to ensure that the user does not access the KNI interface after rte_kni_release() has been called. Signed-off-by: Dan Gora --- lib/librte_kni/rte_kni.c | 6

[dpdk-dev] [PATCH 07/10] kni: update kni test for rte_kni_free

2018-06-28 Thread Dan Gora
Add support for testing rte_kni_free() function. Signed-off-by: Dan Gora --- test/test/test_kni.c | 20 1 file changed, 20 insertions(+) diff --git a/test/test/test_kni.c b/test/test/test_kni.c index 56773c8a2..ec051c07e 100644 --- a/test/test/test_kni.c +++ b/test/test

[dpdk-dev] [PATCH 08/10] kni: add rte_kni_free to KNI example app

2018-06-28 Thread Dan Gora
Add rte_kni_free to the KNI example application. Signed-off-by: Dan Gora --- examples/kni/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/kni/main.c b/examples/kni/main.c index 4b162debb..75e23cd0f 100644 --- a/examples/kni/main.c +++ b/examples/kni/main.c

[dpdk-dev] [PATCH 09/10] kni: add rte_kni_free to KNI vdev driver

2018-06-28 Thread Dan Gora
Add rte_kni_free to the virual KNI device. Signed-off-by: Dan Gora --- drivers/net/kni/rte_eth_kni.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c index ab63ea427..24c6991e6 100644 --- a/drivers/net/kni

[dpdk-dev] [PATCH 10/10] kni: add API to set link status on kernel interface

2018-06-28 Thread Dan Gora
Add a new API function to KNI, rte_kni_update_link() to allow DPDK applications to update the link state for the KNI network interfaces in the linux kernel. Note that the default carrier state is set to off when the interface is opened. Signed-off-by: Dan Gora --- kernel/linux/kni/kni_misc.c

[dpdk-dev] [PATCH 0/1] kni: fix segfault in rte_kni_get

2018-06-28 Thread Dan Gora
name, RTE_KNI_NAMESIZE) == 0) 754 return kni; 755 } 756 757 return NULL; (gdb) info args name = 0x0 (gdb) print kni $1 = (struct rte_kni *) 0x7ff7ff904940 (gdb) print kni->name $2 = "test_kni_port", '\000' (gdb) D

[dpdk-dev] [PATCH 1/1] kni: fix segfault in rte_kni_get

2018-06-28 Thread Dan Gora
Fix a segmentation fault which occurs when the kni_autotest is run in the 'test' application. This segmenation fault occurs when rte_kni_get() is called with a NULL value for 'name'. Fixes: 0c6bc8ef70ba ("kni: memzone pool for alloc and release") Cc: marc.s...@bis

[dpdk-dev] [PATCH] kni: Fix kni_autotest for new Rx/Tx offloads API

2018-06-28 Thread Dan Gora
Fixed a bug where kni_autotest would not start due to the lack of the ETH_TXQ_FLAGS_IGNORE flag being set in the rte_eth_txconf structure passed to rte_eth_tx_queue_setup. This was introduced in commit 4b954bb16747 ("ethdev: remove new to old offloads API helpers") Signed-off-by

[dpdk-dev] [PATCH 00/10] kni: Interface detach and link status fixes.

2018-06-28 Thread Dan Gora
or split better, please let me know. thanks dan v2: Re-submitted as a threaded series as per tho...@monjalon.net suggestions. cc'd Ferruh on cover letter. No code changes. Dan Gora (10): kni: remove unused variables from struct kni_dev kni: separate releasing netdev from freeing KNI

[dpdk-dev] [PATCH v2 01/10] kni: remove unused variables from struct kni_dev

2018-06-28 Thread Dan Gora
Remove the unused fields 'status' and 'synchro' from the struct kni_dev. Signed-off-by: Dan Gora --- kernel/linux/kni/kni_dev.h | 4 1 file changed, 4 deletions(-) diff --git a/kernel/linux/kni/kni_dev.h b/kernel/linux/kni/kni_dev.h index 6275ef27f..ed42989cc 100644 --

[dpdk-dev] [PATCH v2 03/10] kni: don't touch struct kni_dev after freeing

2018-06-28 Thread Dan Gora
the net_dev with unregister_netdev from freeing the net_device and kni_dev structures into separate functions and ensure that we do not touch anything in the kni_dev structure after freeing it (ie don't call list_del(), etc...). Signed-off-by: Dan Gora --- kernel/linux/kni/kni_dev.h

[dpdk-dev] [PATCH v2 04/10] kni: add rte_kni_free to KNI library

2018-06-28 Thread Dan Gora
Add the new rte_kni_free() API function to the KNI library. This function will be called by DPDK applications after rte_kni_release() to free the KNI interface resources from the kernel driver. Signed-off-by: Dan Gora --- lib/librte_kni/rte_kni.c | 32 +--- lib

[dpdk-dev] [PATCH v2 02/10] kni: separate releasing netdev from freeing KNI interface

2018-06-28 Thread Dan Gora
rforms the RTE_KNI_IOCTL_FREE ioctl which calls kni_ioctl_free(). This function removes the struct kni_dev from the list of interfaces to poll (and kills the per-dev kthread, if configured for multi-thread), then frees the memory in the FIFOs. Signed-off-by: Dan Gora --- kernel/linux/kni/

[dpdk-dev] [PATCH v2 06/10] kni: increase length of timeout for KNI responses

2018-06-28 Thread Dan Gora
rte_kni_handle_request(). Signed-off-by: Dan Gora --- kernel/linux/kni/kni_net.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c index 7fcfa106c..0850be434 100644 --- a/kernel/linux/kni/kni_net.c +++ b/kernel/linux/kni/kni_net.c

[dpdk-dev] [PATCH v2 05/10] kni: don't run rte_kni_handle_request after interface release

2018-06-28 Thread Dan Gora
Check to ensure that the KNI interface is still in use before accessing the KNI interface FIFOs to kernel space. This will help to ensure that the user does not access the KNI interface after rte_kni_release() has been called. Signed-off-by: Dan Gora --- lib/librte_kni/rte_kni.c | 6

[dpdk-dev] [PATCH v2 07/10] kni: update kni test for rte_kni_free

2018-06-28 Thread Dan Gora
Add support for testing rte_kni_free() function. Signed-off-by: Dan Gora --- test/test/test_kni.c | 20 1 file changed, 20 insertions(+) diff --git a/test/test/test_kni.c b/test/test/test_kni.c index 56773c8a2..ec051c07e 100644 --- a/test/test/test_kni.c +++ b/test/test

[dpdk-dev] [PATCH v2 08/10] kni: add rte_kni_free to KNI example app

2018-06-28 Thread Dan Gora
Add rte_kni_free to the KNI example application. Signed-off-by: Dan Gora --- examples/kni/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/kni/main.c b/examples/kni/main.c index 4b162debb..75e23cd0f 100644 --- a/examples/kni/main.c +++ b/examples/kni/main.c

[dpdk-dev] [PATCH v2 10/10] kni: add API to set link status on kernel interface

2018-06-28 Thread Dan Gora
Add a new API function to KNI, rte_kni_update_link() to allow DPDK applications to update the link state for the KNI network interfaces in the linux kernel. Note that the default carrier state is set to off when the interface is opened. Signed-off-by: Dan Gora --- kernel/linux/kni/kni_misc.c

[dpdk-dev] [PATCH v2 09/10] kni: add rte_kni_free to KNI vdev driver

2018-06-28 Thread Dan Gora
Add rte_kni_free to the virual KNI device. Signed-off-by: Dan Gora --- drivers/net/kni/rte_eth_kni.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c index ab63ea427..24c6991e6 100644 --- a/drivers/net/kni

Re: [dpdk-dev] [PATCH v5 3/5] examples/kni: monitor and update link status continually

2018-10-22 Thread Dan Gora
On Mon, Oct 22, 2018 at 9:51 AM Ferruh Yigit wrote: > > +Running the kni Example Application > > +--- > > > > -Loading the KNI kernel module without any parameter is the typical way a > > DPDK application > > -gets packets into and out of the kernel net stack. > >

[dpdk-dev] [PATCH v6 1/5] kni: add API to set link status on kernel interface

2018-10-24 Thread Dan Gora
Add a new API function to KNI, rte_kni_update_link() to allow DPDK applications to update the link status for KNI network interfaces in the linux kernel. Signed-off-by: Dan Gora --- lib/librte_kni/rte_kni.c | 41 lib/librte_kni/rte_kni.h | 20 lib

[dpdk-dev] [PATCH v6 5/5] examples/kni: improve zeroing statistics

2018-10-24 Thread Dan Gora
rx/tx_packets in worker threads by a non-zero amount. This limits the race to the periods in which traffic is actually being received or transmitted. Signed-off-by: Dan Gora --- examples/kni/main.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/kni/main.c b

[dpdk-dev] [PATCH v6 0/5] kni: add API to set link status on kernel interface

2018-10-24 Thread Dan Gora
k status and > update the corresponding kernel interface with > rte_kni_update_link(). > > * Minor improvements to examples/kni: Add log message showing how > to show/zero stats. Improve zeroing statistics. > > Note that checkpatches.sh compains about patch 1/5, but this

[dpdk-dev] [PATCH v6 2/5] kni: set default carrier state of interface

2018-10-24 Thread Dan Gora
n be set to 'on'. This enables the KNI interface to be used without having to explicity set the carrier state to 'on' using rte_kni_update_link(). Signed-off-by: Dan Gora --- .../prog_guide/kernel_nic_interface.rst | 239 ++ kernel/linux/kni/kni_dev.h

[dpdk-dev] [PATCH v6 3/5] examples/kni: monitor and update link status continually

2018-10-24 Thread Dan Gora
Update KNI example to add the command line flag '-m' to enable a function to continuously monitor the Ethernet link status of the physical link and update the link status of the corresponding interfaces with rte_kni_update_link(). Signed-off-by: Dan Gora --- .../sam

[dpdk-dev] [PATCH v6 4/5] examples/kni: add log msgs to show and clear stats

2018-10-24 Thread Dan Gora
Add logging messages showing the commands necessary for the user to have the application display and zero the statistics. Signed-off-by: Dan Gora --- examples/kni/main.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/examples/kni/main.c b/examples/kni

Re: [dpdk-dev] [PATCH v6 4/5] examples/kni: add log msgs to show and clear stats

2018-10-24 Thread Dan Gora
On Wed, Oct 24, 2018 at 5:46 PM Stephen Hemminger wrote: > > + pid = getpid(); > > + RTE_LOG(INFO, APP, "\n"); > > + RTE_LOG(INFO, APP, "KNI Running\n"); > > + RTE_LOG(INFO, APP, "kill -SIGUSR1 %d\n", pid); > > + RTE_LOG(INFO, APP, "Show KNI Statisti

Re: [dpdk-dev] [PATCH v6 4/5] examples/kni: add log msgs to show and clear stats

2018-10-24 Thread Dan Gora
On Wed, Oct 24, 2018 at 6:18 PM Stephen Hemminger wrote: > > > > > > This seems like an overly wordy message which should really be in the > > > documentation > > > not a billboard in the code. > > > > > > In my opinion, having verbose messages is unhelpful since it just clutters > > > the experi

[dpdk-dev] [PATCH v7 1/5] kni: add API to set link status on kernel interface

2018-10-24 Thread Dan Gora
Add a new API function to KNI, rte_kni_update_link() to allow DPDK applications to update the link status for KNI network interfaces in the linux kernel. Signed-off-by: Dan Gora --- lib/librte_kni/rte_kni.c | 41 lib/librte_kni/rte_kni.h | 20 lib

[dpdk-dev] [PATCH v7 0/5] kni: add API to set link status on kernel interface

2018-10-24 Thread Dan Gora
o examples/kni: Add log message showing how > to show/zero stats. Improve zeroing statistics. > > Note that checkpatches.sh compains about patch 1/5, but this appears > to be a bug with check-symbol-change or something. If I move the > fragment of the patch modifying rte_kni_versi

[dpdk-dev] [PATCH v7 3/5] examples/kni: monitor and update link status continually

2018-10-24 Thread Dan Gora
Update KNI example to add the command line flag '-m' to enable a function to continuously monitor the Ethernet link status of the physical link and update the link status of the corresponding interfaces with rte_kni_update_link(). Signed-off-by: Dan Gora --- .../sam

[dpdk-dev] [PATCH v7 4/5] examples/kni: add log msgs to show and clear stats

2018-10-24 Thread Dan Gora
Add logging messages showing the commands necessary for the user to have the application display and zero the statistics. Signed-off-by: Dan Gora --- examples/kni/main.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/examples/kni/main.c b/examples/kni

[dpdk-dev] [PATCH v7 2/5] kni: set default carrier state of interface

2018-10-24 Thread Dan Gora
n be set to 'on'. This enables the KNI interface to be used without having to explicity set the carrier state to 'on' using rte_kni_update_link(). Signed-off-by: Dan Gora --- .../prog_guide/kernel_nic_interface.rst | 239 ++ kernel/linux/kni/kni_dev.h

[dpdk-dev] [PATCH v7 5/5] examples/kni: improve zeroing statistics

2018-10-24 Thread Dan Gora
rx/tx_packets in worker threads by a non-zero amount. This limits the race to the periods in which traffic is actually being received or transmitted. Signed-off-by: Dan Gora --- examples/kni/main.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/kni/main.c b

Re: [dpdk-dev] PDF guides broken

2018-10-29 Thread Dan Gora
It looks like it's choking on a figure in the mvpp2.rst file: guides/nics/mvpp2.rst:.. figure:: img/mvpp2_tm.svg Reverting commit 0ba610ca1d178cbeedba6e033ee399dfe773801e fixes it. This fixes it too: diff --git a/doc/guides/nics/mvpp2.rst b/doc/guides/nics/mvpp2.rst index 59fa0e10d..10303a1c1 1

[dpdk-dev] [PATCH] net/mvpp2: fix building pdf documentation

2018-10-29 Thread Dan Gora
Don't use .svg extension on ..figure references. PDF versions of the documents use .png images generated from the .svg images. Fixes: 0ba610ca1d17 ("net/mvpp2: document MTR and TM usage") Cc: nsams...@marvell.com Signed-off-by: Dan Gora --- doc/guides/nics/mvpp2.rst | 2 +- 1

Re: [dpdk-dev] [PATCH] doc: update release notes for default KNI carries status

2018-11-05 Thread Dan Gora
Hi Ferruh, On Mon, Nov 5, 2018 at 3:28 PM Ferruh Yigit wrote: > > Commit 89397a01ce4a ("kni: set default carrier state of interface") > changes the KNI interface default carrier status. Which prevents traffic > flow by default and may break some existing usage / testing. > > Document this behavio

Re: [dpdk-dev] [PATCH] doc: update release notes for default KNI carries status

2018-11-05 Thread Dan Gora
On Mon, Nov 5, 2018 at 4:21 PM Ferruh Yigit wrote: > There is no test plan documentation within dpdk repo. There is DTS (dpdk test > suit) in a separate repo [1], which needs to be updated, and indeed this patch > is to point them the change because existing test is failing after changes... > > [1

[dpdk-dev] [PATCH] doc: add kni changes to release note

2018-11-05 Thread Dan Gora
Add the new module parameter for the KNI kernel module, the new command line flag for the KNI sample application, and the new API function 'rte_kni_update_link()' to the release note. Signed-off-by: Dan Gora --- doc/guides/rel_notes/release_18_11.rst | 13 + 1 file c

Re: [dpdk-dev] [PATCH] doc: update release notes for default KNI carries status

2018-11-05 Thread Dan Gora
On Mon, Nov 5, 2018 at 4:23 PM Dan Gora wrote: > > On Mon, Nov 5, 2018 at 4:21 PM Ferruh Yigit wrote: > > There is no test plan documentation within dpdk repo. There is DTS (dpdk > > test > > suit) in a separate repo [1], which needs to be updated, and indeed this &

Re: [dpdk-dev] [PATCH] doc: add kni changes to release note

2018-11-05 Thread Dan Gora
On Mon, Nov 5, 2018 at 5:06 PM Ferruh Yigit wrote: > > +* kni: Added the new API function ``rte_kni_update_link()`` to allow the > > user > > + to set the carrier state of the KNI kernel network interface. > > + > > It is good to document new API, which can be on "new features" section above, >

[dpdk-dev] [PATCH v2] doc: add kni changes to release note

2018-11-05 Thread Dan Gora
Add the new module parameter for the KNI kernel module, the new command line flag for the KNI sample application, and the new API function 'rte_kni_update_link()' to the release note. Signed-off-by: Dan Gora --- doc/guides/rel_notes/release_18_11.rst | 19 +++ 1 file c

Re: [dpdk-dev] [PATCH] kni: Fix kni_autotest for new Rx/Tx offloads API

2018-08-01 Thread Dan Gora
Hi Thomas, thanks... Is it worthwhile to mark this patch as eligible for backporting? d On Wed, Aug 1, 2018 at 1:43 PM, Thomas Monjalon wrote: > > 29/06/2018 01:02, Dan Gora: > > Fixed a bug where kni_autotest would not start due to the lack of the > > ETH_TXQ_FLAGS_IGNORE

Re: [dpdk-dev] [PATCH v2 10/10] kni: add API to set link status on kernel interface

2018-08-29 Thread Dan Gora
On Wed, Aug 29, 2018 at 12:54 PM, Stephen Hemminger wrote: > On Thu, 28 Jun 2018 18:55:08 -0700 > Dan Gora wrote: > >> Add a new API function to KNI, rte_kni_update_link() to allow DPDK >> applications to update the link state for the KNI network interfaces >> in t

Re: [dpdk-dev] [PATCH v2 10/10] kni: add API to set link status on kernel interface

2018-08-29 Thread Dan Gora
On Wed, Aug 29, 2018 at 8:48 AM, Ferruh Yigit wrote: > On 6/29/2018 2:55 AM, Dan Gora wrote: >> Add a new API function to KNI, rte_kni_update_link() to allow DPDK >> applications to update the link state for the KNI network interfaces >> in the linux kernel. >> >&

Re: [dpdk-dev] [PATCH v2 10/10] kni: add API to set link status on kernel interface

2018-08-29 Thread Dan Gora
; >> Note that the default carrier state is set to off when the interface >> >> is opened. >> >> >> >> Signed-off-by: Dan Gora >> > >> > Do you really need a special ioctl for this? >> > There is already ability to set link state v

Re: [dpdk-dev] [PATCH v2 10/10] kni: add API to set link status on kernel interface

2018-08-29 Thread Dan Gora
On Wed, Aug 29, 2018 at 7:12 PM, Dan Gora wrote: > On Wed, Aug 29, 2018 at 7:00 PM, Stephen Hemminger > wrote: >>> >> Add a new API function to KNI, rte_kni_update_link() to allow DPDK >>> >> applications to update the link state for the KNI network i

Re: [dpdk-dev] [PATCH v2 10/10] kni: add API to set link status on kernel interface

2018-08-30 Thread Dan Gora
Hi All, So I'm a little unclear as to what to do here moving forward.. Do we all agree at least that there should be some function in DPDK in order to set the link state for KNI interfaces? I'm a strong yes on this point. I don't think that every KNI user should have to implement something like

Re: [dpdk-dev] [PATCH v2 10/10] kni: add API to set link status on kernel interface

2018-08-30 Thread Dan Gora
On Thu, Aug 30, 2018 at 7:09 PM, Stephen Hemminger wrote: > On Thu, 30 Aug 2018 18:41:14 -0300 > Dan Gora wrote: > >> On the other hand, the "write to /sys" method is a bit more simple and >> confines the changes to the user space library. If we're confiden

Re: [dpdk-dev] [PATCH v2 02/10] kni: separate releasing netdev from freeing KNI interface

2018-09-03 Thread Dan Gora
Hi Ferruh, thanks for your feedback.. I apologize for the delay getting back to you on this.. On Wed, Aug 29, 2018 at 7:59 AM, Ferruh Yigit wrote: > You are right, that problem exits. > Although I don't see problem related to holding the kni_list_lock, polling > thread terminated before unregist

Re: [dpdk-dev] [PATCH v2 02/10] kni: separate releasing netdev from freeing KNI interface

2018-09-03 Thread Dan Gora
Hi Ferruh, I remembered now the motivation behind separating rte_kni_release() and rte_kni_free(). The problem is that the DPDK thread which calls rte_kni_release() _cannot_ be the same thread which handles callbacks from the KNI driver via rte_kni_handle_request(). This is because the thread wh

Re: [dpdk-dev] [PATCH v2 10/10] kni: add API to set link status on kernel interface

2018-09-03 Thread Dan Gora
(2.6+). It's not clear if this is a problem for DPDK apps or not. thanks dan On Thu, Aug 30, 2018 at 7:11 PM, Dan Gora wrote: > On Thu, Aug 30, 2018 at 7:09 PM, Stephen Hemminger > wrote: >> On Thu, 30 Aug 2018 18:41:14 -0300 >> Dan Gora wrote: >> >>>

Re: [dpdk-dev] [PATCH v2 10/10] kni: add API to set link status on kernel interface

2018-09-11 Thread Dan Gora
Hi All, So I implemented the "write to /sys/devices/virtual/net/*/carrier" method to change the link status, but there is one more minor thing that I wanted to point out about this approach. The problem is that you cannot read or write the '/sys/devices/virtual/net/*/carrier' file while the inter

Re: [dpdk-dev] [PATCH v2 10/10] kni: add API to set link status on kernel interface

2018-09-11 Thread Dan Gora
On Tue, Sep 11, 2018 at 6:52 PM, Stephen Hemminger wrote: > The carrier state has no meaning when device is down, at least for physical > devices. Because often the PHY is powered off when the device is marked down. The thing that caught my attention is that when you mark a kernel ethernet device

[dpdk-dev] [PATCH 0/2] kni: add API to set link status on kernel interface

2018-09-11 Thread Dan Gora
. These patches supercede: '[PATCH v2 10/10] kni: add API to set link status on kernel interface' Message-Id: <20180629015508.26599-11...@adax.com> Dan Gora (2): kni: add API to set link status on kernel interface kni: set default carrier state to 'off' kernel

[dpdk-dev] [PATCH 1/2] kni: add API to set link status on kernel interface

2018-09-11 Thread Dan Gora
Add a new API function to KNI, rte_kni_update_link() to allow DPDK applications to update the link status for KNI network interfaces in the linux kernel. Signed-off-by: Dan Gora --- lib/librte_kni/rte_kni.c | 57 lib/librte_kni/rte_kni.h | 18

Re: [dpdk-dev] [PATCH 1/2] kni: add API to set link status on kernel interface

2018-09-11 Thread Dan Gora
Sorry all.. I totally goofed up with git-send-email.. Please ignore this message. On Tue, Sep 11, 2018 at 8:14 PM, Dan Gora wrote: > Add a new API function to KNI, rte_kni_update_link() to allow DPDK > applications to update the link status for KNI network interfaces in > the linux kernel. >

[dpdk-dev] [PATCH 0/2] kni: add API to set link status on kernel interface

2018-09-11 Thread Dan Gora
. These patches supercede: '[PATCH v2 10/10] kni: add API to set link status on kernel interface' https://mails.dpdk.org/archives/dev/2018-August/110383.html Dan Gora (2): kni: add API to set link status on kernel interface kni: set default carrier state to 'off' kernel/

  1   2   >