[dpdk-dev] [PATCH 2/2] i40e:enable TSO support

2015-02-09 Thread David Marchand
eling_params); > ctx_txd->l2tag2 = rte_cpu_to_le_16(cd_l2tag2); > diff --git a/lib/librte_pmd_i40e/i40e_rxtx.h > b/lib/librte_pmd_i40e/i40e_rxtx.h > index af932e3..f1033ef 100644 > --- a/lib/librte_pmd_i40e/i40e_rxtx.h > +++ b/lib/librte_pmd_i40e/i40e_rxtx.h > @@ -154,6 +154,19 @@ struct i40e_tx_queue { > bool tx_deferred_start; /**< don't start this queue in dev start */ > }; > > +/** Offload features */ > +union i40e_tx_offload { > + uint64_t data; > + struct { > + uint64_t l2_len:7; /**< L2 (MAC) Header Length. */ > + uint64_t l3_len:9; /**< L3 (IP) Header Length. */ > + uint64_t l4_len:8; /**< L4 (TCP/UDP) Header Length. */ > + uint64_t tso_segsz:16; /**< TCP TSO segment size */ > + uint64_t outer_l2_len:8; /**< L2 outer Header Length */ > + uint64_t outer_l3_len:16; /**< L3 outer Header Length */ > + }; > +}; > + > Idem. -- David Marchand

[dpdk-dev] [PATCH 1/4] pci: allow access to PCI config space

2015-02-09 Thread David Marchand
the RTE_PCI_CONFIG #ifdef / hardcoded stuff from linux eal / igb_uio. Opinion ? -- David Marchand On Fri, Feb 6, 2015 at 7:36 PM, Stephen Hemminger < stephen at networkplumber.org> wrote: > From: Stephen Hemminger > > Some drivers need ability to access PCI config (for example for pow

[dpdk-dev] i40e: Steps and required configurations of how to achieve the best performance!

2015-02-09 Thread David Marchand
( http://dpdk.org/dev/patchwork/patch/3024/), I think we could go with this approach once both uio and vfio are fine. -- David Marchand

[dpdk-dev] [PATCH] enic: silence log message

2015-02-09 Thread David Marchand
gt; enic->bar0.len = pdev->mem_resource[0].len; > NAK. The main problem is that enic pmd is using printf to write logs. So the pmd should be fixed so that dev_* macros use RTE_LOG. Silence is good when it is the default behaviour. But I prefer we can change this at runtime, rather than strip the log messages, especially for init. -- David Marchand

[dpdk-dev] [PATCH] eal_pci: Fix max_vfs missing for none igb_uio driver

2015-02-11 Thread David Marchand
oo sure about this change. Quickly looked, and as far as I can see, sriov_numvfs has been introduced by 1789382a ("PCI: SRIOV control and status via sysfs"). Won't your change break anything that uses a kernel < 3.8 (not backported) ? -- David Marchand

[dpdk-dev] [PATCH v2] eal_pci: Fix max_vfs missing for none igb_uio driver

2015-02-12 Thread David Marchand
t don't have it and doing nothing for kernels that already provide sriov_numvfs. But your solution is more straightforward (and we don't need to update documentation and/or existing scripts afaik). Acked-by: David Marchand -- David Marchand

[dpdk-dev] [PATCH v3 0/2] help option

2015-02-13 Thread David Marchand
+++ > lib/librte_eal/linuxapp/eal/eal.c | 27 --- > 4 files changed, 113 insertions(+), 100 deletions(-) > Series Acked-by: David Marchand -- David Marchand

[dpdk-dev] [PATCH v5 06/17] fm10k: add rx_queue_setup/release function

2015-02-13 Thread David Marchand
nment. > Use > +* RTE_LOG directly to make sure this error is seen. */ > Comment is not valid anymore since you call PMD_INIT_LOG. > + if (!mempool_element_size_valid(mp)) { > + PMD_INIT_LOG(ERR, "Error : Mempool element size is too > small&qu

[dpdk-dev] [PATCH v5 08/17] fm10k: add RX/TX single queue start/stop function

2015-02-13 Thread David Marchand
ore, do not directly use RTE_LOG. This is init stuff, you have a PMD_INIT_LOG macro. By the way, I need to dig deeper into this, but I can see multiple patches ensuring buffer alignment. Do we really need to validate this alignment here, if we already validated this constraint at the mempool level ? -- David Marchand

[dpdk-dev] [PATCH v5 15/17] fm10k: add PF and VF interrupt handling function

2015-02-13 Thread David Marchand
Hello, On Fri, Feb 13, 2015 at 9:19 AM, Chen Jing D(Mark) wrote: [snip] + > + /* Only INT 0 availiable, other 15 are reserved. */ > available. -- David Marchand

[dpdk-dev] [PATCH v5 10/17] fm10k: add receive and tranmit function

2015-02-13 Thread David Marchand
d processing. */ > Checkpatch is complaining : WARNING: 'explicitely' may be misspelled - perhaps 'explicitly'? #328: FILE: lib/librte_pmd_fm10k/fm10k_rxtx.c:261: +* offload is not supported, but we do not explicitely check for this -- David Marchand

[dpdk-dev] [PATCH v5 10/17] fm10k: add receive and tranmit function

2015-02-13 Thread David Marchand
gt;sw_ring[q->next_alloc], > + q->alloc_thresh); > + > + if (unlikely(ret != 0)) { > + PMD_RX_LOG(ERR, "Failed to alloc mbuf"); > rx_mbuf_alloc_failed++ ? -- David Marchand

[dpdk-dev] [PATCH v5 12/17] fm10k: Add scatter receive function

2015-02-13 Thread David Marchand
Hello, On Fri, Feb 13, 2015 at 9:19 AM, Chen Jing D(Mark) wrote: [snip] + if (unlikely(ret != 0)) { > + PMD_RX_LOG(ERR, "Failed to alloc mbuf"); > Idem mono segment. rx_mbuf_alloc_failed++ ? -- David Marchand

[dpdk-dev] [PATCH v2 0/3] remove limit on devargs parameters length

2015-02-13 Thread David Marchand
by Thomas) -- David Marchand David Marchand (3): devargs: indent and cleanup devargs: remove limit on parameters length app/test: fix devargs tests app/test/test_devargs.c |6 ++-- app/test/test_pci.c |2 ++ lib/librte_eal/common

[dpdk-dev] [PATCH v2 1/3] devargs: indent and cleanup

2015-02-13 Thread David Marchand
Prepare for next commit. Fix some indent issues, refactor error code. Signed-off-by: David Marchand --- lib/librte_eal/common/eal_common_devargs.c | 27 ++- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/lib/librte_eal/common/eal_common_devargs.c b

[dpdk-dev] [PATCH v2 2/3] devargs: remove limit on parameters length

2015-02-13 Thread David Marchand
As far as I know, there is no reason why we should have a limit on the length of parameters that can be given for a device. Remove this limit by using dynamic allocations. Signed-off-by: David Marchand --- lib/librte_eal/common/eal_common_devargs.c | 26 +- lib

[dpdk-dev] [PATCH v2 3/3] app/test: fix devargs tests

2015-02-13 Thread David Marchand
Add missing free for devargs->args and fix tests. Signed-off-by: David Marchand --- app/test/test_devargs.c |6 -- app/test/test_pci.c |2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/test/test_devargs.c b/app/test/test_devargs.c index 3d9f7bc..08fb

[dpdk-dev] Testpmd returns error.

2015-02-22 Thread David Marchand
..). And now we are reading sysfs twice. I would prefer this code is reworked so that we avoid those loops in eal_pci_uio.c. Anyway, I am still on holiday (I should have kept my laptop away ...), I will be back tomorrow. I suppose Bruce or Danny will come with a fix, let's decide what the best soluti

[dpdk-dev] [PATCH v3 1/3] eal: enable uio_pci_generic support

2015-02-23 Thread David Marchand
memcpy(_res->pci_addr, >addr, sizeof(uio_res->pci_addr)); > > /* collect info about device mappings */ > - nb_maps = pci_uio_get_mappings(dirname, uio_res->maps, > - RTE_DIM(uio_res->maps)); > + nb_maps = pci_uio_get_mappings(dev, uio_res->maps, > + RTE_DIM(uio_res->maps)); > if (nb_maps < 0) { > rte_free(uio_res); > return nb_maps; > } > - > uio_res->nb_maps = nb_maps; > > /* Map all BARs */ > Ok then after this, we use this temp array uio_res->maps and we loop all over the pci resources. Why do we have all these loops ? I could see no point before, and with this change, it is bothering me again. Won't it be easier to loop on the pci resources discovered by eal_pci.c before this function is called ? eal_pci.c is responsible for discovering pci devices, prepare those devices (filling mem_resource[] for example), then eal_pci_uio.c / eal_pci_vfio.c do the "mapping" stuff. So uio / vfio must not overwrite what has already been set before. -- David Marchand

[dpdk-dev] [PATCH 1/2] enic: replace use of printf with log

2015-02-23 Thread David Marchand
ev_printk(WARNING, args) > > +#define dev_debug(x, args...) dev_printk(DEBUG, args) > > > > #define __le16 u16 > > #define __le32 u32 > > -- > > 2.1.4 > > > > > Series > Acked-by: Neil Horman > Use of rte_log would be better for init messages, but since the driver makes no difference, this looks good enough to me. Thanks Stephen. Acked-by: David Marchand -- David Marchand

[dpdk-dev] [PATCH v2] mk: Rework gcc version detection to permit versions newer than 4.x

2015-02-24 Thread David Marchand
6_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.7.2 (Debian 4.7.2-5) -- David Marchand

[dpdk-dev] [PATCH] devargs: restore empty devargs as ""

2015-02-24 Thread David Marchand
ated tests. Fixes: c07691ae1089 ("devargs: remove limit on parameters length") Reported-by: Tetsuya Mukawa Signed-off-by: David Marchand --- app/test/test_devargs.c |2 +- lib/librte_eal/common/eal_common_devargs.c | 11 +++ lib/librte_eal/common/include/

[dpdk-dev] [PATCH v2] mk: Rework gcc version detection to permit versions newer than 4.x

2015-02-24 Thread David Marchand
On Tue, Feb 24, 2015 at 10:50 AM, Panu Matilainen wrote: > On 02/24/2015 11:25 AM, David Marchand wrote: > >> Hello Panu, >> >> Looks like there is an issue with gcc 4.7 on my debian. >> >> $ make config T=x86_64-native-linuxapp-gcc && make -j8 >&

[dpdk-dev] [PATCH v2] mk: Rework gcc version detection to permit versions newer than 4.x

2015-02-24 Thread David Marchand
On Tue, Feb 24, 2015 at 11:09 AM, David Marchand wrote: > On Tue, Feb 24, 2015 at 10:50 AM, Panu Matilainen > wrote: > >> $ gcc -dumpversion >>> 4.7 >>> >> >> Meh. This seems to be a Debian specific modification to gcc, discussed >> he

[dpdk-dev] [PATCH v5 5/6] eal: add per rx queue interrupt handling based on VFIO

2015-02-24 Thread David Marchand
list, you don't have to care about this. Looking at this patchset, I think there is a design issue. eal does not need to know about portid neither queueid. eal can provide an api to retrieve the interrupt fds, configure an epoll instance, wait on an epoll instance etc... ethdev is then responsible to setup the mapping between port id / queue id and interrupt fds by asking the eal about those fds. This would result in an eal api even simpler and we could add other fds in a single epoll fd for other uses. -- David Marchand

[dpdk-dev] [PATCH v2] mk: Rework gcc version detection to permit versions newer than 4.x

2015-02-24 Thread David Marchand
; Or something like this in Sed or Perl within the $(shell) expansion: > Well, we have no dependency on perl so far. I would prefer we keep at just makefile and shell stuff. Olivier ? opinion ? -- David Marchand

[dpdk-dev] [PATCH] mk: Work around Debian/Ubuntu-specific 'gcc -dumpversion' output

2015-02-24 Thread David Marchand
Panu, ack (and works with my debian gcc). -- David Marchand On Tue, Feb 24, 2015 at 11:46 AM, Panu Matilainen wrote: > Commit 71f0ab1849b4fc3ca928deb566df12ca725ed150 broke compilation > on some versions of Debian and Ubuntu where gcc has been modified > to only emit MAJOR.M

[dpdk-dev] [PATCH v2 0/2] fix and improve uio_pci_generic support

2015-02-24 Thread David Marchand
s instead of /dev/uioX. You rely on sysfs mmap code for pci resources. Is this really equivalent to uio mmap operations ? If you can ensure me this won't break igb_uio setups, then these patches are ok for me. Thanks for the cleanup in eal_pci_uio.c. -- David Marchand

[dpdk-dev] [PATCH v2 0/2] fix and improve uio_pci_generic support

2015-02-24 Thread David Marchand
On Tue, Feb 24, 2015 at 12:32 PM, Bruce Richardson < bruce.richardson at intel.com> wrote: > On Tue, Feb 24, 2015 at 12:23:15PM +0100, David Marchand wrote: > > Hello Bruce, > > > > On Tue, Feb 24, 2015 at 11:53 AM, Bruce Richardson < > > bruce.richardson a

[dpdk-dev] [PATCH v3 2/2] eal: populate uio_maps from pci mem_resources array

2015-02-24 Thread David Marchand
details for secondary processes*/ > Would be better in a different patch (at least the commit log does not tell anything about this removed check). Then ack. -- David Marchand

[dpdk-dev] [PATCH v3 1/2] eal: mmap uio resources using resourceX files

2015-02-24 Thread David Marchand
ci_vfio.c | 1 + > 4 files changed, 21 insertions(+), 17 deletions(-) > As long as igb_uio / uio_pci_generic both work, this is fine for me. ack. -- David Marchand

[dpdk-dev] [PATCH v5 5/6] eal: add per rx queue interrupt handling based on VFIO

2015-02-25 Thread David Marchand
t for ethdev?fd. So application invokes ethdev API with > portid and queueid, and ethdev calls eal > > API to wait on a ethdev fd which correlates with the specified portid and > queueid. > > > > Sounds ok to you? > eventfds creation can not be handled by ethdev, since i

[dpdk-dev] [PATCH v5 5/6] eal: add per rx queue interrupt handling based on VFIO

2015-02-25 Thread David Marchand
On Wed, Feb 25, 2015 at 4:29 PM, Zhou, Danny wrote: > > > > > *From:* David Marchand [mailto:david.marchand at 6wind.com] > *Sent:* Wednesday, February 25, 2015 6:22 PM > *To:* Zhou, Danny > *Cc:* dev at dpdk.org; Liang, Cunming > *Subject:* Re: [dpdk-dev] [PATCH v5

[dpdk-dev] [PATCH v2] eal: Clean up export of per_lcore__socket_id

2015-02-27 Thread David Marchand
lave lcore identified by slave_id to call a > * function f with argument arg. Once the execution is done, the > Can you remove these two hunks ? Then, Acked-by: David Marchand -- David Marchand

[dpdk-dev] [PATCH v6 3/8] eal/bsd: dummy for new intr definition

2015-02-27 Thread David Marchand
r_handle_type type; /**< handle type */ > + int max_intr;/**< max interrupt requested */ > + uint32_t vec_num[VFIO_MAX_QUEUE_ID]; /**< rxtx intr vector number > */ > }; > No need to add those since this is not supported for bsd. -- David Marchand

[dpdk-dev] [PATCH v6 2/8] eal/linux: add rx queue interrupt FDs to intr handle struct

2015-02-27 Thread David Marchand
gt; +#define VFIO_MAX_QUEUE_IDVFIO_MAX_RXTX_INTR_ID > + > This is a little weird to talk about vfio here. This file is "generic". Ok, you will store vfio eventfds here, but vfio is an implementation, not the abstraction. -- David Marchand

[dpdk-dev] [PATCH v6 4/8] eal/linux: add per rx queue interrupt handling based on VFIO

2015-02-27 Thread David Marchand
t; + fd = eventfd(0, 0); > + if (fd < 0) { > + RTE_LOG(ERR, EAL, > + "cannot setup eventfd," > + "error %i (%s)\n", > + errno, strerror(errno)); > + return -1; > + } > + dev->intr_handle.efds[i] = fd; > + } > break; > case VFIO_PCI_MSI_IRQ_INDEX: > internal_config.vfio_intr_mode = RTE_INTR_MODE_MSI; > diff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map > b/lib/librte_eal/linuxapp/eal/rte_eal_version.map > index 5f1857d..892a452 100644 > --- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map > +++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map > @@ -64,6 +64,8 @@ DPDK_2.0 { > rte_intr_callback_unregister; > rte_intr_disable; > rte_intr_enable; > + rte_intr_rx_set; > + rte_intr_rx_wait; > rte_log; > rte_log_add_in_history; > rte_log_cur_msg_loglevel; > -- > 1.8.1.4 > -- David Marchand

[dpdk-dev] [PATCH v6 0/8] Interrupt mode PMD

2015-02-27 Thread David Marchand
a need for a new eal api. -- David Marchand

[dpdk-dev] [PATCH 1/2] devargs: indent and cleanup

2015-01-07 Thread David Marchand
Prepare for next commit. Fix some indent issues, refactor error code. Signed-off-by: David Marchand --- lib/librte_eal/common/eal_common_devargs.c | 27 ++- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/lib/librte_eal/common/eal_common_devargs.c b

[dpdk-dev] [PATCH 2/2] devargs: remove limit on parameters length

2015-01-07 Thread David Marchand
As far as I know, there is no reason why we should have a limit on the length of parameters that can be given for a device. Remove this limit by using dynamic allocations. Signed-off-by: David Marchand --- lib/librte_eal/common/eal_common_devargs.c | 26 +- lib

[dpdk-dev] [PATCH v2] Fix rte_is_power_of_2

2015-01-19 Thread David Marchand
a make test ? All tests fail for me because of rte_malloc_socket. -- David Marchand

[dpdk-dev] [PATCH v2] Fix rte_is_power_of_2

2015-01-19 Thread David Marchand
" should tell you so. This will avoid wasting 10 minutes to understand why all your tests fail ... Can anyone help document this / make it more user friendly / easier ? -- David Marchand

[dpdk-dev] [PATCH v6 0/6] enicpmd: Cisco Systems Inc. VIC Ethernet PMD

2015-01-20 Thread David Marchand
Hello Sujith, Any news on the documentation and the performance numbers you said you would send ? Thanks. -- David Marchand On Thu, Nov 27, 2014 at 4:31 PM, Thomas Monjalon wrote: > 2014-11-27 04:27, Sujith Sankar: > > Thanks Thomas, David and Neil ! > > > > I sh

[dpdk-dev] [PATCH] BugFix: VFIO never works

2015-07-10 Thread David Marchand
rv) { > > case RTE_KDRV_VFIO: > > -#ifdef VFIO_PRESENT > > if (pci_vfio_is_enabled()) > > ret = pci_vfio_map_resource(dev); > > -#endif > This is a common file, vfio is not available on BSD. I missed that during review. Did you test build on BSD ? -- David Marchand

[dpdk-dev] Does FreeBSD's nic_uio have bind/unbind interface support?

2015-07-16 Thread David Marchand
Hello Rahul, (cc Bruce) How about removing this "whitelist" from the nic_uio driver and just rely on the hw.nic_uio.bdfs parameter to find out which devices to bind ? -- David Marchand On Thu, Jul 16, 2015 at 2:12 PM, Rahul Lakkireddy < rahul.lakkireddy at chelsio.com>

[dpdk-dev] [PATCH v3 1/3] nic_uio: Fix to allow any device to be bound to nic_uio

2015-07-21 Thread David Marchand
, and instead rely on hw.nic_uio.bdfs kenv parameter to allow > binding > any device to nic_uio. > > Suggested-by: David Marchand > Signed-off-by: Rahul Lakkireddy > Signed-off-by: Kumar Sanghvi > --- > v3: > - Use checks for bus, slot, and function info instead of vendor and device &g

[dpdk-dev] [PATCH 0/2] [PATCH 0/2] eal cleanup

2015-07-23 Thread David Marchand
Here is some trivial cleanup for eal. Nothing really astounding but this will ease an unfinished patchset I have been working on for some time (getting rid of any driver specific stuff in eal). -- David Marchand David Marchand (2): eal: remove dependency on drivers eal: remove useless

[dpdk-dev] [PATCH 1/2] eal: remove dependency on drivers

2015-07-23 Thread David Marchand
There is no reason why eal should depend on drivers. Remove remaining (unused) references. Signed-off-by: David Marchand --- lib/librte_eal/bsdapp/eal/Makefile | 3 --- lib/librte_eal/bsdapp/eal/eal.c | 1 - lib/librte_eal/linuxapp/eal/Makefile | 5 - lib/librte_eal/linuxapp/eal

[dpdk-dev] [PATCH 2/2] eal: remove useless header inclusion

2015-07-23 Thread David Marchand
Signed-off-by: David Marchand --- app/test-pmd/cmdline.c| 1 - lib/librte_eal/bsdapp/eal/eal_pci.c | 1 - lib/librte_eal/linuxapp/eal/eal_pci.c | 1 - lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 1 - 4 files changed, 4 deletions(-) diff --git a/app/test-pmd

[dpdk-dev] [PATCH] app/test: fix default memory assignment

2015-06-01 Thread David Marchand
roup_5 as current requirement is not enough. Signed-off-by: Gaetan Rivet Signed-off-by: David Marchand --- app/test/autotest_data.py | 61 ++--- 1 file changed, 30 insertions(+), 31 deletions(-) diff --git a/app/test/autotest_data.py b/app/test/autotest_d

[dpdk-dev] [PATCH] app/testpmd: fix default RX/TX flow control values

2015-06-01 Thread David Marchand
From: Ding Zhi <zhi.d...@6wind.com> This variable has undefined values in some cases. Fixes: 422a20a4e62d ("app/testpmd: fix uninitialized flow control variables") Signed-off-by: Ding Zhi Signed-off-by: David Marchand --- app/test-pmd/cmdline.c |2 +- 1 file changed, 1

[dpdk-dev] [RFC PATCH] eal:Add new API for parsing args at rte_eal_init time

2015-06-04 Thread David Marchand
eptable? > What's the point ? Adding stuff just for saving lines ? Are you serious about this ? -- David Marchand

[dpdk-dev] [PATCH v2] eal: Allow combining -m and --no-huge

2015-06-15 Thread David Marchand
t;* Remove unneeded parentheses and merge lines > >* Patch prefix now eal: > > * Add example and more description (from David Marchand) > > lib/librte_eal/common/eal_common_options.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --gi

[dpdk-dev] [PATCH 1/4] eal: provide functions to access PCI config

2015-06-17 Thread David Marchand
to use > + * @param buf > + * A data buffer containing the bytes should be written > + * @param size > + * The length of the data buffer. > + */ > +int rte_eal_pci_write_config(const struct rte_pci_device *device, > +const void *buf, size_t len, off_t offset); > + > Idem. The rest looks good to me. -- David Marchand

[dpdk-dev] [PATCH v2] eal:Fix log messages always being printed from rte_eal_cpu_init

2015-06-19 Thread David Marchand
b/librte_eal/linuxapp/eal/eal.c | 42 > ++- > 2 files changed, 74 insertions(+), 10 deletions(-) > We could have a different solution, but this patch is the quickest answer to the described problem. Please, fix the checkpatch error / warnings, then, ack. -- David Marchand

[dpdk-dev] [PATCH] ixgbe: fix the flow director flexbytes offset issues

2015-06-19 Thread David Marchand
s some reduplicate lines. > > > > Reported-by: David Marchand > > Signed-off-by: Jingjing Wu > > Tested-by: Gaetan Rivet > Thanks. Acked-by: David Marchand -- David Marchand

[dpdk-dev] [PATCH v2] ixgbe: fix TSO in IPv6

2015-06-22 Thread David Marchand
Didier Pallard Signed-off-by: David Marchand Acked-by: Konstantin Ananyev --- drivers/net/ixgbe/ixgbe_rxtx.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c index 7cc26ef..3ace8a8 100644 --- a/drive

[dpdk-dev] [PATCH] eal: don't crash if one pci device fails

2015-12-03 Thread David Marchand
rte_eal_pci_probe() returning a != 0 value will trigger a rte_panic in rte_eal_init() anyway. So I suppose you want to use rte_eal_pci_probe out of rte_eal_init. In such a case, why don't you use rte_eal_pci_probe_one ? -- David Marchand

[dpdk-dev] [PATCH] mk: fix objects/library order when linking

2015-12-04 Thread David Marchand
It is safer to specify libraries we depend on after the objects we are linking into a shared library, especially when the linker is invoked with options like --as-needed. Fixes: bef06a8a0655 ("mk: set library dependencies in shared object file") Signed-off-by: David Marchand --- mk/

[dpdk-dev] [PATCH v2] mk: fix objects/library order when linking

2015-12-04 Thread David Marchand
object file") Signed-off-by: David Marchand --- Changes since v1: - added some details in commitlog since Thomas does not like "safer" argument :-) --- mk/rte.lib.mk |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk index 06a151

[dpdk-dev] [PATCH v2 2/2] eal/linux: Add support for handling built-in kernel modules

2015-12-07 Thread David Marchand
loaded as a dynamic module. If it is built directly into the kernel, it will only show up if it has a version or at least one parameter. Note: The conditions of creation in the built-in case are not by design and may be removed in the future. But, at the moment, I suppose we are fine. -- David Marchand

[dpdk-dev] [PATCH v3 2/2] eal/linux: Add support for handling built-in kernel modules

2015-12-07 Thread David Marchand
+ RTE_LOG(DEBUG, EAL, "Open %s failed! error %i (%s)\n", > + sysfs_mod_name, errno, strerror(errno)); > + return 0; > } > Please, add a check on snprintf return value. Even if this can't happen, if snprintf fails, stat would access a truncated or uninitialized (when < 0) path. With this fixed, you can add my ack. Thanks. -- David Marchand

[dpdk-dev] ixgbevf does not recover from pf reset

2015-12-11 Thread David Marchand
ort=1). Port 1: 00:09:C0:0E:4E:65 Checking link statuses... Port 0 Link Up - speed 1 Mbps - full-duplex Port 1 Link Up - speed 1 Mbps - full-duplex Done Thanks. -- David Marchand

[dpdk-dev] [PATCH v1] eal: fix negative value incorrectly being used defect

2015-12-11 Thread David Marchand
1 of 1): Argument cannot be negative > (NEGATIVE_RETURNS)9. negative_returns: bytes_read is passed to a > parameter > that cannot be negative. > 928bytes_read = read(fd, , bytes_read); > > Fixes: c9f3ec1a0f3f ("eal/linux: add Rx interrupt control function"

[dpdk-dev] [ [PATCH v2] 00/13] Add virtio support in arm/arm64

2015-12-16 Thread David Marchand
tch that should do the job for eal. I am a bit short on time and will be on holidays for two weeks, so I can't look at these patches before January. Regards, -- David Marchand

[dpdk-dev] [PATCH] eal: map io resources for non x86 architectures

2015-12-16 Thread David Marchand
x86 requires a special set of instructions to access ioports, but other architectures let you remap io resources. So let eal remap io resources by accepting IORESOURCE_IO flag for architectures other than x86. Signed-off-by: David Marchand --- lib/librte_eal/common/include/rte_pci.h |3

[dpdk-dev] [PATCH] eal: map io resources for non x86 architectures

2015-12-16 Thread David Marchand
C globals as well. There is no reason that the ifdef > here > could not be implemented as a runtime check in C code. > > Well, instead of having the same information as the preprocessor define, maybe some capability per arch/cpu would be better "arch supports io remap". Maybe we can extend the cpuflags ? -- David Marchand

[dpdk-dev] [PATCH] eal: map io resources for non x86 architectures

2015-12-16 Thread David Marchand
Yuanhan, On Wed, Dec 16, 2015 at 1:48 PM, Yuanhan Liu wrote: > On Wed, Dec 16, 2015 at 01:31:04PM +0100, David Marchand wrote: > > x86 requires a special set of instructions to access ioports, but other > > architectures let you remap io resources. > > So let eal remap io r

[dpdk-dev] [PATCH 2/4] eal: set kdrv to RTE_KDRV_NONE if kernel driver isn't manipulating the device.

2015-12-28 Thread David Marchand
*/ > if (TAILQ_EMPTY(_device_list)) { > -- > 1.8.1.4 > > lgtm Acked-by: David Marchand -- David Marchand

[dpdk-dev] [PATCH 03/18] fm10k: Add empty fm10k files

2015-02-01 Thread David Marchand
, only one is enough Please, check the cleanup work that has been done in other Intel pmd (for example, ixgbe). I would really prefer we have consistent logs across dpdk. -- David Marchand > > Signed-off-by: Jeff Shaw > Signed-off-by: Chen Jing D(Mark) > --- > lib/librte_pmd

[dpdk-dev] [PATCH v2 1/2] eal: sort and align options lists

2015-02-03 Thread David Marchand
_HUGE_DIR"huge-dir" > - OPT_HUGE_DIR_NUM = OPT_LONG_MIN_NUM, > -#define OPT_MASTER_LCORE "master-lcore" > +#define OPT_BASE_VIRTADDR "base-virtaddr" > + OPT_BASE_VIRTADDR_NUM, > Why skip the first entry ? Afaik, OPT_BASE_VIRTADDR_NU

[dpdk-dev] [PATCH v2 2/2] eal: add help option

2015-02-03 Thread David Marchand
river */ > case 'd': > solib = malloc(sizeof(*solib)); > Why not move those two in common parser ? -- David Marchand

[dpdk-dev] [PATCH v2 2/2] eal: add help option

2015-02-03 Thread David Marchand
On Tue, Feb 3, 2015 at 9:20 AM, Thomas Monjalon wrote: > 2015-02-03 07:33, David Marchand: > > On Mon, Feb 2, 2015 at 6:44 PM, Thomas Monjalon < > thomas.monjalon at 6wind.com> > > wrote: > > [snip] > > > @@ -340,6 +342,9

[dpdk-dev] [PATCH v5 1/5] eal: Fix coding style of eal_pci.c and eal_pci_uio.c

2015-06-25 Thread David Marchand
On Thu, Jun 25, 2015 at 5:19 AM, Tetsuya Mukawa wrote: > From: "Tetsuya.Mukawa" > > This patch fixes coding style of below files in linuxapp and bsdapp. > - eal_pci.c > - eal_pci_uio.c > > Signed-off-by: Tetsuya Mukawa > Acked-by: Stephen Hemminger >

[dpdk-dev] [PATCH v5 3/5] eal: Fix memory leaks and needless increment of pci_map_addr

2015-06-25 Thread David Marchand
> + close(dev->intr_handle.fd); > + dev->intr_handle.fd = -1; > + dev->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN; > + > + return -1; > } > > Thinking about it, when something fails, don't you need to unmap pci resources in uio_res->maps before freeing ? -- David Marchand

[dpdk-dev] [PATCH v5 4/5] eal/bsdapp: Change names of pci related data structure

2015-06-25 Thread David Marchand
ped_pci_res_list > > Signed-off-by: Tetsuya Mukawa > Acked-by: David Marchand -- David Marchand

[dpdk-dev] [PATCH] eal: fix cpu_feature_table[] compilation with -pedantic

2015-06-29 Thread David Marchand
xternal > applications may enable it and include rte_spinlock.h from the public API. > > Instead of removing -pedantic from mlx4, this commit fixes rte_cpuflags.h. > > Fixes: ba7468997ea6 ("spinlock: add HTM lock elision for x86") > > Signed-off-by: Adrien Mazarguil > Acked-by: David Marchand -- David Marchand

[dpdk-dev] [PATCH] eal: prevent dereferencing NULL pointer in rte_eal_devargs_add()

2015-03-02 Thread David Marchand
if (devargs) > + if (devargs) { > + free(devargs->args); > free(devargs); > + } > + > return -1; > } > > Fixes: c07691ae1089 ("devargs: remove limit on parameters length") Acked-by: David Marchand -- David Marchand

[dpdk-dev] [PATCH] eal/linux: fix build

2015-03-03 Thread David Marchand
b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c > index 35d31c5..0b397ca 100644 > --- a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c > +++ b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c > @@ -32,6 +32,7 @@ > */ > > #include > +#include > #include > #include > #include > > Acked-by: David Marchand -- David Marchand

[dpdk-dev] [PATCH] config: default to shared library

2015-03-04 Thread David Marchand
e would be no exception to the naming convention. -- David Marchand

[dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup

2015-03-04 Thread David Marchand
q from shared memory for all elements of this local list. I have tried to think of different cases (libraries loaded before/after eal init...). The unit tests have been updated accordingly. -- David Marchand David Marchand (10): eal: remove yet another remaining reference to pm pci: use look

[dpdk-dev] [PATCH 01/10] eal: remove yet another remaining reference to pm

2015-03-04 Thread David Marchand
Hopefully, this is the last reference to pm. Signed-off-by: David Marchand --- lib/librte_eal/common/include/rte_tailq_elem.h |2 -- 1 file changed, 2 deletions(-) diff --git a/lib/librte_eal/common/include/rte_tailq_elem.h b/lib/librte_eal/common/include/rte_tailq_elem.h index 3013869

[dpdk-dev] [PATCH 02/10] pci: use lookup tailq api

2015-03-04 Thread David Marchand
There is no reason why we should use the "reserve" tailq api, since the pci entry is already statically reserved. Signed-off-by: David Marchand --- lib/librte_eal/bsdapp/eal/eal_pci.c |2 +- lib/librte_eal/linuxapp/eal/eal_pci.c |4 ++-- 2 files changed, 3 insertions(+), 3

[dpdk-dev] [PATCH 03/10] tailq: remove unneeded inclusion of rte_tailq.h

2015-03-04 Thread David Marchand
Only keep inclusion where really needed. Signed-off-by: David Marchand --- app/test-pipeline/config.c |1 - app/test-pipeline/init.c |1 - app/test-pipeline/main.c |1 - app/test

[dpdk-dev] [PATCH 05/10] tailq: get rid of broken "reserve" api

2015-03-04 Thread David Marchand
t application, so just get rid of them. Signed-off-by: David Marchand --- app/test/test_tailq.c | 48 +-- lib/librte_eal/bsdapp/eal/rte_eal_version.map |2 - lib/librte_eal/common/eal_common_tailqs.c | 12 lib/librte_eal/common/in

[dpdk-dev] [PATCH 06/10] tailq: remove unused RTE_EAL_TAILQ_* macros

2015-03-04 Thread David Marchand
A lot of places just protect against concurrent access and I can not see the gain of having those macros. Signed-off-by: David Marchand --- lib/librte_eal/common/include/rte_eal.h | 58 --- lib/librte_mempool/rte_mempool.c| 10 -- 2 files changed, 7

[dpdk-dev] [PATCH 07/10] tailq: introduce dynamic register system

2015-03-04 Thread David Marchand
mit, "static" tailqs are removed after conversion of all users in next commits. Signed-off-by: David Marchand --- app/test/test_tailq.c | 82 +- lib/librte_eal/bsdapp/eal/rte_eal_version.map |1 + lib/librte_eal/common/ea

[dpdk-dev] [PATCH 08/10] tailq: move to dynamic tailq

2015-03-04 Thread David Marchand
Use dynamic tailq rather than static entries. Signed-off-by: David Marchand --- lib/librte_acl/rte_acl.c | 33 +++ lib/librte_acl/rte_acl.h |1 - lib/librte_distributor/rte_distributor.c | 16 +-- lib

[dpdk-dev] [PATCH 09/10] tailq: remove static slots

2015-03-04 Thread David Marchand
No static entry remaining, the rte_tailq api is for "internal use" only, get rid of the static slots. Signed-off-by: David Marchand --- lib/librte_eal/bsdapp/eal/rte_eal_version.map |1 - lib/librte_eal/common/Makefile|2 +- lib/librte_

[dpdk-dev] [PATCH 10/10] eal: no need for E_RTE_NO_TAILQ anymore

2015-03-04 Thread David Marchand
There is no remaining reference to this errno. Signed-off-by: David Marchand --- app/test/test_errno.c |2 +- lib/librte_eal/common/eal_common_errno.c |2 -- lib/librte_eal/common/include/rte_errno.h |1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff

[dpdk-dev] [PATCH 3/3] librte_eal/common: Fix redeclaration of enumerator ‘REG_EAX’

2015-03-05 Thread David Marchand
ontext.h So I am not sure I understand why we redefine stuff already available from the toolchain. Rather than prefixing, I think we should get rid of this and include the right header. -- David Marchand

[dpdk-dev] [PATCH 3/3 v2] librte_eal/common: Fix redeclaration of enumerator ‘REG_EAX’

2015-03-05 Thread David Marchand
ael Qou > NAK. You did not answer my question. This mail title is broken anyway. -- David Marchand

[dpdk-dev] [PATCH 3/3 v3] librte_eal/common: Fix redeclaration of enumerator ‘REG_EAX’

2015-03-06 Thread David Marchand
be fixed - commit log must be fixed :CPU_REG_EAX -> RTE_REG_EAX There is still some ambiguity in these macros names to me, but this is the quickest fix, so : Acked-by: David Marchand -- David Marchand > > Signed-off-by: Michael Qiu > --- > v3 --> v2: > Fix sign

[dpdk-dev] [PATCH 1/2] virtio: initialize iopl when device is initialized

2015-03-06 Thread David Marchand
configure > > > So the only place where iopl() can be done in the proper context > so that the IRQ (and other helper threads in future) have the correct > permissions is in eal_init. > Is eth_virtio_dev_init() not a better place rather than eal ? I prefer avoiding #ifdef pmd in eal. -- David Marchand

[dpdk-dev] [PATCH 1/2] virtio: initialize iopl when device is initialized

2015-03-06 Thread David Marchand
n called from rte_eal_dev_init(). So iopl() is not called at "_start" time (in both virtio static or shared object cases), but in rte_eal_dev_init(). In the end, the fix would be to move rte_eal_intr_init() after rte_eal_dev_init(). Can you test this ? Thanks. -- David Marchand

[dpdk-dev] [PATCH 1/2] virtio: initialize iopl when device is initialized

2015-03-07 Thread David Marchand
On Sat, Mar 7, 2015 at 12:43 AM, Stephen Hemminger < stephen at networkplumber.org> wrote: > On Fri, 6 Mar 2015 23:04:33 +0100 > David Marchand wrote: > > > In the end, the fix would be to move rte_eal_intr_init() after > rte_eal_dev_init(). > > > That would wor

[dpdk-dev] [PATCH 1/2] virtio: initialize iopl when device is initialized

2015-03-09 Thread David Marchand
ication is daemon, not in a > toy > demo or test application. > Contrary to what you asserted, the problem does happen when using testpmd (if this is the toy you are talking about). So, I would say your real world application is no better than testpmd. I will post the right fixes. -- David Marchand

[dpdk-dev] [PATCH 0/2] fix virtio interrupt handling

2015-03-09 Thread David Marchand
pmd and/or thread: http://dpdk.org/ml/archives/dev/2014-September/005450.html Can you look at these ? Thanks. -- David Marchand David Marchand (2): eal/linux: move plugin load to very start of eal init virtio: change io privilege level as early as possible lib/librte_eal/linuxapp/eal/ea

[dpdk-dev] [PATCH 1/2] eal/linux: move plugin load to very start of eal init

2015-03-09 Thread David Marchand
by eal_parse_args(). Signed-off-by: David Marchand --- lib/librte_eal/linuxapp/eal/eal.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index 16f9e7c..c1c103d 100644 --- a/lib/librte_eal

[dpdk-dev] [PATCH 2/2] virtio: change io privilege level as early as possible

2015-03-09 Thread David Marchand
d init macro so that the pmd will not register if the io privilege level is insufficient. Besides, I moved rte_virtio_pmd_init() and related structure near its calling site, so that all init code can be looked at in a glance. The only change here is a new comment. Signed-off-by: David Marcha

  1   2   3   4   5   6   7   8   >