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
Set the carrier state to 'off' when the interface is instantiated
or when it is marked 'up' or 'down'. This is necessary to set the
interface to a known operational state until the carrier state is
changed with rte_kni_update_link().
Signed-off-by: Dan Gora
---
k
incorrectly interpret the interface as a wireless
interface.
Signed-off-by: Dan Gora
---
kernel/linux/kni/kni_net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
index fea3ec7e7..f94f2abaf 100644
--- a/kernel/linux/kni
On Tue, Sep 18, 2018 at 1:54 PM, Ferruh Yigit wrote:
> On 9/12/2018 12:29 AM, 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.
>>
>> S
On Tue, Sep 18, 2018 at 1:48 PM, Ferruh Yigit wrote:
> I just read the other thread, including Igor's and your comment about starting
> the interface down, overall I got your point but my concerns is if someone
> has a
> solution based on assumption that interface will be up when created will be
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 ++
lib
s changed by writing to the Linux /sys file:
> /sys/devices/virtual/net//carrier, where is the KNI
> interface name.
>
> 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.h
Set the carrier state to 'off' when the interface is instantiated
or when it is marked 'up' or 'down'. This is necessary to set the
interface to a known operational state until the carrier state is
changed with rte_kni_update_link().
Signed-off-by: Dan Gora
---
k
Update KNI example to continuously monitor the Ethernet link status of
the physical link and update the carrier status of the corresponding
interfaces with rte_kni_update_link().
Signed-off-by: Dan Gora
---
examples/kni/Makefile | 2 ++
examples/kni/main.c | 82
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
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
On Wed, Sep 26, 2018 at 11:01 AM, Ferruh Yigit wrote:
> On 9/19/2018 8:55 PM, Dan Gora wrote:
>> The worker threads incrementing the rx/tx_packets race with the signal
>> handler from the main thread zeroing the entire statistics structure.
>> This can cause the statistics
On Wed, Sep 26, 2018 at 10:59 AM, Ferruh Yigit wrote:
> On 9/19/2018 8:55 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.
>>
On Wed, Sep 26, 2018 at 1:42 PM, Ferruh Yigit wrote:
>> There is nothing to "reflect" to the kernel interface, nor to apply to
>> the kernel interface. This is exactly how every other kernel driver
>> works on link status changes. There is no "netif_set_speed()'
>> function. When a link status
On Wed, Sep 26, 2018 at 11:00 AM, Ferruh Yigit wrote:
> On 9/19/2018 8:55 PM, Dan Gora wrote:
>> Update KNI example to continuously monitor the Ethernet link status of
>> the physical link and update the carrier status of the corresponding
>> interfaces with rte_kni_update
kni_version.map to the bottom of
> the patch file, it doesn't complain any more... I just don't really
> have time to investigate this right now.
thanks
dan
Dan Gora (6):
kni: add API to set link status on kernel interface
kni: add link status test
kni: set default ca
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
Set the carrier state to 'off' when the interface is instantiated
or when it is marked 'up' or 'down'. This is necessary to set the
interface to a known operational state until the carrier state is
changed with rte_kni_update_link().
Signed-off-by: Dan Gora
---
k
Update KNI example 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/Makefile | 2 ++
examples/kni/main.c | 73
Test changing the link, speed, duplex, etc. status of the KNI interface
with rte_kni_update_link().
Signed-off-by: Dan Gora
---
test/test/test_kni.c | 131 +++
1 file changed, 131 insertions(+)
diff --git a/test/test/test_kni.c b/test/test/test_kni.c
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
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
On Thu, Sep 27, 2018 at 8:35 AM Ferruh Yigit wrote:
>
> On 9/26/2018 7:56 PM, Dan Gora wrote:
> > On Wed, Sep 26, 2018 at 1:42 PM, Ferruh Yigit
> > wrote:
> >>> There is nothing to "reflect" to the kernel interface, nor to apply to
> >>> th
On Thu, Sep 27, 2018 at 8:40 AM Ferruh Yigit wrote:
> >> Not sure about introducing an extra check to datapath for possible error on
> >> stats zero. I am for dropping this patch, what do you think?
> >
> > This is literally adding one instruction to the datapath. Not even an
> > atomic instructi
On Thu, Sep 27, 2018 at 7:04 PM, Ferruh Yigit wrote:
>>
>> With no traffic it's worse because the worker threads perform these
>> increments even more often!
>
> Dear Dan,
>
> Your implementation doesn't prevent the race when there is traffic, it can be
Correct. To do that would require per-cpu
On Thu, Sep 27, 2018 at 6:49 PM, Ferruh Yigit wrote:
>>> It would be useful if it writes the values of virtual interface, but this
>>> API
>>> prints user input.
>>>
>> I'm sorry, Ferruh, I really don't understand what you are referring to
>> here. What virtual interface are you talking about?
>
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. When that occurs, most people want to know what the link
>> speed is that the link came up at.
>
> +1 to this, people would like to know link speed of the i
Fix the call to rte_timer_reset_sync() in sw_event_timer_cb(). The
second parameter is the number of ticks, the third is the timer type.
Fixes: 6750b21bd6af ("eventdev: add default software timer adapter")
Cc: erik.g.carri...@intel.com
Signed-off-by: Dan Gora
---
lib/librt
nitializer
.ndo_set_vf_vlan = igb_ndo_set_vf_vlan,
^
Signed-off-by: Dan Gora
---
kernel/linux/kni/ethtool/igb/kcompat.h | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/kernel/linux/kni/ethtool/igb/kcompat.h
b/kernel/linux/kni/ethtool/igb/kcompat.h
index fd3175b5d..3effbe
nitializer
.ndo_set_vf_vlan = igb_ndo_set_vf_vlan,
^
Signed-off-by: Dan Gora
v2:
Reformatted according to recommendations from ferruh.yi...@intel.com
---
kernel/linux/kni/ethtool/igb/kcompat.h | 13 ++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/kernel/linux/kni/e
patches clean up other code to use this new function.
Please let me know what you think.
thanks
dan
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 ipsec fcn to access private area
vhost
truct rte_mbuf and the data buffer in the specified mbuf
without creating private macros or accessor functions.
Signed-off-by: Dan Gora
---
lib/librte_mbuf/rte_mbuf.h | 19 +++
1 file changed, 19 insertions(+)
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
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
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
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
Hi All,
Thanks for the feedback.
>> Just a nit...
>> As I understand 'md' here follows previous function which is
>> rte_mbuf_to_baddr() and works with direct mbuf - that's why
>> parameter is named 'md' (mbuf direct). The most of functions
>> in the header use just 'm' for any mbuf.
Ok, I'll fi
Hi Andrew,
On Sat, Jun 9, 2018 at 2:23 AM, Andrew Rybchenko
wrote:
> BTW, thinking about function I found out there is a trap in private area
> size related to the function. I think that the function description should
> highlight that rte_pktmbuf_priv_size(m->pool) should be used to
> find out
entropy source.
This also allows non-Mason builds to use getentropy().
Signed-off-by: Dan Gora
---
config/x86/meson.build | 7 +++
lib/librte_eal/common/rte_random.c | 29 -
lib/librte_eal/meson.build | 3 ---
mk/rte.cpuflags.mk
entropy source.
This also allows non-meson builds to use getentropy().
Signed-off-by: Dan Gora
---
v2:
* Rebase to latest master.
* Fix spelling of "meson".
config/x86/meson.build | 7 +++
lib/librte_eal/common/rte_random.c | 29 -
lib/
On Thu, Apr 16, 2020 at 8:30 AM Mattias Rönnblom
wrote:
> > diff --git a/lib/librte_eal/meson.build b/lib/librte_eal/meson.build
> > index 0267c3b9d..748359b8c 100644
> > --- a/lib/librte_eal/meson.build
> > +++ b/lib/librte_eal/meson.build
> > @@ -15,9 +15,6 @@ deps += 'kvargs'
> > if dpdk_conf
system, regardless of whether or not it was
available on the compilation system.
Thanks
Dan
Dan Gora (2):
eal: check for rdseed at run time for random seed
eal: resolve getentropy at run time for random seed
config/x86/meson.build | 11 +--
lib/librte_eal/common/rte_random.c | 50
RTE_COMPILE_TIME_CPUFLAGS
which are checked in rte_eal_init() at run time because it is no longer
required to match the compilation system.
Signed-off-by: Dan Gora
---
config/x86/meson.build | 11 ---
lib/librte_eal/common/rte_random.c | 19 +++
mk/rte.cpuflags.mk
dlopen()/dlsym(),
returning failure if the getentropy() function cannot be resolved or
if it fails.
This also allows getentropy() to be used as the random seed source
when the traditional Makefile build for DPDK is used.
Signed-off-by: Dan Gora
---
lib/librte_eal/common/rte_random.c | 33
RTE_COMPILE_TIME_CPUFLAGS
which are checked in rte_eal_init() at run time because it is no longer
required to match the compilation system.
Signed-off-by: Dan Gora
---
config/x86/meson.build | 11 ---
lib/librte_eal/common/rte_random.c | 19 +++
mk/rte.cpuflags.mk
system, regardless of whether or not it was
available on the compilation system.
Thanks
Dan
-
v2:
* Fix patch apply issue.
* dlclose() handle if dlsym() fails in __rte_getentropy().
Dan Gora (2):
eal: check for rdseed at run time for random seed
eal: resolve getentropy at run time for random
dlopen()/dlsym(),
returning failure if the getentropy() function cannot be resolved or
if it fails.
This also allows getentropy() to be used as the random seed source
when the traditional Makefile build for DPDK is used.
Signed-off-by: Dan Gora
---
lib/librte_eal/common/rte_random.c | 35
On Tue, Apr 21, 2020 at 6:03 PM Stephen Hemminger
wrote:
>
> On Tue, 21 Apr 2020 16:54:45 -0300
> Dan Gora wrote:
>
> > The getentropy() function was introduced into glibc v2.25 and so is
> > not available on all supported platforms. Previously, if DPDK was
> &g
On Wed, Apr 22, 2020 at 5:28 AM Mattias Rönnblom
wrote:
>
> On 2020-04-21 21:54, Dan Gora wrote:
> > The getentropy() function was introduced into glibc v2.25 and so is
> > not available on all supported platforms. Previously, if DPDK was
> > compiled (using meso
system, regardless of whether or not it was
available on the compilation system.
Thanks
Dan
-
v2:
* Fix patch apply issue.
* dlclose() handle if dlsym() fails in __rte_getentropy().
v3:
* Fix error checking of dlsym() in __rte_getentropy().
* Style changes recommended by Mattias.
Dan Gora (2
RTE_COMPILE_TIME_CPUFLAGS
which are checked in rte_eal_init() at run time because it is no longer
required to match the compilation system.
Signed-off-by: Dan Gora
---
config/x86/meson.build | 11 ---
lib/librte_eal/common/rte_random.c | 19 +++
mk/rte.cpuflags.mk
dlopen()/dlsym(),
returning failure if the getentropy() function cannot be resolved or
if it fails.
This also allows getentropy() to be used as the random seed source
when the traditional Makefile build for DPDK is used.
Signed-off-by: Dan Gora
---
lib/librte_eal/common/rte_random.c | 36
On Wed, Apr 22, 2020 at 5:14 PM Mattias Rönnblom
wrote:
>
> On 2020-04-22 19:44, Dan Gora wrote:
> > On Wed, Apr 22, 2020 at 5:28 AM Mattias Rönnblom
> > wrote:
> >> On 2020-04-21 21:54, Dan Gora wrote:
> >>> The getentropy() function was introduced into gl
ls in __rte_getentropy().
v3:
* Fix error checking of dlsym() in __rte_getentropy().
* Style changes recommended by Mattias.
v4:
* Replace dlopen/dlsym method with reading from /dev/urandom.
* Try rdseed method before getentropy() method since the
latter should never fail.
Dan Gora (2):
eal:
remove
this dependency on the glibc version.
Since __rte_genentropy() should never fail, the rdseed method is
tried first.
Signed-off-by: Dan Gora
---
lib/librte_eal/common/rte_random.c | 62 ++
lib/librte_eal/meson.build | 3 --
2 files changed, 54
RTE_COMPILE_TIME_CPUFLAGS
which are checked in rte_eal_init() at run time because it is no longer
required to match the compilation system.
Signed-off-by: Dan Gora
---
config/x86/meson.build | 11 ---
lib/librte_eal/common/rte_random.c | 19 +++
mk/rte.cpuflags.mk
On Thu, Apr 23, 2020 at 9:36 AM Mattias Rönnblom
wrote:
> >>
> >> /dev/urandom is basically only a different interface to the same
> >> underlying mechanism.
> >>
> >> Such an alternative would look something like:
> >>
> >> static int
> >> getentropy(void *buffer, size_t length)
> >> {
> >>
On Thu, Apr 23, 2020 at 12:59 PM Luca Boccassi wrote:
> > >
> > > /dev/urandom is basically only a different interface to the same
> > > underlying mechanism.
>
> This is not the whole story though - while the end result when all
> works is the same, there are important differences in getting ther
On Wed, Apr 22, 2020 at 11:39 PM Stephen Hemminger
wrote:
>
> On Wed, 22 Apr 2020 20:42:54 -0300
> Dan Gora wrote:
>
> > + fd = open("/dev/urandom", O_RDONLY);
> > + if (fd < 0) {
> > + errno = ENODEV;
> > + r
On Mon, Apr 27, 2020 at 1:19 PM Luca Boccassi wrote:
>
> On Thu, 2020-04-23 at 14:38 -0300, Dan Gora wrote:
> > On Thu, Apr 23, 2020 at 12:59 PM Luca Boccassi wrote:
> > > > > /dev/urandom is basically only a different interface to the same
> > > > > und
On Thu, Apr 30, 2020 at 5:29 PM Luca Boccassi wrote:
> > > Adding a new dependecy happens only when building with the new version
> > > of the library. If it's not available, then there's no new dependency.
> >
> > But you also do not get to use the new getentropy() if you happen to
> > compile o
On Fri, May 1, 2020 at 1:29 PM Luca Boccassi wrote:
> >
> > Well, no, because rdseed is used first if available and /dev/urandom
> > is used next..
> >
> > And this is not a corner case at all.. There are lots of linux
> > distributions which DPDK claims to support which do not support
> > getentr
On Mon, May 4, 2020 at 5:04 AM Mattias Rönnblom
wrote:
> >> so what you are effectively asking is to
> >> double the size of the support matrix, and for the project to ensure
> >> that every single dependency can always be built against a new version
> >> and used against an older one.
> > No, th
On Mon, May 4, 2020 at 11:13 AM Dan Gora wrote:
>
> On Mon, May 4, 2020 at 5:04 AM Mattias Rönnblom
> wrote:
>
> > >> so what you are effectively asking is to
> > >> double the size of the support matrix, and for the project to ensure
> > >>
Can these patches be considered again for 20.08?
I thought that I addressed all of the issues or at least provided
reasonable responses to all of the concerns.
thanks
dan
On Mon, May 4, 2020 at 11:19 AM Dan Gora wrote:
>
> On Mon, May 4, 2020 at 11:13 AM Dan Gora wrote:
> >
>
On Tue, Jun 2, 2020 at 2:10 AM Dan Gora wrote:
>
> Can these patches be considered again for 20.08?
>
> I thought that I addressed all of the issues or at least provided
> reasonable responses to all of the concerns.
So I guess I'll take that as a "no"...
I hav
On Mon, Jun 29, 2020 at 6:30 AM Mattias Rönnblom
wrote:
>
> On 2020-04-23 01:42, Dan Gora wrote:
> > The getentropy() function was introduced into glibc v2.25 and so is
> > not available on all supported platforms. Previously, if DPDK was
> > compiled (using meso
On Mon, Jun 29, 2020 at 6:32 AM Mattias Rönnblom
wrote:
>
> On 2020-04-23 01:42, Dan Gora wrote:
> > Hi All,
> >
> > The following patches updates the rte_random subsystem to dynamically find
> > the best source of the initial seed to the PRNG at run time.
> >
On Mon, Jun 29, 2020 at 3:01 PM Dan Gora wrote:
>
> On Mon, Jun 29, 2020 at 6:32 AM Mattias Rönnblom
> wrote:
> >
> > On 2020-04-23 01:42, Dan Gora wrote:
> > > Hi All,
> > >
> > > The following patches updates the rte_random subsystem to dynam
On Mon, Jun 29, 2020 at 6:06 PM Mattias Rönnblom
wrote:
>
> It's unlikely to fail, and if it does something is probably seriously
> wrong with your system. You also seem to think it might fail, since you
> take great care of setting errno and having non-zero return code in
> __rte_getentropy().
W
My original patch to add this feature was basically the same thing as
this: setting the link status via a KNI ioctl. That method was
rejected after _much_ discussion and we eventually settled on the
currently implementation.
My original patch was here: Message-Id: <20180628225548.21885-1...@adax.c
Here's another link to the thread where this was discussed last year..
Igor was actually on this thread as well...
https://mails.dpdk.org/archives/dev/2018-August/110383.html
On Mon, Oct 14, 2019 at 4:01 PM Dan Gora wrote:
>
> My original patch to add this feature was basically the
101 - 171 of 171 matches
Mail list logo