Re: [PATCH] kni: fix use-after-free when kni release

2022-02-09 Thread Igor Ryzhov
Acked-by: Igor Ryzhov On Wed, Feb 9, 2022 at 10:36 AM Min Hu (Connor) wrote: > Hi, Igor, > fixed in v2, please check it, thanks. > > 在 2022/2/8 20:41, Igor Ryzhov 写道: > > Looks correct. > > Could you, please, also change the order of `list_del` and > > `kni_de

Re: [PATCH] kni: fix use-after-free when kni release

2022-02-08 Thread Igor Ryzhov
Looks correct. Could you, please, also change the order of `list_del` and `kni_dev_remove` in `kni_release`? It suffers from the same problem. Igor On Fri, Jan 28, 2022 at 5:43 AM Min Hu (Connor) wrote: > From: Huisong Li > > The "kni_dev" is the private data of the "net_device" in kni, and al

Re: [PATCH] kni: restrict bifurcated device support

2021-11-17 Thread Igor Ryzhov
Acked-by: Igor Ryzhov On Sat, Oct 9, 2021 at 2:58 AM Ferruh Yigit wrote: > To enable bifurcated device support, rtnl_lock is released before calling > userspace callbacks and asynchronous requests are enabled. > > But these changes caused more issues, like bug #809, #816. To reduce

Re: [dpdk-dev] [PATCH v5 1/3] kni: rework rte_kni_update_link using ioctl

2021-08-30 Thread Igor Ryzhov
On Thu, Aug 26, 2021 at 9:06 PM Stephen Hemminger < step...@networkplumber.org> wrote: > On Thu, 26 Aug 2021 20:46:47 +0300 > Igor Ryzhov wrote: > > > Could you please clarify where exactly do I need to use rtnl lock? > > From what I understand, netif_carrier_on/of

[dpdk-dev] [PATCH v6 3/3] app/test: fix return value of test_kni_link_change

2021-08-30 Thread Igor Ryzhov
If the child process returns -1, WEXITSTATUS converts to 255 because it takes only 8 least significant bits. As a result, the test is not considered failed when it should. Signed-off-by: Igor Ryzhov --- app/test/test_kni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app

[dpdk-dev] [PATCH v6 2/3] kni: implement basic get_link_ksettings callback

2021-08-30 Thread Igor Ryzhov
It allows inspecting link parameters using ethtool. Signed-off-by: Igor Ryzhov --- kernel/linux/kni/kni_net.c | 25 + 1 file changed, 25 insertions(+) diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c index 611719b5ee27..931b9daf104f 100644 --- a

[dpdk-dev] [PATCH v6 1/3] kni: rework rte_kni_update_link using ioctl

2021-08-30 Thread Igor Ryzhov
interface right after we enabled it and we don't have to use any additional thread to track link status. Propagating speed/duplex/autoneg to the kernel module also allows us to implement ethtool_ops.get_link_ksettings callback. Suggested-by: Dan Gora Signed-off-by: Igor Ryzhov --- app/

Re: [dpdk-dev] [PATCH v5 1/3] kni: rework rte_kni_update_link using ioctl

2021-08-26 Thread Igor Ryzhov
Could you please clarify where exactly do I need to use rtnl lock? >From what I understand, netif_carrier_on/off can be called without the lock. On Thu, Aug 26, 2021 at 8:15 PM Stephen Hemminger < step...@networkplumber.org> wrote: > On Thu, 26 Aug 2021 18:19:09 +0300 > Igo

[dpdk-dev] [PATCH v5 3/3] app/test: fix return value of test_kni_link_change

2021-08-26 Thread Igor Ryzhov
If the child process returns -1, WEXITSTATUS converts to 255 because it takes only 8 least significant bits. As a result, the test is not considered failed when it should. Signed-off-by: Igor Ryzhov --- app/test/test_kni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app

[dpdk-dev] [PATCH v5 2/3] kni: implement basic get_link_ksettings callback

2021-08-26 Thread Igor Ryzhov
It allows inspecting link parameters using ethtool. Signed-off-by: Igor Ryzhov --- kernel/linux/kni/kni_net.c | 25 + 1 file changed, 25 insertions(+) diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c index 611719b5ee27..931b9daf104f 100644 --- a

[dpdk-dev] [PATCH v5 1/3] kni: rework rte_kni_update_link using ioctl

2021-08-26 Thread Igor Ryzhov
interface right after we enabled it and we don't have to use any additional thread to track link status. Propagating speed/duplex/autoneg to the kernel module also allows us to implement ethtool_ops.get_link_ksettings callback. Suggested-by: Dan Gora Signed-off-by: Igor Ryzhov --- app/

Re: [dpdk-dev] [PATCH v4 1/2] kni: rework rte_kni_update_link using ioctl

2021-07-06 Thread Igor Ryzhov
Hi Ferruh, Thanks for the review. My comments inline. I'll send a new version later this week. On Mon, Jul 5, 2021 at 2:58 PM Ferruh Yigit wrote: > On 7/4/2021 6:06 PM, Igor Ryzhov wrote: > > Current implementation doesn't allow us to update KNI carrier if the > > i

[dpdk-dev] [PATCH v4 2/2] kni: implement basic get_link_ksettings callback

2021-07-04 Thread Igor Ryzhov
Signed-off-by: Igor Ryzhov --- kernel/linux/kni/kni_net.c | 25 + 1 file changed, 25 insertions(+) diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c index 99da8d37dd6b..84357bec1341 100644 --- a/kernel/linux/kni/kni_net.c +++ b/kernel/linux/kni

[dpdk-dev] [PATCH v4 1/2] kni: rework rte_kni_update_link using ioctl

2021-07-04 Thread Igor Ryzhov
interface right after we enabled it and we don't have to use any additional thread to track link status. Propagating speed/duplex/autoneg to the kernel module also allows us to implement ethtool_ops.get_link_ksettings callback. Suggested-by: Dan Gora Signed-off-by: Igor Ryzhov --- app/

Re: [dpdk-dev] [PATCH v3] kni: rework rte_kni_update_link using ioctl

2021-06-28 Thread Igor Ryzhov
Thanks Ferruh, I'll send an update later this week. I also want to add a "Suggested-by: Dan Gora " as it was his idea. Dan, please let me know if you don't want this tag to be added. Thanks, Igor On Mon, Jun 28, 2021 at 3:55 PM Ferruh Yigit wrote: > On 10/27/2019 8:1

Re: [dpdk-dev] Experimental symbols in kni lib

2021-06-25 Thread Igor Ryzhov
Hi Ferruh, all, Let's please discuss another approach to setting KNI link status before making this API stable: http://patches.dpdk.org/project/dpdk/patch/20190925093623.18419-1-iryz...@nfware.com/ I explained the problem with the current implementation there. More than that, using ioctl approach

Re: [dpdk-dev] [dpdk-stable] [PATCH v5 3/3] kni: fix kernel deadlock when using mlx devices

2021-04-23 Thread Igor Ryzhov
t settings... On Fri, Apr 23, 2021 at 3:43 PM Igor Ryzhov wrote: > Hi Ferruh, > > Thanks. I think it would be great to make this configurable, and maybe even > make shutdown synchronous by default to preserve the old behavior. > > I would be grateful if you could spend time o

Re: [dpdk-dev] [dpdk-stable] [PATCH v5 3/3] kni: fix kernel deadlock when using mlx devices

2021-04-23 Thread Igor Ryzhov
wrote: > On 4/23/2021 9:41 AM, Igor Ryzhov wrote: > > This patch changes the behavior for KNI interface shutdown. > > Previously we would receive a real response from the driver, now we > > always receive success. > > I think this should be reflected in the docs/rel

Re: [dpdk-dev] [dpdk-stable] [PATCH v5 3/3] kni: fix kernel deadlock when using mlx devices

2021-04-23 Thread Igor Ryzhov
This patch changes the behavior for KNI interface shutdown. Previously we would receive a real response from the driver, now we always receive success. I think this should be reflected in the docs/release notes. Igor On Wed, Apr 21, 2021 at 2:07 AM Thomas Monjalon wrote: > 12/04/2021 16:35, Ela

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

2021-03-01 Thread Igor Ryzhov
which I think we all > agree exist (we just do not agree on the proper solution or patch)... > > That's my two cents, > > Elad. > > On Fri, Feb 26, 2021 at 5:49 PM Stephen Hemminger > wrote: > > > > On Fri, 26 Feb 2021 00:01:01 +0300 > > Igor Ryzhov

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

2021-02-25 Thread Igor Ryzhov
Hi Elad, Thanks for the patch, but this is still NACK from me. The only real advantage of KNI over other exceptional-path techniques like virtio-user is the ability to configure DPDK-managed interfaces directly from the kernel using well-known utils like iproute2. A very important part of this is

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

2021-02-24 Thread Igor Ryzhov
Elad. > > On Wed, Feb 24, 2021 at 5:18 PM Igor Ryzhov wrote: > > > > Stephen's idea was to fix the deadlock when working with the bifurcated > driver. > > Your rework breaks this because you still send link down requests under > rtnl_lock. > > Did you test your

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

2021-02-24 Thread Igor Ryzhov
y to lock rtnl, resulting in a deadlock. > The remedy is to release rtnl before locking the KNI sync lock. > Since in between nothing is accessing Linux network-wise, > no rtnl locking is needed. > " > > FYI, > > Elad. > > On Wed, Feb 24, 2021 at 4:41 PM Igor Ryzhov

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

2021-02-24 Thread Igor Ryzhov
t; Having KNI deadlock frequently for real life applications is far worst, > IMHO. > > FYI > > Elad. > > On Wed, Feb 24, 2021 at 4:04 PM Igor Ryzhov wrote: > > > > Elad, > > > > I understand your point. > > But the fact that this fix works for you doesn'

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

2021-02-24 Thread Igor Ryzhov
; then you will always have to return success, even on failure, as Linux > kernel does not have a mechanism to asynchronously report on failure > for such system calls. > > IMHO - weighting the non-reporting of failure versus how the code > looks (as it functions perfectly OK), I decide

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

2021-02-24 Thread Igor Ryzhov
This looks more like a hack than an actual fix to me. After this commit: "ip link set up" is sent to the userspace with unlocked rtnl_lock "ip link set down" is sent to the userspace with locked rtnl_lock How is this really fixing anything? IMHO it only complicates the code. If talking with users

Re: [dpdk-dev] KNI alternatives

2021-01-13 Thread Igor Ryzhov
On Wed, Jan 13, 2021 at 9:45 PM Thomas Monjalon wrote: > 13/01/2021 19:17, Igor Ryzhov: > > On Wed, Jan 13, 2021 at 8:10 PM Stephen Hemminger < > > step...@networkplumber.org> wrote: > > > On Wed, Jan 13, 2021, 9:06 AM Thomas Monjalon > wrote: > > >

Re: [dpdk-dev] KNI alternatives

2021-01-13 Thread Igor Ryzhov
On Wed, Jan 13, 2021 at 8:10 PM Stephen Hemminger < step...@networkplumber.org> wrote: > Last time I tried. > Virtio user was as fast as KNI and consumed less cpu. Was seeing 10mpps > Tap was much slower. Like 1mpps. > > Vpp uses virtio user. > > Sorry for top post. Only have phone internet > > On

Re: [dpdk-dev] [PATCH] net/i40e: fix counters

2020-11-24 Thread Igor Ryzhov
Original Message- > > From: dev On Behalf Of Thomas Monjalon > > Sent: Tuesday, November 24, 2020 4:25 PM > > To: Igor Ryzhov ; dev ; Guo, Jia > > > > Cc: dpdk stable ; Xing, Beilei ; > Yigit, > > Ferruh > > Subject: Re: [dpdk-dev] [PATCH] net/i40e:

Re: [dpdk-dev] [PATCH] net/i40e: fix counters

2020-11-19 Thread Igor Ryzhov
CC maintainers and Thomas. This fix should be 20.11. The issue is seen multiple times a day under ~20G traffic with stats collection once per second. Igor On Tue, Nov 17, 2020 at 11:56 AM Igor Ryzhov wrote: > When low and high registers are read separately, this opens the door to >

[dpdk-dev] [PATCH] net/i40e: fix counters

2020-11-17 Thread Igor Ryzhov
ernel since the introduction of the i40e driver. Fixes: 4861cde46116 ("i40e: new poll mode driver") Cc: sta...@dpdk.org Signed-off-by: Igor Ryzhov --- drivers/net/i40e/base/i40e_osdep.h | 10 ++ drivers/net/i40e/i40e_ethdev.c | 10 +++--- 2 files changed, 17 insertions(

Re: [dpdk-dev] [RFC v2 2/2] doc: announce queue stats moving to xstats

2020-10-15 Thread Igor Ryzhov
Done. https://bugs.dpdk.org/show_bug.cgi?id=558 On Thu, Oct 15, 2020 at 11:03 AM Thomas Monjalon wrote: > 15/10/2020 09:55, Igor Ryzhov: > > Hi Thomas, > > > > Thanks for the slides, I checked the latest code and multicast/broadcast > > counters mostly look stan

Re: [dpdk-dev] [RFC v2 2/2] doc: announce queue stats moving to xstats

2020-10-15 Thread Igor Ryzhov
t 12:45 PM Thomas Monjalon wrote: > 14/10/2020 11:35, Igor Ryzhov: > > Hi Ferruh, > > > > As rte_eth_stats is going to be changed, is it possible to add new > counters > > there? > > For example, in/out multicast/broadcast packets. > > Good question. > In

Re: [dpdk-dev] [RFC v2 2/2] doc: announce queue stats moving to xstats

2020-10-14 Thread Igor Ryzhov
Hi Ferruh, As rte_eth_stats is going to be changed, is it possible to add new counters there? For example, in/out multicast/broadcast packets. Igor On Wed, Oct 14, 2020 at 5:27 AM Ferruh Yigit wrote: > Queue stats will be removed from basic stats to xstats. > > It will be PMDs responsibility t

Re: [dpdk-dev] [dpdk-stable] [PATCH v2] net/i40e: fix incorrect byte counters

2020-09-18 Thread Igor Ryzhov
Hi, Your code will work only if stats are updated at least once between two overflows. So it's still up to the application to handle this properly. I think it should be mentioned in the docs. Igor On Fri, Sep 18, 2020 at 6:45 AM Jiang, JunyuX wrote: > Hi Ferruh, > > > -Original Message

Re: [dpdk-dev] [PATCH] kni: fix kernel deadlock when using mlx devices

2020-07-28 Thread Igor Ryzhov
Hi, Didn't see this patch previously, but we came up with the same idea internally and also faced a hang during the application shutdown. We didn't dig deep, but it occurred in kni_release function. Igor On Mon, Jul 27, 2020 at 8:53 PM Stephen Hemminger < step...@networkplumber.org> wrote: > On

Re: [dpdk-dev] [PATCH] net/i40e: fix getting eeprom information

2020-07-05 Thread Igor Ryzhov
CCing i40e maintainers. This is a trivial fix without which getting module EEPROM doesn't work at all. On Thu, Jul 2, 2020 at 3:37 PM Pavel Ivashchenko wrote: > Signed-off-by: Pavel Ivashchenko > --- > drivers/net/i40e/i40e_ethdev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > d

Re: [dpdk-dev] [PATCH] kernel/linux: fix kernel dir for meson

2019-12-02 Thread Igor Ryzhov
that headers must be in $kernel_dir/build which is usually a symlink to /usr/src/linux-headers-kernel-version. Just set kernel_dir correctly and there won't be compilation failure. Igor On Mon, Dec 2, 2019 at 11:43 AM Ye Xiaolong wrote: > Hi, Igor > > Thanks for the feedback. > &

Re: [dpdk-dev] [PATCH] kernel/linux: fix kernel dir for meson

2019-12-02 Thread Igor Ryzhov
Hi Xiaolong, Nack from me. It's just an incorrect revert of my fix. Kernel modules will be installed in wrong directory, just check install_dir parameter in kni/meson.build and igb_uio/meson.build. Igor On Mon, Dec 2, 2019 at 9:18 AM Xiaolong Ye wrote: > kernel_dir option in meson build is equ

Re: [dpdk-dev] [PATCH] kni: increase kernel version requirement for VA

2019-11-20 Thread Igor Ryzhov
Hi Ferruh, There is a typo in "version incread to > 4.9.0 ...". incread > increased Igor On Wed, Nov 20, 2019 at 7:00 PM Ferruh Yigit wrote: > A build error reported related to the selected > 'get_user_pages_remote()' kernel API: > > .../kernel/linux/kni/kni_dev.h:113:8: > error: too few arg

Re: [dpdk-dev] [PATCH] kni: reduce interface name size

2019-11-15 Thread Igor Ryzhov
Hi Michael, Isn't it better to set it to IFNAMSIZ instead of 16? Best regards, Igot On Fri, Nov 15, 2019 at 2:41 PM Michael Pfeiffer < michael.pfeif...@tu-ilmenau.de> wrote: > The name in rte_kni_device_info is passed to the kernel, which allows > interface names with at most 16 bytes (IFNAMSIZ

Re: [dpdk-dev] [PATCH v3] kni: rework rte_kni_update_link using ioctl

2019-10-27 Thread Igor Ryzhov
n the DPDK devel list you > > should be able to suss out the whole discussion that lead to the > > current implementation. > > > > thanks > > dan > > > > On Mon, Oct 14, 2019 at 1:17 PM Ferruh Yigit > wrote: > > > > > > O

Re: [dpdk-dev] [PATCH v2] kni: add ability to set min/max MTU

2019-10-27 Thread Igor Ryzhov
Hi David, Ferruh, Sorry I was on vacation. Thank you for dealing with this. Best regards, Igor On Sun, Oct 27, 2019 at 1:12 PM David Marchand wrote: > On Fri, Oct 25, 2019 at 8:31 PM Ferruh Yigit > wrote: > > > > From: Igor Ryzhov > > > > Starting with kernel v

[dpdk-dev] [PATCH v3] kni: rework rte_kni_update_link using ioctl

2019-09-25 Thread Igor Ryzhov
interface right after we enabled it and we don't have to use any additional thread to track link status. Signed-off-by: Igor Ryzhov --- v3: remove unused variables v2: fix checkpatch warnings kernel/linux/kni/compat.h | 4 -- kernel/linux/kni/kni_misc.c

Re: [dpdk-dev] [PATCH v2] kni: rework rte_kni_update_link using ioctl

2019-09-25 Thread Igor Ryzhov
Sure, my bad, sorry. Will send v3. On Tue, Sep 24, 2019 at 11:37 PM Aaron Conole wrote: > Igor Ryzhov writes: > > > Current implementation doesn't allow us to update KNI carrier if the > > interface is not yet UP in kernel. It means that we can't use it in

[dpdk-dev] [PATCH v2] kni: rework rte_kni_update_link using ioctl

2019-09-24 Thread Igor Ryzhov
interface right after we enabled it and we don't have to use any additional thread to track link status. Signed-off-by: Igor Ryzhov --- v2: fix checkpatch warnings kernel/linux/kni/compat.h | 4 -- kernel/linux/kni/kni_misc.c | 42 ++

[dpdk-dev] [PATCH] kni: rework rte_kni_update_link using ioctl

2019-09-24 Thread Igor Ryzhov
interface right after we enabled it and we don't have to use any additional thread to track link status. Signed-off-by: Igor Ryzhov --- kernel/linux/kni/compat.h | 4 -- kernel/linux/kni/kni_misc.c | 47 +++ kernel/linu

[dpdk-dev] [PATCH] kni: add ability to set min/max MTU

2019-09-19 Thread Igor Ryzhov
Starting with kernel version 4.10, there are new min/max MTU values in net_device structure, which are set to ETH_MIN_MTU and ETH_DATA_LEN by default. We should be able to change these values to allow MTU more than 1500 to be set on KNI. Signed-off-by: Igor Ryzhov --- examples/kni/main.c

Re: [dpdk-dev] [PATCH] config: set RTE_KNI_PREEMPT_DEFAULT in meson

2019-09-17 Thread Igor Ryzhov
p 16, 2019 at 1:08 PM Igor Ryzhov wrote: > Same behavior as in make build system. > > Signed-off-by: Igor Ryzhov > --- > config/rte_config.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/config/rte_config.h b/config/rte_config.h > index 0bbbe274f..e6

[dpdk-dev] [PATCH] config: set RTE_KNI_PREEMPT_DEFAULT in meson

2019-09-16 Thread Igor Ryzhov
Same behavior as in make build system. Signed-off-by: Igor Ryzhov --- config/rte_config.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/rte_config.h b/config/rte_config.h index 0bbbe274f..e6a35a170 100644 --- a/config/rte_config.h +++ b/config/rte_config.h @@ -98,6 +98,9

Re: [dpdk-dev] [PATCH v9 2/5] kni: add IOVA=VA support in KNI lib

2019-07-29 Thread Igor Ryzhov
Hi, I believe iova_mode check should not be automatic and should be a part of rte_kni_conf. What if I want to use KNI just as a pure virtual device without any connection to a real PCI device in an application that works in VA mode? Best regards, Igor On Mon, Jul 29, 2019 at 3:14 PM wrote: > >

Re: [dpdk-dev] [PATCH v5 9/9] kni: add minimal ethtool

2019-06-21 Thread Igor Ryzhov
Hi Stephen, As ethtool support is restored, I think your patch #7 should be updated to keep ethtool support in docs. Best regards, Igor On Thu, Jun 20, 2019 at 10:22 PM Stephen Hemminger wrote: > > Some applications use ethtool so add the minimum ethtool ops. > > Signed-off-by: Stephen Hemminge

[dpdk-dev] [PATCH v2] kernel/linux: fix modules install path

2019-06-11 Thread Igor Ryzhov
Currently kernel modules are installed into /usr/src instead of /lib/modules when meson build system is used. This patch fixes that. Signed-off-by: Igor Ryzhov --- v2 - don't change kernel_dir to kernel_version kernel/linux/igb_uio/meson.build | 4 ++-- kernel/linux/kni/meson.build

Re: [dpdk-dev] [PATCH] kernel/linux: fix modules install path

2019-06-10 Thread Igor Ryzhov
Thanks for the clarification, I get it now. I will send v2 later today. On Mon, Jun 10, 2019 at 2:12 PM Bruce Richardson wrote: > On Mon, Jun 10, 2019 at 02:04:26PM +0300, Igor Ryzhov wrote: > >Bruce, > >From my understanding, kernel_dir is a directory with kernel header

Re: [dpdk-dev] [PATCH] kernel/linux: fix modules install path

2019-06-10 Thread Igor Ryzhov
s set manually? On Mon, Jun 10, 2019 at 12:37 PM Bruce Richardson < bruce.richard...@intel.com> wrote: > On Mon, Jun 10, 2019 at 11:25:52AM +0300, Igor Ryzhov wrote: > > Currently kernel modules are installed into /usr/src/ instead of > > /lib/modules when meson build s

Re: [dpdk-dev] Incorrect install_dir for Linux kernel modules

2019-06-10 Thread Igor Ryzhov
Done – http://patches.dpdk.org/patch/54619/ On Fri, Jun 7, 2019 at 12:29 PM Bruce Richardson wrote: > On Thu, Jun 06, 2019 at 09:33:09PM +0300, Igor Ryzhov wrote: > > Hi everyone, > > > > I faced an issue today with install directory for rte_kni and igb_uio. > > Mod

[dpdk-dev] [PATCH] kernel/linux: fix modules install path

2019-06-10 Thread Igor Ryzhov
Currently kernel modules are installed into /usr/src/ instead of /lib/modules when meson build system is used. This patch fixes that. Old build option "kernel_dir" is changed to "kernel_version". Signed-off-by: Igor Ryzhov --- kernel/linux/igb_uio/meson.build | 2

[dpdk-dev] Incorrect install_dir for Linux kernel modules

2019-06-06 Thread Igor Ryzhov
Hi everyone, I faced an issue today with install directory for rte_kni and igb_uio. Modules are installed to '/usr/src/...' instead of '/lib/modules/...'. Right now install_dir for both modules is set to: install_dir: kernel_dir + '/../extra/dpdk' where 'kernel_dir' is set manually or automatic

[dpdk-dev] [PATCH] kni: remove PCI related information

2019-06-06 Thread Igor Ryzhov
As there is no ethtool support in KNI anymore, PCI related information is no longer needed. Signed-off-by: Igor Ryzhov --- kernel/linux/kni/kni_dev.h| 3 --- kernel/linux/kni/kni_misc.c | 6 -- lib/librte_eal/linux/eal/include/rte_kni_common.h

Re: [dpdk-dev] [PATCH v2] kni: implement header_ops parse method

2019-04-15 Thread Igor Ryzhov
dr is 8, however, Ethernet length is 6. Igor On Fri, Apr 12, 2019 at 8:15 PM Ferruh Yigit wrote: > On 4/12/2019 6:12 PM, Igor Ryzhov wrote: > > Hi Ferruh, > > > > I didn't test it with any special application, but FRR's ISIS works for > me after > > the

Re: [dpdk-dev] [PATCH v2] kni: implement header_ops parse method

2019-04-12 Thread Igor Ryzhov
Hi Ferruh, I didn't test it with any special application, but FRR's ISIS works for me after the patch, and it didn't work before. Igor On Fri, Apr 12, 2019 at 5:53 PM Ferruh Yigit wrote: > On 4/12/2019 3:52 PM, Ferruh Yigit wrote: > > On 4/10/2019 11:30 AM, Igor Ryzh

[dpdk-dev] [PATCH v2] kni: implement header_ops parse method

2019-04-10 Thread Igor Ryzhov
It allows applications running packet sockets over KNI interfaces to get source Ethernet addresses of packets received using recvfrom function. Signed-off-by: Igor Ryzhov --- v2: Use eth_header_parse instead of own implementation. --- kernel/linux/kni/kni_net.c | 1 + 1 file changed, 1

Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method

2019-04-08 Thread Igor Ryzhov
Hi Ferruh, Can we proceed with this patch? Igor On Thu, Jan 24, 2019 at 9:05 PM Igor Ryzhov wrote: > Hi Ferruh, > > Ok, no problem. Generally, it is needed for all applications using > packet(7) interface, running over KNI interfaces. > More specifically, one example of such

Re: [dpdk-dev] [PATCH] doc: deprecate KNI ethtool support

2019-02-18 Thread Igor Ryzhov
Acked-by: Igor Ryzhov On Mon, Feb 18, 2019 at 3:30 PM Ferruh Yigit wrote: > Remove KNI ethtool support. > > Signed-off-by: Ferruh Yigit > --- > RFC Patch: https://patches.dpdk.org/patch/49025/ > --- > doc/guides/rel_notes/deprecation.rst | 8 > 1 fi

Re: [dpdk-dev] [RFC] kni: remove ethtool support

2019-02-18 Thread Igor Ryzhov
Hi Ferruh, Thanks. Should I be a maintainer to ack the patch? Best regards, Igor On Mon, Feb 18, 2019 at 3:33 PM Ferruh Yigit wrote: > On 2/6/2019 1:12 PM, Igor Ryzhov wrote: > > Hi Ferruh, > > > > What's the plan with this patch? > > Hi Igor, > > I j

Re: [dpdk-dev] [RFC] kni: remove ethtool support

2019-02-06 Thread Igor Ryzhov
Hi Ferruh, What's the plan with this patch? Best regards, Igor On Sat, Jan 5, 2019 at 7:55 PM Igor Ryzhov wrote: > Hi Ferruh, > > I answered in another thread. > > Regarding this patch – I have no objections now. > > Best regards, > Igor > > On Tue, D

[dpdk-dev] i40e doesn't calculate RSS for GRE traffic.

2019-01-28 Thread Igor Ryzhov
Hello everyone, We are currently testing i40e support for RSS calculation. RSS is configured with all supported flags: #define I40E_RSS_OFFLOAD_ALL ( \ ETH_RSS_FRAG_IPV4 | \ ETH_RSS_NONFRAG_IPV4_TCP | \ ETH_RSS_NONFRAG_IPV4_UDP | \ ETH_RSS_NONFRAG_IPV4_SCTP | \ ETH_RSS_NONFRAG_IPV4_OTHER | \ ETH

Re: [dpdk-dev] [PATCH] kni: fix rte_kni_update_link

2019-01-28 Thread Igor Ryzhov
Hi again, Sorry for bothering, I should have done more testing. It works as it is now. So, self NACK on the patch. Best regards, Igor On Mon, Jan 28, 2019 at 2:45 PM Igor Ryzhov wrote: > Hi Ferruh, > > Can you, please, take a look at this patch? > The current implementation is bro

Re: [dpdk-dev] [PATCH] kni: fix rte_kni_update_link

2019-01-28 Thread Igor Ryzhov
Hi Ferruh, Can you, please, take a look at this patch? The current implementation is broken, I think the patch should be merged into 19.02 and 18.11.1. Best regards, Igor On Thu, Jan 24, 2019 at 11:47 PM Igor Ryzhov wrote: > After read, file offset must be set to 0 before write. > Oth

[dpdk-dev] [PATCH] kni: fix rte_kni_update_link

2019-01-24 Thread Igor Ryzhov
After read, file offset must be set to 0 before write. Otherwise, the third byte will be overwritten instead of the first. Fixes: c6fd54f28c24 ("kni: add function to set link state on kernel interface") Cc: sta...@dpdk.org Signed-off-by: Igor Ryzhov --- lib/librte_kni/rte_kni.c | 6

Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method

2019-01-24 Thread Igor Ryzhov
header_ops usage should be investigated separately, and possibly > resolved by > > a separate patch. > > Agreed, eth_header_ops usage should be investigated separately. > > > > > Best regards, > > Igor > > > > On Thu, Jan 24, 2019 at 5:10 PM Ferruh Yigit > &

Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method

2019-01-24 Thread Igor Ryzhov
ld be investigated separately, and possibly resolved by a separate patch. Best regards, Igor On Thu, Jan 24, 2019 at 5:10 PM Ferruh Yigit wrote: > On 1/24/2019 9:18 AM, Igor Ryzhov wrote: > > Hi Ferruh, > > > > What about this patch? > > Can you merge it as-is, or sh

Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method

2019-01-24 Thread Igor Ryzhov
Hi Ferruh, What about this patch? Can you merge it as-is, or should I change it to use relevant eth_header_ops functions? Or maybe completely use eth_header_ops? Best regards, Igor On Fri, Nov 30, 2018 at 10:07 PM Igor Ryzhov wrote: > Hi Ferruh, > > header_ops.parse method is us

Re: [dpdk-dev] [RFC] kni: remove ethtool support

2019-01-05 Thread Igor Ryzhov
Hi Ferruh, I answered in another thread. Regarding this patch – I have no objections now. Best regards, Igor On Tue, Dec 18, 2018 at 9:17 PM Ferruh Yigit wrote: > On 12/18/2018 9:20 AM, Ferruh Yigit wrote: > > On 12/18/2018 8:20 AM, Igor Ryzhov wrote: > >> Hi Ferruh, >

Re: [dpdk-dev] [PATCH v2] kni: use kni_ethtool_ops only with unknown drivers

2019-01-05 Thread Igor Ryzhov
tu or .ndo_set_mac_address. I want to add more types of requests to rte_kni_req_id enum and implement them. It's not an urgent task, so I don't know yet when I'll find time to do it. Best regards, Igor On Tue, Dec 18, 2018 at 9:13 PM Ferruh Yigit wrote: > On 12/3/2018 2:0

Re: [dpdk-dev] [RFC] kni: remove ethtool support

2018-12-18 Thread Igor Ryzhov
Hi Ferruh, Please, look at my patch http://patches.dpdk.org/patch/48454/ and consider rebasing your patch over mine. As we discussed with Stephen, KNI needs to supply ethtool_ops with .get_link function, to properly support link status. So we should save ethtool_ops and implement .get_link using

Re: [dpdk-dev] [PATCH v2] kni: use kni_ethtool_ops only with unknown drivers

2018-12-03 Thread Igor Ryzhov
other ethtool operations may be implemented in a driver-independent way using the same concept as for netdev_ops. On Mon, Dec 3, 2018 at 4:09 PM Ferruh Yigit wrote: > On 11/30/2018 11:38 PM, Stephen Hemminger wrote: > > On Fri, 30 Nov 2018 22:47:50 +0300 > > Igor Ryzhov wro

Re: [dpdk-dev] [PATCH v2] kni: use kni_ethtool_ops only with unknown drivers

2018-12-02 Thread Igor Ryzhov
tif_running(dev) && dev->ethtool_ops->get_link(dev); if (copy_to_user(useraddr, &edata, sizeof(edata))) return -EFAULT; return 0; } On Sat, Dec 1, 2018 at 8:31 PM Stephen Hemminger wrote: > On Sat, 1 Dec 2018 14:12:54 +0300 > Igor Ryzhov wrote: > > > Hi Stephen

Re: [dpdk-dev] [PATCH v2] kni: use kni_ethtool_ops only with unknown drivers

2018-12-01 Thread Igor Ryzhov
ckets to Linux. Can virtio user be used the same way, as a mirror of physical port? Best regards, Igor On Sat, Dec 1, 2018 at 2:38 AM Stephen Hemminger wrote: > On Fri, 30 Nov 2018 22:47:50 +0300 > Igor Ryzhov wrote: > > > Current implementation of kni_ethtool_ops jus

[dpdk-dev] [PATCH v2] kni: use kni_ethtool_ops only with unknown drivers

2018-11-30 Thread Igor Ryzhov
0e) we still use kni_ethtool_ops with implemented .get_link function. Signed-off-by: Igor Ryzhov --- kernel/linux/kni/Makefile | 2 +- kernel/linux/kni/kni_ethtool.c | 210 - kernel/linux/kni/kni_misc.c| 9 +- 3 files changed, 7 insertions(+), 214 del

[dpdk-dev] [PATCH] kni: use kni_ethtool_ops only with unknown drivers

2018-11-30 Thread Igor Ryzhov
0e) we still use kni_ethtool_ops with implemented .get_link function. Signed-off-by: Igor Ryzhov --- kernel/linux/kni/Makefile | 2 +- kernel/linux/kni/kni_ethtool.c | 210 - kernel/linux/kni/kni_misc.c| 6 +- 3 files changed, 6 insertions(+), 212 del

Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method

2018-11-30 Thread Igor Ryzhov
ll be better to use default eth_header_ops. Best regards, Igor On Tue, Oct 2, 2018 at 7:58 PM Ferruh Yigit wrote: > On 9/27/2018 1:02 AM, Igor Ryzhov wrote: > > Signed-off-by: Igor Ryzhov > > Hi Igor, > > What is the motivation to add this support? What is enabled by this? &

Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method

2018-09-30 Thread Igor Ryzhov
at 10:19 PM Igor Ryzhov wrote: > It's just exact copy of eth_header_parse function from Linux kernel. > > No problem, can do that with ether_addr_copy. > > On Sat, Sep 29, 2018 at 10:22 AM Stephen Hemminger < > step...@networkplumber.org> wrote: > >> On T

Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method

2018-09-29 Thread Igor Ryzhov
It's just exact copy of eth_header_parse function from Linux kernel. No problem, can do that with ether_addr_copy. On Sat, Sep 29, 2018 at 10:22 AM Stephen Hemminger < step...@networkplumber.org> wrote: > On Thu, 27 Sep 2018 03:02:24 +0300 > Igor Ryzhov wrote: > >

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

2018-09-28 Thread Igor Ryzhov
Hi Dan, Ferruh, Why do we need "struct rte_eth_link" as a parameter at all? Only link status is used in the function – let's use it only: rte_kni_update_link(struct rte_kni *kni, int link_status) /* 0 – down, 1 – up */ It will also solve your differences as we won't have any "redundant" informat

[dpdk-dev] [PATCH] kni: implement header_ops parse method

2018-09-26 Thread Igor Ryzhov
Signed-off-by: Igor Ryzhov --- kernel/linux/kni/kni_net.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c index 7fcfa106c..128a5477c 100644 --- a/kernel/linux/kni/kni_net.c +++ b/kernel/linux/kni/kni_net.c @@ -678,6

[dpdk-dev] [PATCH v3] kni: dynamically allocate memory for each KNI

2018-09-26 Thread Igor Ryzhov
-off-by: Igor Ryzhov --- v3: * style fixes v2: * allocate KNI using rte_zmalloc * swap reserve/release functions * use "kni" as a variable name * use macros for memzone names lib/librte_kni/rte_kni.c | 496 +-- lib/librte_kni/rte_kni.h | 6 +-

Re: [dpdk-dev] [PATCH v2] kni: dynamically allocate memory for each KNI

2018-09-26 Thread Igor Ryzhov
Hi Ferruh, Will fix it today. Igor On Wed, Sep 26, 2018 at 1:41 PM Ferruh Yigit wrote: > On 9/23/2018 8:12 PM, Igor Ryzhov wrote: > > Long time ago preallocation of memory for KNI was introduced in commit > > 0c6bc8e. It was done because of lack of ability to free previousl

[dpdk-dev] [PATCH v2] kni: dynamically allocate memory for each KNI

2018-09-23 Thread Igor Ryzhov
-off-by: Igor Ryzhov --- v2: * allocate KNI using rte_zmalloc * swap reserve/release functions * use "kni" as a variable name * use macros for memzone names lib/librte_kni/rte_kni.c | 502 +-- lib/librte_kni/rte_kni.h | 6 +- test/test/

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

2018-08-30 Thread Igor Ryzhov
_open. Best regards, Igor On Thu, Aug 30, 2018 at 12:49 PM, Igor Ryzhov wrote: > Hi Dan, > > We use KNI device exactly the same way you described – with IP addresses, > routing, etc. > And we also faced the same problem of having the actual link status in > Linux kernel. > > Th

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

2018-08-30 Thread Igor Ryzhov
Hi Dan, We use KNI device exactly the same way you described – with IP addresses, routing, etc. And we also faced the same problem of having the actual link status in Linux kernel. There is a special callback for link state management in net_device_ops for soft-devices like KNI called ndo_change_

Re: [dpdk-dev] [PATCH] kni: dynamically allocate memory for each KNI

2018-08-29 Thread Igor Ryzhov
Hello Ferruh, Thanks for the review, comments inline. On Mon, Aug 27, 2018 at 8:06 PM, Ferruh Yigit wrote: > On 8/2/2018 3:25 PM, Igor Ryzhov wrote: > > Long time ago preallocation of memory for KNI was introduced in commit > > 0c6bc8e. It was done because of lack of ability to

[dpdk-dev] [PATCH] kni: dynamically allocate memory for each KNI

2018-08-02 Thread Igor Ryzhov
-off-by: Igor Ryzhov --- lib/librte_kni/rte_kni.c | 392 --- lib/librte_kni/rte_kni.h | 6 +- test/test/test_kni.c | 6 - 3 files changed, 128 insertions(+), 276 deletions(-) diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c index

Re: [dpdk-dev] [PATCH v2] net/i40e: fix flag sent to mac_address_write

2018-01-15 Thread Igor Ryzhov
Sure. Sent v3. On Fri, Jan 12, 2018 at 5:22 AM, Xing, Beilei wrote: > > > > -Original Message- > > From: Igor Ryzhov [mailto:iryz...@nfware.com] > > Sent: Thursday, January 11, 2018 6:07 PM > > To: dev@dpdk.org > > Cc: Xing, Beilei ; sta...@dpdk.

[dpdk-dev] [PATCH v3] net/i40e: fix flag sent to mac_address_write

2018-01-15 Thread Igor Ryzhov
Current flag is in wrong byte order. Use defined macro as it is done in Linux driver. Fixes: e18e01e92c29 ("i40e: support default MAC address setting") Cc: sta...@dpdk.org Signed-off-by: Igor Ryzhov --- v3: * fix commit message v2: * fix checkpatch warning (long line) * fix commit sub

Re: [dpdk-dev] [PATCH] net/i40e: fix VSI MAC filter on primary address change

2018-01-11 Thread Igor Ryzhov
omments (in another mail > thread). > > > > Best Regards, > > Beilei > > > > *From:* Igor Ryzhov [mailto:iryz...@nfware.com] > *Sent:* Thursday, January 11, 2018 6:47 AM > *To:* Zhang, Helin > *Cc:* Xing, Beilei ; Olivier Matz < > olivier.m...@6

[dpdk-dev] [PATCH v2] net/i40e: fix flag sent to mac_address_write

2018-01-11 Thread Igor Ryzhov
Use the same value as in Linux driver. Fixes: e18e01e92c29 ("i40e: support default MAC address setting") Cc: sta...@dpdk.org Signed-off-by: Igor Ryzhov --- v2: * fix checkpatch warning (long line) * fix commit subject * add Fixes line * CC to stable --- drivers/net/i40e/i40e_et

Re: [dpdk-dev] [PATCH] net/i40e: fix VSI MAC filter on primary address change

2018-01-10 Thread Igor Ryzhov
Hello everyone. It's sad that my comments were unanswered. I'm ok with the first two – they were mostly style-related. But I made an investigation on the third one and it is a bug. This is a description (from X710 datasheet) of flags sent to mac_address_write command: By bits: 0-7 – Reserved 8 –

[dpdk-dev] [PATCH] i40e: fix flag sent to mac_address_write

2018-01-10 Thread Igor Ryzhov
Use the same value as in Linux driver. Signed-off-by: Igor Ryzhov --- drivers/net/i40e/i40e_ethdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 285d92b..93b9dd0 100644 --- a/drivers/net/i40e

Re: [dpdk-dev] [PATCH] net/i40e: fix VSI MAC filter on primary address change

2018-01-05 Thread Igor Ryzhov
Thank you for the patch! Comments inline. On Wed, Jan 3, 2018 at 5:29 PM, Olivier Matz wrote: > > drivers/net/i40e/i40e_ethdev.c | 29 + > 1 file changed, 29 insertions(+) > > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ > ethdev.c > index 811c

  1   2   >