[dpdk-dev] [PATCH] librte_eal:Using compiler memory barrier for IA processor's rte_wmb/rte_rmb.
> Hi Dong, > >> -Original Message- >> From: Wang Dong [mailto:dong.wang.pro at hotmail.com] >> Sent: Saturday, May 09, 2015 11:24 AM >> To: Ananyev, Konstantin; dev at dpdk.org >> Subject: Re: [dpdk-dev] [PATCH] librte_eal:Using compiler memory barrier for >> IA processor's rte_wmb/rte_rmb. >> >> Hi Konstantin, >> >>> >>> Hi Dong, >>> -Original Message- From: Wang Dong [mailto:dong.wang.pro at hotmail.com] Sent: Thursday, May 07, 2015 4:28 PM To: Ananyev, Konstantin; dev at dpdk.org Subject: Re: [dpdk-dev] [PATCH] librte_eal:Using compiler memory barrier for IA processor's rte_wmb/rte_rmb. Hi Konstantin, > Hi Dong, > >> -Original Message- >> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of WangDong >> Sent: Tuesday, May 05, 2015 4:38 PM >> To: dev at dpdk.org >> Subject: [dpdk-dev] [PATCH] librte_eal:Using compiler memory barrier for >> IA processor's rte_wmb/rte_rmb. >> >> The current implementation of rte_wmb/rte_rmb for x86 is using processor >> memory barrier. It's unnessary for IA processor, compiler >> memory barrier is enough. > > I wouldn't say they are 'unnecessary'. > There are situations, even on IA, when you need _fence_ isntructions. > So, please leave rte_*mb() macros unmodified. OK, leave them unmodified, but I really can't find a situation to use sfence and lfence instructions. >>> >>> For example: >>> http://bartoszmilewski.com/2008/11/05/who-ordered-memory-fences-on-an-x86/ >>> http://dpdk.org/ml/archives/dev/2014-May/002613.html >>> > I still think that we need to create a new set of architecture dependent > macros, as what discussed before. > Probably by analogy with linux kernel rte_smp_*mb() is a good name for > them. > Though if you have some better name in mind, I am open to suggestions > here. What abount rte_dma_*mb()? I find dma_*mb() in linux-4.0.1, it looks good~~ >>> >>> Hmm, but why _dma_? >>> We need same thing for multi-core communication too. >>> If rte_smp_ is not good enough, might be: rte_arch_? >> I want these two macro only used in PMD, so I think _dma_ is better. The >> memory barrier of processor-processor maybe more complex, and I'm not >> familiar with it... Someone can add rte_smp_*mb for multi-core. > > Sorry, what you are talking about? > At the end, it will use same instructions, whateve we'll name it: _dma_, > _smp_, _arch_. > Konstantin Hi Konstantin, In previous mail, I want to say, both rte_smp_*mb() and rte_dma_*mb() can be added, but the context of rte_smp_*mb() is different from rte_dma_*mb(), maybe rte_smp_*mb() is for thread and rte_dma_*mb() is for PMD. I'm not sure how to implement rte_smp_*mb(), hope it can be implemented by other developer. In Linux, I find it same as _dma_, if so, they will use same instructions. linux-4.0.1/arch/x86/include/asm/barrier.h, line 27: #ifdef CONFIG_X86_PPRO_FENCE #define dma_rmb() rmb() #else #define dma_rmb() barrier() #endif #define dma_wmb() barrier() #ifdef CONFIG_SMP #define smp_mb()mb() #define smp_rmb() dma_rmb() #define smp_wmb() barrier() #define set_mb(var, value) do { (void)xchg(&var, value); } while (0) #else /* !SMP */ #define smp_mb()barrier() #define smp_rmb() barrier() #define smp_wmb() barrier() #define set_mb(var, value) do { var = value; barrier(); } while (0) #endif /* SMP */ Dong > >> >> I think _arch_ is means nothing here, because rte_*mb is already for >> architectures that dpdk supported, they are redefined in these architecture. >> >>> > >> But if dpdk runing on a AMD processor, maybe we should use processor >> memory barrier. > > As far as I remember, amd has the same memory ordering model. It's too hard to find a AMD's software developer manual. >>> >>> There for example: >>> http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/24593_APM_v21.pdf >>> ? >> Search such document on AMD offical website for a long time, this manual >> is what I want, thanks very much!!! >> >> Dong >> >>> >>> Konstantin >>> Dong > So, I don't think we need #ifdef RTE_ARCH_X86_IA here. > > Konstantin > >> I add a macro to distinguish them, if we compile DPDK for IA processor, >> add the macro (RTE_ARCH_X86_IA) can improve performance >> with compiler memory barrier. Or we can add RTE_ARCH_X86_AMD for using >> processor memory barrier, in this case, if didn't >> add the >> macro, the memory ordering will not be guaranteed. Which macro is better? >> If this patch applied, the PMD's old implementation of compiler memory >> barrier (some volatile variable) can be fixed with rte_rmb() >> and rte_wmb() for any architecture. >> >> --- >> lib/librte_eal/common/include/arch/x86/rte_atomic.h | 10 ++ >>
[dpdk-dev] [PATCH 0/3] eal: uio irq fixes and enhancements
2015-04-28 09:36, Stephen Hemminger: > This set of patches starts out with fixing a regression where > uio_pci_generic broke link state interrupt, then adds better > management of PCI config space. > > Will leave up to document writers to update various release > notes and API manuals as they see fit. > > Also, needs what ever shared library map file updates which > maybe required when using dynamic libraries. But that should > not stop acceptance of this patch set. No, an incomplete patch cannot be accepted. There are several solutions: - Siobhan and Neil accept to work on doc and .map file - You provide a good v2 - Someone else finish this patchset - The bug remains (not a solution)
[dpdk-dev] [PATCH 00/19] Move PMDs to drivers directory
2015-05-12 19:04, Bruce Richardson: > drivers/e1000/e1000/e1000_hw.h | 1026 As explained in a previous comment, http://dpdk.org/ml/archives/dev/2015-May/017509.html I think this path would be better: drivers/net/e1000/base/e1000_hw.h
[dpdk-dev] [PATCH] Remove NO_AUTOLIBS option
On 5/12/15, 8:07 AM, "Thomas Monjalon" wrote: >2015-05-01 09:29, Keith Wiles: >> NO_AUTOLIBS is not required as it was not used or defined in the config >>files. >> >> Signed-off-by: Keith Wiles >> --- >> mk/rte.app.mk | 5 - >> 1 file changed, 5 deletions(-) > >Thanks Keith for trying to clean it, but removing half of an obsolete >feature >is not a real clean-up ;) >When running "git grep NO_AUTOLIBS", it will return results in >doc/guides/prog_guide Sorry, did not find that one in the docs. I thought I had searched for other locations. > >I fixed the doc and manually applied your patch based on your _LDLIBS-y >patch. >Maybe I'm too kind, I know people who whould refuse this patch :) > >Sorry for being long here, but I want to show the work done when applying >patches and I want to ask: is it a good thing to manually fix patches in >order >to speed-up the process or should it be more strict?
[dpdk-dev] Issues met while running openvswitch/dpdk/virtio inside the VM
Hi Pravin, Kevin, and others! Many thanks for your comments. >> This approach works fine on the real hardware but makes some issues when we >> run openvswitch/dpdk inside the virtual machine. I tried both emulated >> e1000 NIC and virtio NIC and neither of them worked just from the box. >> Emulated e1000 NIC doesn't support multiple tx queues at all (see >> http://dpdk.org/browse/dpdk/tree/lib/librte_pmd_e1000/em_ethdev.c#n884) and >> virtio NIC doesn't support multiple tx queues by default. To enable >> multiple tx queue for virtio NIC I had to add the following line to the >> interface section of my libvirt config: '' > Good point. We should document this. > Can you send patch to update README.DPDK? http://openvswitch.org/pipermail/dev/2015-May/055132.html Could you review it please? > It will be nice to make OVS-DPDK work in VM. As I said I am also > planning on working on it. Thanks for the heads up. I applied a few dirty hacks and make ovs/dpdk work inside a VM. That's definitely not something we want to merge. Just a way to better localize the issues: http://pastebin.ubuntu.com/11096400/ You may see that I did two things: Function virtio_dev_start() doesn't do queue/vq_ring (re-)initialization after consecutive calls to dev_stop() and dev_start() issued by openvswitch. This approach fails if the number of tx/rx queues changed between the calls. And that's exactly what happens inside openvswitch which initializes device in 1rx/1tx mode, starts it, stops it, re-initializes it in 1rx/Ntx mode and start the device. By removing 'hw->started' check I force the virtio driver to initialize these new (N-1) tx queues during 2nd startup. Second issue takes place because both rte_eth_{tx,rx}_queue_setup() can't be called twice for the same port_id/queue_id. Obvious reason is that rte_memzone_reserve_aligned() can't be called twice with the same memzone name without returning the error. I suspect that some other issues of this sort may exist there as well. To deal with that I avoid initialization of tx/rx queues which were already initialized. After applying these changes I get ovs/dpdk working in packets forwarding mode (from dpdk0 device to dpdk1 device) which means that PMDs are working fine. Additional functional issue is that it seems to be impossible to run dpdk with vfio backend inside qemu-kvm virtual machine. To my understanding, vfio requires vt-d (iommu) but qemu doesn't provide this functionality to the guest. I really want to be wrong but that's what I learned so far. If that's true -- igb_uio is the only option for us. > Daniele's patch http://openvswitch.org/pipermail/dev/2015-March/052344.html > also allows for having a limited set of queues available. Many thanks Kevin for mentioning this. I like the patch and definitely give it a try. Hope we'll have it merged soon. Thanks for helping, Oleg On Mon, May 11, 2015 at 3:10 PM, Traynor, Kevin wrote: > >> -Original Message- >> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Pravin Shelar >> Sent: Friday, May 8, 2015 2:20 AM >> To: Oleg Strikov >> Cc: dev at dpdk.org >> Subject: Re: [dpdk-dev] Issues met while running openvswitch/dpdk/virtio >> inside the VM >> >> On Thu, May 7, 2015 at 9:22 AM, Oleg Strikov >> wrote: >> > Hi DPDK users and developers, >> > >> > Few weeks ago I came up with the idea to run openvswitch with dpdk backend >> > inside qemu-kvm virtual machine. I don't have enough supported NICs yet and >> > my plan was to start experimenting inside the virtualized environment, >> > achieve functional state of all the components and then switch to the real >> > hardware. Additional useful side-effect of doing things inside the vm is >> > that issues can be easily reproduced by someone else in a different >> > environment. >> > >> > I (fondly) hoped that running openvswitch/dpdk inside the vm would be >> > simpler than running the same set of components on the real hardware. >> > Unfortunately I met a bunch of issues on the way. All these issues lie on a >> > borderline between dpdk and openvswitch but I think that you might be >> > interested in my story. Please note that I still don't have >> > openvswitch/dpdk working inside the vm. I definetely have some progress >> > though. >> > >> Thanks for summarizing all the issues. >> DPDK is testing is done on real hardware and we are planing testing it >> in VM. This will certainly help in fixing issues sooner. >> >> > Q: Does it sound okay from functional (not performance) standpoint to run >> > openvswitch/dpdk inside the vm? Do we want to be able to do this? Does >> > anyone from the dpdk development team do this? >> > >> > ## Issue 1 ## >> > >> > Openvswitch requires backend pmd driver to provide N_CORES tx queues where >> > N_CORES is the amount of cores available on the machine (openvswitch counts >> > the amount of cpu* entries inside /sys/devices/system/node/node0/ folder). >> > To my understanding it doesn't take into account the actual amount of cores
[dpdk-dev] [RFC PATCH 0/2] dynamic memzones
Hi Sergio, On 05/08/2015 06:37 PM, Sergio Gonzalez Monroy wrote: > Please NOTE that this series is meant to illustrate an idea/approach and start > discussion on the topic. > > Current implemetation allows reserving/creating memzones but not the opposite > (unreserve/delete). This affects mempools and other memzone based objects. > > From my point of view, implementing unreserve functionality for memzones > would > look like malloc over memsegs. > Thus, this approach moves malloc inside eal (which in turn removes a circular > dependency), where malloc heaps are composed of memsegs. > We keep both malloc and memzone APIs as they are, but memzones allocate its > memory by calling malloc_heap_alloc (there would be some ABI changes, see > below). > Some extra functionality is required in malloc to allow for boundary > constrained > memory requests. > In summary, currently malloc is based on memzones, and with this approach > memzones are based on malloc. > > An alternative would be to move malloc internals (malloc_heap, malloc_elem) > to the eal, but keeping the malloc library as is, where malloc is based on > memzones. This way we could avoid ABI changes while keeping the existing > circular dependency between malloc and eal. > > TODOs: > - Implement memzone_unreserve, simply call rte_malloc_free. > - Implement mempool_delete, simply call rte_memzone_unreserve. > - Init heaps with all available memsegs at once. > - Review symbols in version map. > > ABI changes: > - Removed support for rte_memzone_reserve_ with len=0 (not needed?). > - Removed librte_malloc as single library (linker script as work around?). > > IDEAS FOR FUTURE WORK: > - More control over requested memory, ie. shared/private, phys_contig, etc. > One of the goals would be trying to reduce the need of physically > contiguous > memory when not required. > - Attach/unattach hugepages at runtime (faster VM migration). > - Improve malloc algorithm? ie. jemalloc (or any other). > > > Any comments/toughts and/or different approaches are welcome. I like the idea and I don't see any issue on the principle. It will clearly help to have dynamic pools or rings. (I didn't dive in the second patch very deep, it's just a high-level thought). Regards, Olivier
[dpdk-dev] [PATCH v2] Implement memcmp using AVX/SSE instructions.
Hi Linhaifeng, On Tue, May 12, 2015 at 1:13 AM, Linhaifeng wrote: > Hi, Ravi Kerur > > On 2015/5/9 5:19, Ravi Kerur wrote: > > Preliminary results on Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz, Ubuntu > > 14.04 x86_64 shows comparisons using AVX/SSE instructions taking 1/3rd > > CPU ticks for 16, 32, 48 and 64 bytes comparison. In addition, > > I had write a program to test rte_memcmp and I have a question about the > result. > Why cost same CPU ticks for 128 256 512 1024 1500 bytes? Is there any > problem in > my test? > > If you can wait until Thursday I will probably send v3 patch which will have full memcmp support. In your program try with volatile pointer and see if it helps. > > [root at localhost test]# gcc avx_test.c -O3 -I > /data/linhf/v2r2c00/open-source/dpdk/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/ > -mavx2 -DRTE_MACHINE_CPUFLAG_AVX2 > [root at localhost test]# ./a.out 0 > each test run 1 times > copy 16 bytes costs average 7(rte_memcmp) 10(memcmp) ticks > copy 32 bytes costs average 9(rte_memcmp) 11(memcmp) ticks > copy 64 bytes costs average 6(rte_memcmp) 13(memcmp) ticks > copy 128 bytes costs average 11(rte_memcmp) 14(memcmp) ticks > copy 256 bytes costs average 9(rte_memcmp) 14(memcmp) ticks > copy 512 bytes costs average 9(rte_memcmp) 14(memcmp) ticks > copy 1024 bytes costs average 9(rte_memcmp) 14(memcmp) ticks > copy 1500 bytes costs average 11(rte_memcmp) 14(memcmp) ticks > [root at localhost test]# ./a.out 1 > each test run 1 times > copy 16 bytes costs average 2(rte_memcpy) 10(memcpy) ticks > copy 32 bytes costs average 2(rte_memcpy) 10(memcpy) ticks > copy 64 bytes costs average 3(rte_memcpy) 10(memcpy) ticks > copy 128 bytes costs average 7(rte_memcpy) 12(memcpy) ticks > copy 256 bytes costs average 9(rte_memcpy) 23(memcpy) ticks > copy 512 bytes costs average 14(rte_memcpy) 34(memcpy) ticks > copy 1024 bytes costs average 37(rte_memcpy) 61(memcpy) ticks > copy 1500 bytes costs average 62(rte_memcpy) 87(memcpy) ticks > > > Here is my program: > > #include > #include > #include > #include > #include > > #define TIMES 1L > > void test_memcpy(size_t n) > { > uint64_t start, end, i, start2, end2; > uint8_t *src, *dst; > > src = (uint8_t*)malloc(n * sizeof(uint8_t)); > dst = (uint8_t*)malloc(n * sizeof(uint8_t)); > > start = rte_rdtsc(); > for (i = 0; i < TIMES; i++) { > rte_memcpy(dst, src, n); > } > end = rte_rdtsc(); > > start2 = rte_rdtsc(); > for (i = 0; i < TIMES; i++) { > memcpy(dst, src, n); > } > end2 = rte_rdtsc(); > > > free(src); > free(dst); > > printf("copy %u bytes costs average %llu(rte_memcpy) %llu(memcpy) > ticks\n", n, (end - start)/TIMES, (end2 - start2)/TIMES); > } > > int test_memcmp(size_t n) > { > uint64_t start, end, i, start2, end2, j; > uint8_t *src, *dst; > int *ret; > > src = (uint8_t*)malloc(n * sizeof(uint8_t)); > dst = (uint8_t*)malloc(n * sizeof(uint8_t)); > ret = (int*)malloc(TIMES * sizeof(int)); > > start = rte_rdtsc(); > for (i = 0; i < TIMES; i++) { > ret[i] = rte_memcmp(dst, src, n); > } > end = rte_rdtsc(); > > start2 = rte_rdtsc(); > for (i = 0; i < TIMES; i++) { > ret[i] = memcmp(dst, src, n); > } > end2 = rte_rdtsc(); > > // avoid gcc to optimize memcmp > for (i = 0; i < TIMES; i++) { > t += ret[i]; > } > > free(src); > free(dst); > > printf("copy %u bytes costs average %llu(rte_memcmp) %llu(memcmp) > ticks\n", n, (end - start)/TIMES, (end2 - start2)/TIMES); > return t; > } > > > > > int main(int narg, char** args) > { > printf("each test run %llu times\n", TIMES); > > if (narg < 2) { > printf("usage:./avx_test 0/1 1:test memcpy 0:test > memcmp\n"); > return -1; > } > > if (atoi(args[1])) { > test_memcpy(16); > test_memcpy(32); > test_memcpy(64); > test_memcpy(128); > test_memcpy(256); > test_memcpy(512); > test_memcpy(1024); > test_memcpy(1500); > } else { > test_memcmp(16); > test_memcmp(32); > test_memcmp(64); > test_memcmp(128); > test_memcmp(256); > test_memcmp(512); > test_memcmp(1024); > test_memcmp(1500); > } > } > > > > > > >
[dpdk-dev] [PATCH v2] Implement memcmp using AVX/SSE instructions.
On Mon, May 11, 2015 at 3:29 PM, Don Provan wrote: > I probably shouldn't stick my nose into this, but I can't help myself. > > An experienced programmer will tend to ignore the documentation for > a routine named "blahblah_memcmp" and just assume it functions like > memcmp. Whether or not there's currently a use case in DPDK is > completely irrelevant because as soon as there *is* a use case, some > poor DPDK developer will try to use rte_memcmp for that and may or > may not have a test case that reveals their mistake. > In general I agree with you. However, comparison is a hit(equal) or miss(unequal) is generally the case in networking. I haven't seen cases where "less than" or "greater than" has mattered. > > The term "compare" suggests checking for larger or smaller. > If you want to check for equality, use "equal" or "eq" in the name > and return true if they're equal. But personally, I'd compare unless > there was a good reason not to. Indeed, I would just implement > full memcmp functionality and be done with it, even if that meant > using my fancy new assembly code for the cases I handle and then > calling memcmp itself for the cases I didn't. > > Agreed, I will look into implementing full functionality. > If a routine that appears to take an arbitrary size doesn't, the name > should in some manner reflect what sizes it takes. Better would be > for a routine that only handles specific sizes to be split into versions > that only take fixed sizes, but I don't know enough about your use > cases to say whether that makes sense here. > > Users of rte_memcmp will be existing dpdk test and library code. -don provan > dprovan at bivio.net > > -Original Message- > From: Ravi Kerur [mailto:rkerur at gmail.com] > Sent: Monday, May 11, 2015 1:47 PM > To: Ananyev, Konstantin > Cc: dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH v2] Implement memcmp using AVX/SSE > instructions. > > ... > Following memcmp semantics is not hard but there are no use-cases for it > in DPDK currently. Keeping it specific to DPDK usage simplifies code as > well. > I can change the name to "rte_compare" and add comments to the function. > Will it work? > ... > >
[dpdk-dev] [PATCH 2/2] cmdline: add polling mode for command line
On 2015-05-12 16:36, Olivier MATZ wrote: > Hi Pawel, > > On 05/12/2015 01:10 PM, Pawel Wodkowski wrote: >> This patch adds the ability to process console input in the same thread >> as packet processing by using poll() function. >> >> Signed-off-by: Pawel Wodkowski >> [...] >> --- a/lib/librte_cmdline/cmdline.h >> +++ b/lib/librte_cmdline/cmdline.h >> @@ -84,6 +84,7 @@ void cmdline_printf(const struct cmdline *cl, const >> char *fmt, ...) >> __attribute__((format(printf,2,3))); >> int cmdline_in(struct cmdline *cl, const char *buf, int size); >> int cmdline_write_char(struct rdline *rdl, char c); >> +int cmdline_poll(struct cmdline *cl); >> void cmdline_interact(struct cmdline *cl); >> void cmdline_quit(struct cmdline *cl); >> >> diff --git a/lib/librte_cmdline/rte_cmdline_version.map >> b/lib/librte_cmdline/rte_cmdline_version.map >> index 6193462..df55def 100644 > > I know the rest of the file does not document the functions > prototypes, but I think it could be helpful to add doxygen-style > comments for new functions. Yes, no problem. > >> diff --git a/lib/librte_cmdline/rte_cmdline_version.map >> b/lib/librte_cmdline/rte_cmdline_version.map >> index 6193462..df55def 100644 >> --- a/lib/librte_cmdline/rte_cmdline_version.map >> +++ b/lib/librte_cmdline/rte_cmdline_version.map >> @@ -40,6 +40,7 @@ DPDK_2.0 { >> cmdline_parse_num; >> cmdline_parse_portlist; >> cmdline_parse_string; >> +cmdline_poll; >> cmdline_printf; >> cmdline_quit; >> cmdline_set_prompt; >> > > I'm not sure the .map should be modified like this, instead I > would have added a new DPDK_2.1 section, like I did for this > commit (reviewed by Neil): > http://dpdk.org/browse/dpdk/commit/?id=bbd778248985e542175e9b4ce560f2d379e78c4e > > > > By the way, the following link is a good documentation about the > .map files: > http://people.freebsd.org/~deischen/symver/freebsd_versioning.txt Thank you, I will follow those instructions :) Please check v2 I will send shortly. -- Pawel
[dpdk-dev] [PATCH 19/19] doc: update source organisation text for drivers
Since the PMDs have moved to the drivers directory, update the docs that cover the source code organisation of DPDK Signed-off-by: Bruce Richardson --- doc/guides/prog_guide/source_org.rst | 37 +--- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/doc/guides/prog_guide/source_org.rst b/doc/guides/prog_guide/source_org.rst index 1bce0b8..f7d3a97 100644 --- a/doc/guides/prog_guide/source_org.rst +++ b/doc/guides/prog_guide/source_org.rst @@ -79,22 +79,37 @@ The lib directory contains:: +-- librte_mempool # memory pool manager (fixedsized objects) +-- librte_meter# QoS metering library +-- librte_net # various IP-related headers -+-- librte_pmd_bond # bonding poll mode driver -+-- librte_pmd_e1000# 1GbE poll mode drivers (igb and em) -+-- librte_pmd_fm10k# Host interface PMD driver for FM1 Series -+-- librte_pmd_ixgbe# 10GbE poll mode driver -+-- librte_pmd_i40e # 40GbE poll mode driver -+-- librte_pmd_mlx4 # Mellanox ConnectX-3 poll mode driver -+-- librte_pmd_pcap # PCAP poll mode driver -+-- librte_pmd_ring # ring poll mode driver -+-- librte_pmd_virtio # virtio poll mode driver -+-- librte_pmd_vmxnet3 # VMXNET3 poll mode driver -+-- librte_pmd_xenvirt # Xen virtio poll mode driver +-- librte_power# power management library +-- librte_ring # software rings (act as lockless FIFOs) +-- librte_sched# QoS scheduler and dropper library +-- librte_timer# timer library +Drivers +--- + +Drivers are special libraries which provide poll-mode driver implementations for +devices - either hardware devices or pseudo/virtual devices. They are contained +in the "drivers" subdirectory, and each compiles to a library with the format +"librte_pmd_X.a" where "X" is the driver name. + +The drivers directory contains:: + +drivers ++-- af_packet # poll mode driver based on linux af_packet ++-- bonding# bonding poll mode driver ++-- e1000 # 1GbE poll mode drivers (igb and em) ++-- enic # Cisco VIC Ethernet NIC Poll-mode Driver ++-- fm10k # Host interface PMD driver for FM1 Series ++-- i40e # 40GbE poll mode driver ++-- ixgbe # 10GbE poll mode driver ++-- mlx4 # Mellanox ConnectX-3 poll mode driver ++-- null # NULL poll mode driver for testing ++-- pcap # PCAP poll mode driver ++-- ring # ring poll mode driver ++-- virtio # virtio poll mode driver ++-- vmxnet3# VMXNET3 poll mode driver ++-- xenvirt# Xen virtio poll mode driver + Applications -- 2.1.0
[dpdk-dev] [PATCH 18/19] doc: update GSG doc for new drivers subdirectory
Update the directory list in the GSG to reflect recent changes of PMDs to the drivers directory Signed-off-by: Bruce Richardson --- doc/guides/linux_gsg/build_dpdk.rst | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/guides/linux_gsg/build_dpdk.rst b/doc/guides/linux_gsg/build_dpdk.rst index e3a0b46..2680e66 100644 --- a/doc/guides/linux_gsg/build_dpdk.rst +++ b/doc/guides/linux_gsg/build_dpdk.rst @@ -45,12 +45,14 @@ First, uncompress the archive and move to the uncompressed DPDK source directory user at host:~$ unzip DPDK-.zip user at host:~$ cd DPDK- user at host:~/DPDK-$ ls - app/ config/ examples/ lib/ LICENSE.GPL LICENSE.LGPL Makefile mk/ scripts/ tools/ + app/ config/ drivers/ examples/ lib/ LICENSE.GPL LICENSE.LGPL Makefile mk/ scripts/ tools/ The DPDK is composed of several directories: * lib: Source code of DPDK libraries +* drivers: Source code of DPDK poll-mode drivers + * app: Source code of DPDK applications (automatic tests) * examples: Source code of DPDK application examples @@ -153,9 +155,9 @@ In addition, the make clean command can be used to remove any existing compiled Browsing the Installed DPDK Environment Target -- -Once a target is created it contains all libraries and header files for the DPDK environment that are required to build customer applications. +Once a target is created it contains all libraries, including poll-mode drivers, and header files for the DPDK environment that are required to build customer applications. In addition, the test and testpmd applications are built under the build/app directory, which may be used for testing. -A kmod directory is also present that contains kernel modules which may be loaded if needed: +A kmod directory is also present that contains kernel modules which may be loaded if needed. .. code-block:: console -- 2.1.0
[dpdk-dev] [PATCH 17/19] maintainers: update maintainers with driver paths
Following the move of the PMDs to the drivers directory, update the maintainers file appropriately. Signed-off-by: Bruce Richardson --- MAINTAINERS | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index f53b87e..2d12e65 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -131,7 +131,7 @@ F: lib/librte_eal/linuxapp/xen_dom0/ F: lib/librte_eal/linuxapp/eal/*xen* F: lib/librte_eal/linuxapp/eal/include/exec-env/rte_dom0_common.h F: lib/librte_mempool/rte_dom0_mempool.c -F: lib/librte_pmd_xenvirt/ +F: drivers/xenvirt/ F: doc/guides/xen/ F: app/test-pmd/mempool_* F: examples/vhost_xen/ @@ -191,7 +191,7 @@ Drivers Link bonding M: Declan Doherty -F: lib/librte_pmd_bond/ +F: drivers/bonding/ F: doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst F: app/test/test_link_bonding* F: examples/bond/ @@ -207,40 +207,40 @@ F: doc/guides/sample_app_ug/kernel_nic_interface.rst Linux AF_PACKET M: John W. Linville -F: lib/librte_pmd_af_packet/ +F: drivers/af_packet/ Cisco enic -F: lib/librte_pmd_enic/ +F: drivers/enic/ Intel e1000 -F: lib/librte_pmd_e1000/ +F: drivers/e1000/ F: doc/guides/nics/e1000em.rst F: doc/guides/nics/intel_vf.rst Intel ixgbe M: Helin Zhang M: Konstantin Ananyev -F: lib/librte_pmd_ixgbe/ +F: drivers/ixgbe/ F: doc/guides/nics/ixgbe.rst F: doc/guides/nics/intel_vf.rst Intel i40e M: Helin Zhang -F: lib/librte_pmd_i40e/ +F: drivers/i40e/ F: doc/guides/nics/intel_vf.rst Intel fm10k M: Jing Chen -F: lib/librte_pmd_fm10k/ +F: drivers/fm10k/ Mellanox mlx4 M: Adrien Mazarguil -F: lib/librte_pmd_mlx4/ +F: drivers/mlx4/ F: doc/guides/nics/mlx4.rst RedHat virtio M: Changchun Ouyang -F: lib/librte_pmd_virtio/ +F: drivers/virtio/ F: doc/guides/nics/virtio.rst F: lib/librte_vhost/ F: doc/guides/prog_guide/vhost_lib.rst @@ -249,24 +249,24 @@ F: doc/guides/sample_app_ug/vhost.rst VMware vmxnet3 M: Yong Wang -F: lib/librte_pmd_vmxnet3/ +F: drivers/vmxnet3/ F: doc/guides/nics/vmxnet3.rst PCAP PMD M: Nicol?s Pernas Maradei M: John McNamara -F: lib/librte_pmd_pcap/ +F: drivers/pcap/ F: doc/guides/nics/pcap_ring.rst Ring PMD M: Bruce Richardson -F: lib/librte_pmd_ring/ +F: drivers/ring/ F: doc/guides/nics/pcap_ring.rst F: app/test/test_pmd_ring.c Null PMD M: Tetsuya Mukawa -F: lib/librte_pmd_null/ +F: drivers/null/ Packet processing -- 2.1.0
[dpdk-dev] [PATCH 16/19] xenvirt: move xenvirt PMD to drivers directory
Move xenvirt PMD to drivers directory Signed-off-by: Bruce Richardson --- drivers/Makefile | 2 +- drivers/xenvirt/Makefile | 62 ++ drivers/xenvirt/rte_eth_xenvirt.c | 714 + drivers/xenvirt/rte_eth_xenvirt.h | 62 ++ drivers/xenvirt/rte_eth_xenvirt_version.map| 7 + drivers/xenvirt/rte_mempool_gntalloc.c | 298 + drivers/xenvirt/rte_xen_lib.c | 428 drivers/xenvirt/rte_xen_lib.h | 113 drivers/xenvirt/virtio_logs.h | 70 ++ drivers/xenvirt/virtqueue.h| 280 lib/Makefile | 1 - lib/librte_eal/linuxapp/eal/Makefile | 2 +- lib/librte_pmd_xenvirt/Makefile| 62 -- lib/librte_pmd_xenvirt/rte_eth_xenvirt.c | 714 - lib/librte_pmd_xenvirt/rte_eth_xenvirt.h | 62 -- lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map | 7 - lib/librte_pmd_xenvirt/rte_mempool_gntalloc.c | 298 - lib/librte_pmd_xenvirt/rte_xen_lib.c | 428 lib/librte_pmd_xenvirt/rte_xen_lib.h | 113 lib/librte_pmd_xenvirt/virtio_logs.h | 70 -- lib/librte_pmd_xenvirt/virtqueue.h | 280 21 files changed, 2036 insertions(+), 2037 deletions(-) create mode 100644 drivers/xenvirt/Makefile create mode 100644 drivers/xenvirt/rte_eth_xenvirt.c create mode 100644 drivers/xenvirt/rte_eth_xenvirt.h create mode 100644 drivers/xenvirt/rte_eth_xenvirt_version.map create mode 100644 drivers/xenvirt/rte_mempool_gntalloc.c create mode 100644 drivers/xenvirt/rte_xen_lib.c create mode 100644 drivers/xenvirt/rte_xen_lib.h create mode 100644 drivers/xenvirt/virtio_logs.h create mode 100644 drivers/xenvirt/virtqueue.h delete mode 100644 lib/librte_pmd_xenvirt/Makefile delete mode 100644 lib/librte_pmd_xenvirt/rte_eth_xenvirt.c delete mode 100644 lib/librte_pmd_xenvirt/rte_eth_xenvirt.h delete mode 100644 lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map delete mode 100644 lib/librte_pmd_xenvirt/rte_mempool_gntalloc.c delete mode 100644 lib/librte_pmd_xenvirt/rte_xen_lib.c delete mode 100644 lib/librte_pmd_xenvirt/rte_xen_lib.h delete mode 100644 lib/librte_pmd_xenvirt/virtio_logs.h delete mode 100644 lib/librte_pmd_xenvirt/virtqueue.h diff --git a/drivers/Makefile b/drivers/Makefile index 5f097af..2187818 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -44,7 +44,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += pcap DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += ring DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio DIRS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += vmxnet3 -#DIRS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += librte_pmd_xenvirt +DIRS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += xenvirt include $(RTE_SDK)/mk/rte.sharelib.mk include $(RTE_SDK)/mk/rte.subdir.mk diff --git a/drivers/xenvirt/Makefile b/drivers/xenvirt/Makefile new file mode 100644 index 000..f0c796c --- /dev/null +++ b/drivers/xenvirt/Makefile @@ -0,0 +1,62 @@ +# BSD LICENSE +# +# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +include $(RTE_SDK)/mk/rte.vars.mk + +# +# library name +# +LIB = librte_pmd_xenvirt.a + +CFLAGS += -O3 +CFLAGS +
[dpdk-dev] [PATCH 15/19] xmvnet3: move vmxnet3 PMD to drivers directory
Move vmxnet3 PMD to drivers directory Signed-off-by: Bruce Richardson --- drivers/Makefile |2 +- drivers/vmxnet3/Makefile | 84 ++ drivers/vmxnet3/rte_pmd_vmxnet3_version.map|4 + drivers/vmxnet3/vmxnet3/README | 50 + drivers/vmxnet3/vmxnet3/includeCheck.h | 40 + drivers/vmxnet3/vmxnet3/upt1_defs.h| 117 +++ drivers/vmxnet3/vmxnet3/vmware_pack_begin.h| 32 + drivers/vmxnet3/vmxnet3/vmware_pack_end.h | 32 + drivers/vmxnet3/vmxnet3/vmxnet3_defs.h | 751 ++ drivers/vmxnet3/vmxnet3/vmxnet3_osdep.h| 48 + drivers/vmxnet3/vmxnet3_ethdev.c | 779 ++ drivers/vmxnet3/vmxnet3_ethdev.h | 183 drivers/vmxnet3/vmxnet3_logs.h | 74 ++ drivers/vmxnet3/vmxnet3_ring.h | 183 drivers/vmxnet3/vmxnet3_rxtx.c | 1068 lib/Makefile |1 - lib/librte_pmd_vmxnet3/Makefile| 84 -- lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map |4 - lib/librte_pmd_vmxnet3/vmxnet3/README | 50 - lib/librte_pmd_vmxnet3/vmxnet3/includeCheck.h | 40 - lib/librte_pmd_vmxnet3/vmxnet3/upt1_defs.h | 117 --- lib/librte_pmd_vmxnet3/vmxnet3/vmware_pack_begin.h | 32 - lib/librte_pmd_vmxnet3/vmxnet3/vmware_pack_end.h | 32 - lib/librte_pmd_vmxnet3/vmxnet3/vmxnet3_defs.h | 751 -- lib/librte_pmd_vmxnet3/vmxnet3/vmxnet3_osdep.h | 48 - lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c| 779 -- lib/librte_pmd_vmxnet3/vmxnet3_ethdev.h| 183 lib/librte_pmd_vmxnet3/vmxnet3_logs.h | 74 -- lib/librte_pmd_vmxnet3/vmxnet3_ring.h | 183 lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c | 1068 30 files changed, 3446 insertions(+), 3447 deletions(-) create mode 100644 drivers/vmxnet3/Makefile create mode 100644 drivers/vmxnet3/rte_pmd_vmxnet3_version.map create mode 100644 drivers/vmxnet3/vmxnet3/README create mode 100644 drivers/vmxnet3/vmxnet3/includeCheck.h create mode 100644 drivers/vmxnet3/vmxnet3/upt1_defs.h create mode 100644 drivers/vmxnet3/vmxnet3/vmware_pack_begin.h create mode 100644 drivers/vmxnet3/vmxnet3/vmware_pack_end.h create mode 100644 drivers/vmxnet3/vmxnet3/vmxnet3_defs.h create mode 100644 drivers/vmxnet3/vmxnet3/vmxnet3_osdep.h create mode 100644 drivers/vmxnet3/vmxnet3_ethdev.c create mode 100644 drivers/vmxnet3/vmxnet3_ethdev.h create mode 100644 drivers/vmxnet3/vmxnet3_logs.h create mode 100644 drivers/vmxnet3/vmxnet3_ring.h create mode 100644 drivers/vmxnet3/vmxnet3_rxtx.c delete mode 100644 lib/librte_pmd_vmxnet3/Makefile delete mode 100644 lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map delete mode 100644 lib/librte_pmd_vmxnet3/vmxnet3/README delete mode 100644 lib/librte_pmd_vmxnet3/vmxnet3/includeCheck.h delete mode 100644 lib/librte_pmd_vmxnet3/vmxnet3/upt1_defs.h delete mode 100644 lib/librte_pmd_vmxnet3/vmxnet3/vmware_pack_begin.h delete mode 100644 lib/librte_pmd_vmxnet3/vmxnet3/vmware_pack_end.h delete mode 100644 lib/librte_pmd_vmxnet3/vmxnet3/vmxnet3_defs.h delete mode 100644 lib/librte_pmd_vmxnet3/vmxnet3/vmxnet3_osdep.h delete mode 100644 lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c delete mode 100644 lib/librte_pmd_vmxnet3/vmxnet3_ethdev.h delete mode 100644 lib/librte_pmd_vmxnet3/vmxnet3_logs.h delete mode 100644 lib/librte_pmd_vmxnet3/vmxnet3_ring.h delete mode 100644 lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c diff --git a/drivers/Makefile b/drivers/Makefile index 7d848e1..5f097af 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -43,7 +43,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += null DIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += pcap DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += ring DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio -#DIRS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += librte_pmd_vmxnet3 +DIRS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += vmxnet3 #DIRS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += librte_pmd_xenvirt include $(RTE_SDK)/mk/rte.sharelib.mk diff --git a/drivers/vmxnet3/Makefile b/drivers/vmxnet3/Makefile new file mode 100644 index 000..48177a3 --- /dev/null +++ b/drivers/vmxnet3/Makefile @@ -0,0 +1,84 @@ +# BSD LICENSE +# +# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following discla
[dpdk-dev] [PATCH 14/19] virtio: move virtio PMD to drivers directory
Move virtio PMD to drivers directory Signed-off-by: Bruce Richardson --- drivers/Makefile |2 +- drivers/virtio/Makefile | 60 + drivers/virtio/rte_pmd_virtio_version.map|4 + drivers/virtio/virtio_ethdev.c | 1504 ++ drivers/virtio/virtio_ethdev.h | 124 ++ drivers/virtio/virtio_logs.h | 70 + drivers/virtio/virtio_pci.c | 147 +++ drivers/virtio/virtio_pci.h | 270 drivers/virtio/virtio_ring.h | 163 +++ drivers/virtio/virtio_rxtx.c | 815 drivers/virtio/virtqueue.c | 70 + drivers/virtio/virtqueue.h | 325 + lib/Makefile |1 - lib/librte_pmd_virtio/Makefile | 60 - lib/librte_pmd_virtio/rte_pmd_virtio_version.map |4 - lib/librte_pmd_virtio/virtio_ethdev.c| 1504 -- lib/librte_pmd_virtio/virtio_ethdev.h| 124 -- lib/librte_pmd_virtio/virtio_logs.h | 70 - lib/librte_pmd_virtio/virtio_pci.c | 147 --- lib/librte_pmd_virtio/virtio_pci.h | 270 lib/librte_pmd_virtio/virtio_ring.h | 163 --- lib/librte_pmd_virtio/virtio_rxtx.c | 815 lib/librte_pmd_virtio/virtqueue.c| 70 - lib/librte_pmd_virtio/virtqueue.h| 325 - 24 files changed, 3553 insertions(+), 3554 deletions(-) create mode 100644 drivers/virtio/Makefile create mode 100644 drivers/virtio/rte_pmd_virtio_version.map create mode 100644 drivers/virtio/virtio_ethdev.c create mode 100644 drivers/virtio/virtio_ethdev.h create mode 100644 drivers/virtio/virtio_logs.h create mode 100644 drivers/virtio/virtio_pci.c create mode 100644 drivers/virtio/virtio_pci.h create mode 100644 drivers/virtio/virtio_ring.h create mode 100644 drivers/virtio/virtio_rxtx.c create mode 100644 drivers/virtio/virtqueue.c create mode 100644 drivers/virtio/virtqueue.h delete mode 100644 lib/librte_pmd_virtio/Makefile delete mode 100644 lib/librte_pmd_virtio/rte_pmd_virtio_version.map delete mode 100644 lib/librte_pmd_virtio/virtio_ethdev.c delete mode 100644 lib/librte_pmd_virtio/virtio_ethdev.h delete mode 100644 lib/librte_pmd_virtio/virtio_logs.h delete mode 100644 lib/librte_pmd_virtio/virtio_pci.c delete mode 100644 lib/librte_pmd_virtio/virtio_pci.h delete mode 100644 lib/librte_pmd_virtio/virtio_ring.h delete mode 100644 lib/librte_pmd_virtio/virtio_rxtx.c delete mode 100644 lib/librte_pmd_virtio/virtqueue.c delete mode 100644 lib/librte_pmd_virtio/virtqueue.h diff --git a/drivers/Makefile b/drivers/Makefile index 567d77f..7d848e1 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -42,7 +42,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += mlx4 DIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += null DIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += pcap DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += ring -#DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += librte_pmd_virtio +DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio #DIRS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += librte_pmd_vmxnet3 #DIRS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += librte_pmd_xenvirt diff --git a/drivers/virtio/Makefile b/drivers/virtio/Makefile new file mode 100644 index 000..21ff7e5 --- /dev/null +++ b/drivers/virtio/Makefile @@ -0,0 +1,60 @@ +# BSD LICENSE +# +# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY
[dpdk-dev] [PATCH 13/19] ring pmd: move ring PMD to the drivers directory
Move ring PMD to drivers directory Signed-off-by: Bruce Richardson --- drivers/Makefile | 2 +- drivers/ring/Makefile| 61 +++ drivers/ring/rte_eth_ring.c | 579 +++ drivers/ring/rte_eth_ring.h | 57 +++ drivers/ring/rte_eth_ring_version.map| 9 + lib/Makefile | 1 - lib/librte_eal/bsdapp/eal/Makefile | 2 +- lib/librte_eal/linuxapp/eal/Makefile | 2 +- lib/librte_pmd_ring/Makefile | 61 --- lib/librte_pmd_ring/rte_eth_ring.c | 579 --- lib/librte_pmd_ring/rte_eth_ring.h | 57 --- lib/librte_pmd_ring/rte_eth_ring_version.map | 9 - 12 files changed, 709 insertions(+), 710 deletions(-) create mode 100644 drivers/ring/Makefile create mode 100644 drivers/ring/rte_eth_ring.c create mode 100644 drivers/ring/rte_eth_ring.h create mode 100644 drivers/ring/rte_eth_ring_version.map delete mode 100644 lib/librte_pmd_ring/Makefile delete mode 100644 lib/librte_pmd_ring/rte_eth_ring.c delete mode 100644 lib/librte_pmd_ring/rte_eth_ring.h delete mode 100644 lib/librte_pmd_ring/rte_eth_ring_version.map diff --git a/drivers/Makefile b/drivers/Makefile index cb8308c..567d77f 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -41,7 +41,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += ixgbe DIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += mlx4 DIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += null DIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += pcap -#DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += librte_pmd_ring +DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += ring #DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += librte_pmd_virtio #DIRS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += librte_pmd_vmxnet3 #DIRS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += librte_pmd_xenvirt diff --git a/drivers/ring/Makefile b/drivers/ring/Makefile new file mode 100644 index 000..e442d0b --- /dev/null +++ b/drivers/ring/Makefile @@ -0,0 +1,61 @@ +# BSD LICENSE +# +# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +include $(RTE_SDK)/mk/rte.vars.mk + +# +# library name +# +LIB = librte_pmd_ring.a + +CFLAGS += -O3 +CFLAGS += $(WERROR_FLAGS) + +EXPORT_MAP := rte_eth_ring_version.map + +LIBABIVER := 1 + +# +# all source are stored in SRCS-y +# +SRCS-$(CONFIG_RTE_LIBRTE_PMD_RING) += rte_eth_ring.c + +# +# Export include files +# +SYMLINK-y-include += rte_eth_ring.h + +# this lib depends upon: +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += lib/librte_eal lib/librte_ring +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += lib/librte_mbuf lib/librte_ether +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += lib/librte_kvargs + +include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/ring/rte_eth_ring.c b/drivers/ring/rte_eth_ring.c new file mode 100644 index 000..6832f01 --- /dev/null +++ b/drivers/ring/rte_eth_ring.c @@ -0,0 +1,579 @@ +/*- + * BSD LICENSE + * + * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form m
[dpdk-dev] [PATCH 12/19] pcap: move pcap pmd to drivers directory
Move pcap pmd to drivers directory Signed-off-by: Bruce Richardson at intel.com --- drivers/Makefile | 2 +- drivers/pcap/Makefile| 63 ++ drivers/pcap/rte_eth_pcap.c | 977 +++ drivers/pcap/rte_pmd_pcap_version.map| 4 + lib/Makefile | 1 - lib/librte_eal/bsdapp/eal/Makefile | 2 +- lib/librte_eal/linuxapp/eal/Makefile | 2 +- lib/librte_pmd_pcap/Makefile | 63 -- lib/librte_pmd_pcap/rte_eth_pcap.c | 977 --- lib/librte_pmd_pcap/rte_pmd_pcap_version.map | 4 - 10 files changed, 1047 insertions(+), 1048 deletions(-) create mode 100644 drivers/pcap/Makefile create mode 100644 drivers/pcap/rte_eth_pcap.c create mode 100644 drivers/pcap/rte_pmd_pcap_version.map delete mode 100644 lib/librte_pmd_pcap/Makefile delete mode 100644 lib/librte_pmd_pcap/rte_eth_pcap.c delete mode 100644 lib/librte_pmd_pcap/rte_pmd_pcap_version.map diff --git a/drivers/Makefile b/drivers/Makefile index d9115a7..cb8308c 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -40,8 +40,8 @@ DIRS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e DIRS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += ixgbe DIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += mlx4 DIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += null +DIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += pcap #DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += librte_pmd_ring -#DIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += librte_pmd_pcap #DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += librte_pmd_virtio #DIRS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += librte_pmd_vmxnet3 #DIRS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += librte_pmd_xenvirt diff --git a/drivers/pcap/Makefile b/drivers/pcap/Makefile new file mode 100644 index 000..0775dbc --- /dev/null +++ b/drivers/pcap/Makefile @@ -0,0 +1,63 @@ +# BSD LICENSE +# +# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# Copyright(c) 2014 6WIND S.A. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +include $(RTE_SDK)/mk/rte.vars.mk + +# +# library name +# +LIB = librte_pmd_pcap.a + +CFLAGS += -O3 +CFLAGS += $(WERROR_FLAGS) + +EXPORT_MAP := rte_pmd_pcap_version.map + +LIBABIVER := 1 + +# +# all source are stored in SRCS-y +# +SRCS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += rte_eth_pcap.c + +# +# Export include files +# +SYMLINK-y-include += + +# this lib depends upon: +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += lib/librte_mbuf +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += lib/librte_ether +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += lib/librte_malloc +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += lib/librte_kvargs + +include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/pcap/rte_eth_pcap.c b/drivers/pcap/rte_eth_pcap.c new file mode 100644 index 000..815d4ca --- /dev/null +++ b/drivers/pcap/rte_eth_pcap.c @@ -0,0 +1,977 @@ +/*- + * BSD LICENSE + * + * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. + * Copyright(c) 2014 6WIND S.A. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of
[dpdk-dev] [PATCH 11/19] null pmd: move null PMD to drivers directory
Move null PMD to drivers directory Signed-off-by: Bruce Richardson --- drivers/Makefile | 2 +- drivers/null/Makefile| 62 +++ drivers/null/rte_eth_null.c | 585 +++ drivers/null/rte_pmd_null_version.map| 4 + lib/Makefile | 1 - lib/librte_pmd_null/Makefile | 62 --- lib/librte_pmd_null/rte_eth_null.c | 585 --- lib/librte_pmd_null/rte_pmd_null_version.map | 4 - 8 files changed, 652 insertions(+), 653 deletions(-) create mode 100644 drivers/null/Makefile create mode 100644 drivers/null/rte_eth_null.c create mode 100644 drivers/null/rte_pmd_null_version.map delete mode 100644 lib/librte_pmd_null/Makefile delete mode 100644 lib/librte_pmd_null/rte_eth_null.c delete mode 100644 lib/librte_pmd_null/rte_pmd_null_version.map diff --git a/drivers/Makefile b/drivers/Makefile index b18a513..d9115a7 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -39,12 +39,12 @@ DIRS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k DIRS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e DIRS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += ixgbe DIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += mlx4 +DIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += null #DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += librte_pmd_ring #DIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += librte_pmd_pcap #DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += librte_pmd_virtio #DIRS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += librte_pmd_vmxnet3 #DIRS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += librte_pmd_xenvirt -#DIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += librte_pmd_null include $(RTE_SDK)/mk/rte.sharelib.mk include $(RTE_SDK)/mk/rte.subdir.mk diff --git a/drivers/null/Makefile b/drivers/null/Makefile new file mode 100644 index 000..6472015 --- /dev/null +++ b/drivers/null/Makefile @@ -0,0 +1,62 @@ +# BSD LICENSE +# +# Copyright (C) IGEL Co.,Ltd. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of IGEL Co.,Ltd. nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +include $(RTE_SDK)/mk/rte.vars.mk + +# +# library name +# +LIB = librte_pmd_null.a + +CFLAGS += -O3 +CFLAGS += $(WERROR_FLAGS) + +EXPORT_MAP := rte_pmd_null_version.map + +LIBABIVER := 1 + +# +# all source are stored in SRCS-y +# +SRCS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += rte_eth_null.c + +# +# Export include files +# +SYMLINK-y-include += + +# this lib depends upon: +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += lib/librte_mbuf +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += lib/librte_ether +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += lib/librte_malloc +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += lib/librte_kvargs + +include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/null/rte_eth_null.c b/drivers/null/rte_eth_null.c new file mode 100644 index 000..5895065 --- /dev/null +++ b/drivers/null/rte_eth_null.c @@ -0,0 +1,585 @@ +/*- + * BSD LICENSE + * + * Copyright (C) IGEL Co.,Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distri
[dpdk-dev] [PATCH 10/19] mlx4: move mlx4 PMD to drivers directory
move mlx4 PMD to drivers directory Signed-off-by: Bruce Richardson --- drivers/Makefile |2 +- drivers/mlx4/Makefile| 121 + drivers/mlx4/mlx4.c | 4686 ++ drivers/mlx4/mlx4.h | 157 + drivers/mlx4/rte_pmd_mlx4_version.map|4 + lib/Makefile |1 - lib/librte_pmd_mlx4/Makefile | 121 - lib/librte_pmd_mlx4/mlx4.c | 4686 -- lib/librte_pmd_mlx4/mlx4.h | 157 - lib/librte_pmd_mlx4/rte_pmd_mlx4_version.map |4 - 10 files changed, 4969 insertions(+), 4970 deletions(-) create mode 100644 drivers/mlx4/Makefile create mode 100644 drivers/mlx4/mlx4.c create mode 100644 drivers/mlx4/mlx4.h create mode 100644 drivers/mlx4/rte_pmd_mlx4_version.map delete mode 100644 lib/librte_pmd_mlx4/Makefile delete mode 100644 lib/librte_pmd_mlx4/mlx4.c delete mode 100644 lib/librte_pmd_mlx4/mlx4.h delete mode 100644 lib/librte_pmd_mlx4/rte_pmd_mlx4_version.map diff --git a/drivers/Makefile b/drivers/Makefile index 37881a5..b18a513 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -38,7 +38,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += enic DIRS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k DIRS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e DIRS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += ixgbe -#DIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += librte_pmd_mlx4 +DIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += mlx4 #DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += librte_pmd_ring #DIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += librte_pmd_pcap #DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += librte_pmd_virtio diff --git a/drivers/mlx4/Makefile b/drivers/mlx4/Makefile new file mode 100644 index 000..97b364a --- /dev/null +++ b/drivers/mlx4/Makefile @@ -0,0 +1,121 @@ +# BSD LICENSE +# +# Copyright 2012-2015 6WIND S.A. +# Copyright 2012 Mellanox. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of 6WIND S.A. nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +include $(RTE_SDK)/mk/rte.vars.mk + +# Library name. +LIB = librte_pmd_mlx4.a + +# Sources. +SRCS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += mlx4.c + +# Dependencies. +DEPDIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += lib/librte_ether +DEPDIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += lib/librte_mbuf +DEPDIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += lib/librte_eal +DEPDIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += lib/librte_mempool +DEPDIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += lib/librte_malloc + +# Basic CFLAGS. +CFLAGS += -O3 +CFLAGS += -std=gnu99 -Wall -Wextra +CFLAGS += -g +CFLAGS += -I. +CFLAGS += -D_XOPEN_SOURCE=600 +CFLAGS += $(WERROR_FLAGS) + +# A few warnings cannot be avoided in external headers. +CFLAGS += -Wno-error=cast-qual + +EXPORT_MAP := rte_pmd_mlx4_version.map +LIBABIVER := 1 + +# DEBUG which is usually provided on the command-line may enable +# CONFIG_RTE_LIBRTE_MLX4_DEBUG. +ifeq ($(DEBUG),1) +CONFIG_RTE_LIBRTE_MLX4_DEBUG := y +endif + +# User-defined CFLAGS. +ifeq ($(CONFIG_RTE_LIBRTE_MLX4_DEBUG),y) +CFLAGS += -pedantic -UNDEBUG -DPEDANTIC +else +CFLAGS += -DNDEBUG -UPEDANTIC +endif + +ifdef CONFIG_RTE_LIBRTE_MLX4_SGE_WR_N +CFLAGS += -DMLX4_PMD_SGE_WR_N=$(CONFIG_RTE_LIBRTE_MLX4_SGE_WR_N) +endif + +ifdef CONFIG_RTE_LIBRTE_MLX4_MAX_INLINE +CFLAGS += -DMLX4_PMD_MAX_INLINE=$(CONFIG_RTE_LIBRTE_MLX4_MAX_INLINE) +endif + +ifdef CONFIG_RTE_LIBRTE_MLX4_TX_MP_CACHE +CFLAGS += -DMLX4_PMD_TX_MP_CACHE=$(CONFIG_RTE_LIBRTE_MLX4_TX_MP_CACHE) +endif + +ifdef CONFIG_RTE_LIBRTE_MLX4_SOFT_CO
[dpdk-dev] [PATCH 09/19] ixbge: move ixgbe PMD to drivers directory
move ixgbe PMD to drivers directory Signed-off-by: Bruce Richardson --- drivers/Makefile |2 +- drivers/ixgbe/Makefile | 126 + drivers/ixgbe/ixgbe/README | 67 + drivers/ixgbe/ixgbe/ixgbe_82598.c | 1435 +++ drivers/ixgbe/ixgbe/ixgbe_82598.h | 52 + drivers/ixgbe/ixgbe/ixgbe_82599.c | 2713 + drivers/ixgbe/ixgbe/ixgbe_82599.h | 65 + drivers/ixgbe/ixgbe/ixgbe_api.c| 1477 +++ drivers/ixgbe/ixgbe/ixgbe_api.h| 206 + drivers/ixgbe/ixgbe/ixgbe_common.c | 4940 drivers/ixgbe/ixgbe/ixgbe_common.h | 183 + drivers/ixgbe/ixgbe/ixgbe_dcb.c| 714 drivers/ixgbe/ixgbe/ixgbe_dcb.h| 174 + drivers/ixgbe/ixgbe/ixgbe_dcb_82598.c | 360 ++ drivers/ixgbe/ixgbe/ixgbe_dcb_82598.h | 99 + drivers/ixgbe/ixgbe/ixgbe_dcb_82599.c | 593 +++ drivers/ixgbe/ixgbe/ixgbe_dcb_82599.h | 153 + drivers/ixgbe/ixgbe/ixgbe_mbx.c| 789 drivers/ixgbe/ixgbe/ixgbe_mbx.h| 150 + drivers/ixgbe/ixgbe/ixgbe_osdep.h | 155 + drivers/ixgbe/ixgbe/ixgbe_phy.c| 2583 + drivers/ixgbe/ixgbe/ixgbe_phy.h| 181 + drivers/ixgbe/ixgbe/ixgbe_type.h | 3858 ++ drivers/ixgbe/ixgbe/ixgbe_vf.c | 724 drivers/ixgbe/ixgbe/ixgbe_vf.h | 140 + drivers/ixgbe/ixgbe/ixgbe_x540.c | 1040 + drivers/ixgbe/ixgbe/ixgbe_x540.h | 66 + drivers/ixgbe/ixgbe/ixgbe_x550.c | 2113 ++ drivers/ixgbe/ixgbe/ixgbe_x550.h | 91 + drivers/ixgbe/ixgbe_82599_bypass.c | 314 ++ drivers/ixgbe/ixgbe_bypass.c | 414 ++ drivers/ixgbe/ixgbe_bypass.h | 68 + drivers/ixgbe/ixgbe_bypass_api.h | 299 ++ drivers/ixgbe/ixgbe_bypass_defines.h | 160 + drivers/ixgbe/ixgbe_ethdev.c | 4453 + drivers/ixgbe/ixgbe_ethdev.h | 400 ++ drivers/ixgbe/ixgbe_fdir.c | 1144 ++ drivers/ixgbe/ixgbe_logs.h | 78 + drivers/ixgbe/ixgbe_pf.c | 629 +++ drivers/ixgbe/ixgbe_rxtx.c | 4780 +++ drivers/ixgbe/ixgbe_rxtx.h | 293 ++ drivers/ixgbe/ixgbe_rxtx_vec.c | 792 drivers/ixgbe/rte_pmd_ixgbe_version.map|4 + lib/Makefile |1 - lib/librte_pmd_ixgbe/Makefile | 126 - lib/librte_pmd_ixgbe/ixgbe/README | 67 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_82598.c | 1435 --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_82598.h | 52 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c | 2713 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.h | 65 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.c | 1477 --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.h | 206 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 4940 lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.h | 183 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb.c | 714 lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb.h | 174 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82598.c | 360 -- lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82598.h | 99 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82599.c | 593 --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82599.h | 153 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_mbx.c | 789 lib/librte_pmd_ixgbe/ixgbe/ixgbe_mbx.h | 150 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_osdep.h | 155 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c | 2583 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.h | 181 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h| 3858 -- lib/librte_pmd_ixgbe/ixgbe/ixgbe_vf.c | 724 lib/librte_pmd_ixgbe/ixgbe/ixgbe_vf.h | 140 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_x540.c| 1040 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_x540.h| 66 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c| 2113 -- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.h| 91 - lib/librte_pmd_ixgbe/ixgbe_82599_bypass.c | 314 -- lib/librte_pmd_ixgbe/ixgbe_bypass.c| 414 -- lib/librte_pmd_ixgbe/ixgbe_bypass.h| 68 - lib/librte_pmd_ixgbe/ixgbe_bypass_api.h| 299 -- lib/librte_pmd_ixgbe/ixgbe_bypass_defines.h| 160 - lib/librte_pmd_ixgbe/ixgbe_ethdev.c| 4453 - lib/librte_pmd_ixgbe/ixgbe_ethdev.h| 400 -- lib/librte_pmd_ixgbe/ixgbe_fdir.c | 1144 -- lib/librte_pmd_ixgbe/ixgbe_logs.h | 78 - lib/librte_pmd_ixg
[dpdk-dev] [PATCH 08/19] i40e: move i40e PMD to drivers directory
move i40e PMD to drivers directory Signed-off-by: Bruce Richardson --- drivers/Makefile |2 +- drivers/i40e/Makefile| 105 + drivers/i40e/i40e/i40e_adminq.c | 1084 + drivers/i40e/i40e/i40e_adminq.h | 157 + drivers/i40e/i40e/i40e_adminq_cmd.h | 2179 ++ drivers/i40e/i40e/i40e_alloc.h | 65 + drivers/i40e/i40e/i40e_common.c | 4793 + drivers/i40e/i40e/i40e_dcb.c | 479 +++ drivers/i40e/i40e/i40e_dcb.h | 161 + drivers/i40e/i40e/i40e_diag.c| 178 + drivers/i40e/i40e/i40e_diag.h| 61 + drivers/i40e/i40e/i40e_hmc.c | 373 ++ drivers/i40e/i40e/i40e_hmc.h | 243 ++ drivers/i40e/i40e/i40e_lan_hmc.c | 1417 +++ drivers/i40e/i40e/i40e_lan_hmc.h | 200 + drivers/i40e/i40e/i40e_nvm.c | 940 + drivers/i40e/i40e/i40e_osdep.h | 197 + drivers/i40e/i40e/i40e_prototype.h | 430 ++ drivers/i40e/i40e/i40e_register.h| 3377 +++ drivers/i40e/i40e/i40e_status.h | 107 + drivers/i40e/i40e/i40e_type.h| 1425 +++ drivers/i40e/i40e/i40e_virtchnl.h| 373 ++ drivers/i40e/i40e_ethdev.c | 5716 ++ drivers/i40e/i40e_ethdev.h | 567 +++ drivers/i40e/i40e_ethdev_vf.c| 1893 + drivers/i40e/i40e_fdir.c | 1361 ++ drivers/i40e/i40e_logs.h | 78 + drivers/i40e/i40e_pf.c | 1063 + drivers/i40e/i40e_pf.h | 127 + drivers/i40e/i40e_rxtx.c | 2709 drivers/i40e/i40e_rxtx.h | 211 + drivers/i40e/rte_pmd_i40e_version.map|4 + lib/Makefile |1 - lib/librte_pmd_i40e/Makefile | 105 - lib/librte_pmd_i40e/i40e/i40e_adminq.c | 1084 - lib/librte_pmd_i40e/i40e/i40e_adminq.h | 157 - lib/librte_pmd_i40e/i40e/i40e_adminq_cmd.h | 2179 -- lib/librte_pmd_i40e/i40e/i40e_alloc.h| 65 - lib/librte_pmd_i40e/i40e/i40e_common.c | 4793 - lib/librte_pmd_i40e/i40e/i40e_dcb.c | 479 --- lib/librte_pmd_i40e/i40e/i40e_dcb.h | 161 - lib/librte_pmd_i40e/i40e/i40e_diag.c | 178 - lib/librte_pmd_i40e/i40e/i40e_diag.h | 61 - lib/librte_pmd_i40e/i40e/i40e_hmc.c | 373 -- lib/librte_pmd_i40e/i40e/i40e_hmc.h | 243 -- lib/librte_pmd_i40e/i40e/i40e_lan_hmc.c | 1417 --- lib/librte_pmd_i40e/i40e/i40e_lan_hmc.h | 200 - lib/librte_pmd_i40e/i40e/i40e_nvm.c | 940 - lib/librte_pmd_i40e/i40e/i40e_osdep.h| 197 - lib/librte_pmd_i40e/i40e/i40e_prototype.h| 430 -- lib/librte_pmd_i40e/i40e/i40e_register.h | 3377 --- lib/librte_pmd_i40e/i40e/i40e_status.h | 107 - lib/librte_pmd_i40e/i40e/i40e_type.h | 1425 --- lib/librte_pmd_i40e/i40e/i40e_virtchnl.h | 373 -- lib/librte_pmd_i40e/i40e_ethdev.c| 5716 -- lib/librte_pmd_i40e/i40e_ethdev.h| 567 --- lib/librte_pmd_i40e/i40e_ethdev_vf.c | 1893 - lib/librte_pmd_i40e/i40e_fdir.c | 1361 -- lib/librte_pmd_i40e/i40e_logs.h | 78 - lib/librte_pmd_i40e/i40e_pf.c| 1063 - lib/librte_pmd_i40e/i40e_pf.h| 127 - lib/librte_pmd_i40e/i40e_rxtx.c | 2709 lib/librte_pmd_i40e/i40e_rxtx.h | 211 - lib/librte_pmd_i40e/rte_pmd_i40e_version.map |4 - 64 files changed, 32074 insertions(+), 32075 deletions(-) create mode 100644 drivers/i40e/Makefile create mode 100644 drivers/i40e/i40e/i40e_adminq.c create mode 100644 drivers/i40e/i40e/i40e_adminq.h create mode 100644 drivers/i40e/i40e/i40e_adminq_cmd.h create mode 100644 drivers/i40e/i40e/i40e_alloc.h create mode 100644 drivers/i40e/i40e/i40e_common.c create mode 100644 drivers/i40e/i40e/i40e_dcb.c create mode 100644 drivers/i40e/i40e/i40e_dcb.h create mode 100644 drivers/i40e/i40e/i40e_diag.c create mode 100644 drivers/i40e/i40e/i40e_diag.h create mode 100644 drivers/i40e/i40e/i40e_hmc.c create mode 100644 drivers/i40e/i40e/i40e_hmc.h create mode 100644 drivers/i40e/i40e/i40e_lan_hmc.c create mode 100644 drivers/i40e/i40e/i40e_lan_hmc.h create mode 100644 drivers/i40e/i40e/i40e_nvm.c create mode 100644 drivers/i40e/i40e/i40e_osdep.h create mode 100644 drivers/i40e/i40e/i40e_prototype.h create mode 100644 drivers/i40e/i40e/i40e_register.h create mode 100644 drivers/i40e/i40e/i40e_status.h create mode 100644 drivers/i40e/i40e/i40e_type.h create mode 100644 drivers/i40e/i40e/i40e_virtchnl.h create mode 100644 driver
[dpdk-dev] [PATCH 07/19] fm10k: move fm10k PMD to drivers directory
move fm10k PMD to drivers directory Signed-off-by: Bruce Richardson --- drivers/Makefile |2 +- drivers/fm10k/Makefile | 102 ++ drivers/fm10k/base/fm10k_api.c | 341 drivers/fm10k/base/fm10k_api.h | 61 + drivers/fm10k/base/fm10k_common.c | 572 +++ drivers/fm10k/base/fm10k_common.h | 52 + drivers/fm10k/base/fm10k_mbx.c | 2185 drivers/fm10k/base/fm10k_mbx.h | 329 drivers/fm10k/base/fm10k_osdep.h | 148 ++ drivers/fm10k/base/fm10k_pf.c | 1992 + drivers/fm10k/base/fm10k_pf.h | 155 ++ drivers/fm10k/base/fm10k_tlv.c | 914 ++ drivers/fm10k/base/fm10k_tlv.h | 199 +++ drivers/fm10k/base/fm10k_type.h| 937 ++ drivers/fm10k/base/fm10k_vf.c | 641 +++ drivers/fm10k/base/fm10k_vf.h | 91 + drivers/fm10k/fm10k.h | 292 drivers/fm10k/fm10k_ethdev.c | 1872 drivers/fm10k/fm10k_logs.h | 80 + drivers/fm10k/fm10k_rxtx.c | 461 + drivers/fm10k/rte_pmd_fm10k_version.map|4 + lib/Makefile |1 - lib/librte_pmd_fm10k/Makefile | 102 -- lib/librte_pmd_fm10k/base/fm10k_api.c | 341 lib/librte_pmd_fm10k/base/fm10k_api.h | 61 - lib/librte_pmd_fm10k/base/fm10k_common.c | 572 --- lib/librte_pmd_fm10k/base/fm10k_common.h | 52 - lib/librte_pmd_fm10k/base/fm10k_mbx.c | 2185 lib/librte_pmd_fm10k/base/fm10k_mbx.h | 329 lib/librte_pmd_fm10k/base/fm10k_osdep.h| 148 -- lib/librte_pmd_fm10k/base/fm10k_pf.c | 1992 - lib/librte_pmd_fm10k/base/fm10k_pf.h | 155 -- lib/librte_pmd_fm10k/base/fm10k_tlv.c | 914 -- lib/librte_pmd_fm10k/base/fm10k_tlv.h | 199 --- lib/librte_pmd_fm10k/base/fm10k_type.h | 937 -- lib/librte_pmd_fm10k/base/fm10k_vf.c | 641 --- lib/librte_pmd_fm10k/base/fm10k_vf.h | 91 - lib/librte_pmd_fm10k/fm10k.h | 292 lib/librte_pmd_fm10k/fm10k_ethdev.c| 1872 lib/librte_pmd_fm10k/fm10k_logs.h | 80 - lib/librte_pmd_fm10k/fm10k_rxtx.c | 461 - lib/librte_pmd_fm10k/rte_pmd_fm10k_version.map |4 - 42 files changed, 11429 insertions(+), 11430 deletions(-) create mode 100644 drivers/fm10k/Makefile create mode 100644 drivers/fm10k/base/fm10k_api.c create mode 100644 drivers/fm10k/base/fm10k_api.h create mode 100644 drivers/fm10k/base/fm10k_common.c create mode 100644 drivers/fm10k/base/fm10k_common.h create mode 100644 drivers/fm10k/base/fm10k_mbx.c create mode 100644 drivers/fm10k/base/fm10k_mbx.h create mode 100644 drivers/fm10k/base/fm10k_osdep.h create mode 100644 drivers/fm10k/base/fm10k_pf.c create mode 100644 drivers/fm10k/base/fm10k_pf.h create mode 100644 drivers/fm10k/base/fm10k_tlv.c create mode 100644 drivers/fm10k/base/fm10k_tlv.h create mode 100644 drivers/fm10k/base/fm10k_type.h create mode 100644 drivers/fm10k/base/fm10k_vf.c create mode 100644 drivers/fm10k/base/fm10k_vf.h create mode 100644 drivers/fm10k/fm10k.h create mode 100644 drivers/fm10k/fm10k_ethdev.c create mode 100644 drivers/fm10k/fm10k_logs.h create mode 100644 drivers/fm10k/fm10k_rxtx.c create mode 100644 drivers/fm10k/rte_pmd_fm10k_version.map delete mode 100644 lib/librte_pmd_fm10k/Makefile delete mode 100644 lib/librte_pmd_fm10k/base/fm10k_api.c delete mode 100644 lib/librte_pmd_fm10k/base/fm10k_api.h delete mode 100644 lib/librte_pmd_fm10k/base/fm10k_common.c delete mode 100644 lib/librte_pmd_fm10k/base/fm10k_common.h delete mode 100644 lib/librte_pmd_fm10k/base/fm10k_mbx.c delete mode 100644 lib/librte_pmd_fm10k/base/fm10k_mbx.h delete mode 100644 lib/librte_pmd_fm10k/base/fm10k_osdep.h delete mode 100644 lib/librte_pmd_fm10k/base/fm10k_pf.c delete mode 100644 lib/librte_pmd_fm10k/base/fm10k_pf.h delete mode 100644 lib/librte_pmd_fm10k/base/fm10k_tlv.c delete mode 100644 lib/librte_pmd_fm10k/base/fm10k_tlv.h delete mode 100644 lib/librte_pmd_fm10k/base/fm10k_type.h delete mode 100644 lib/librte_pmd_fm10k/base/fm10k_vf.c delete mode 100644 lib/librte_pmd_fm10k/base/fm10k_vf.h delete mode 100644 lib/librte_pmd_fm10k/fm10k.h delete mode 100644 lib/librte_pmd_fm10k/fm10k_ethdev.c delete mode 100644 lib/librte_pmd_fm10k/fm10k_logs.h delete mode 100644 lib/librte_pmd_fm10k/fm10k_rxtx.c delete mode 100644 lib/librte_pmd_fm10k/rte_pmd_fm10k_version.map diff --git a/drivers/Makefile b/drivers/Makefile index 5d1a9c3..743e156 100644 --- a/drivers/Mak
[dpdk-dev] [PATCH 06/19] enic: move enic PMD to drivers directory
move enic PMD to drivers directory Signed-off-by: Bruce Richardson --- drivers/Makefile |2 +- drivers/enic/LICENSE | 27 + drivers/enic/Makefile| 71 ++ drivers/enic/enic.h | 200 + drivers/enic/enic_clsf.c | 259 ++ drivers/enic/enic_compat.h | 147 drivers/enic/enic_ethdev.c | 640 +++ drivers/enic/enic_main.c | 1117 ++ drivers/enic/enic_res.c | 219 + drivers/enic/enic_res.h | 168 drivers/enic/rte_pmd_enic_version.map|4 + drivers/enic/vnic/cq_desc.h | 126 +++ drivers/enic/vnic/cq_enet_desc.h | 261 ++ drivers/enic/vnic/rq_enet_desc.h | 76 ++ drivers/enic/vnic/vnic_cq.c | 117 +++ drivers/enic/vnic/vnic_cq.h | 151 drivers/enic/vnic/vnic_dev.c | 1054 drivers/enic/vnic/vnic_dev.h | 212 + drivers/enic/vnic/vnic_devcmd.h | 774 ++ drivers/enic/vnic/vnic_enet.h| 78 ++ drivers/enic/vnic/vnic_intr.c| 78 ++ drivers/enic/vnic/vnic_intr.h| 126 +++ drivers/enic/vnic/vnic_nic.h | 88 ++ drivers/enic/vnic/vnic_resource.h| 97 +++ drivers/enic/vnic/vnic_rq.c | 245 ++ drivers/enic/vnic/vnic_rq.h | 282 +++ drivers/enic/vnic/vnic_rss.c | 85 ++ drivers/enic/vnic/vnic_rss.h | 61 ++ drivers/enic/vnic/vnic_stats.h | 86 ++ drivers/enic/vnic/vnic_wq.c | 245 ++ drivers/enic/vnic/vnic_wq.h | 283 +++ drivers/enic/vnic/wq_enet_desc.h | 114 +++ lib/Makefile |1 - lib/librte_pmd_enic/LICENSE | 27 - lib/librte_pmd_enic/Makefile | 71 -- lib/librte_pmd_enic/enic.h | 200 - lib/librte_pmd_enic/enic_clsf.c | 259 -- lib/librte_pmd_enic/enic_compat.h| 147 lib/librte_pmd_enic/enic_ethdev.c| 640 --- lib/librte_pmd_enic/enic_main.c | 1117 -- lib/librte_pmd_enic/enic_res.c | 219 - lib/librte_pmd_enic/enic_res.h | 168 lib/librte_pmd_enic/rte_pmd_enic_version.map |4 - lib/librte_pmd_enic/vnic/cq_desc.h | 126 --- lib/librte_pmd_enic/vnic/cq_enet_desc.h | 261 -- lib/librte_pmd_enic/vnic/rq_enet_desc.h | 76 -- lib/librte_pmd_enic/vnic/vnic_cq.c | 117 --- lib/librte_pmd_enic/vnic/vnic_cq.h | 151 lib/librte_pmd_enic/vnic/vnic_dev.c | 1054 lib/librte_pmd_enic/vnic/vnic_dev.h | 212 - lib/librte_pmd_enic/vnic/vnic_devcmd.h | 774 -- lib/librte_pmd_enic/vnic/vnic_enet.h | 78 -- lib/librte_pmd_enic/vnic/vnic_intr.c | 78 -- lib/librte_pmd_enic/vnic/vnic_intr.h | 126 --- lib/librte_pmd_enic/vnic/vnic_nic.h | 88 -- lib/librte_pmd_enic/vnic/vnic_resource.h | 97 --- lib/librte_pmd_enic/vnic/vnic_rq.c | 245 -- lib/librte_pmd_enic/vnic/vnic_rq.h | 282 --- lib/librte_pmd_enic/vnic/vnic_rss.c | 85 -- lib/librte_pmd_enic/vnic/vnic_rss.h | 61 -- lib/librte_pmd_enic/vnic/vnic_stats.h| 86 -- lib/librte_pmd_enic/vnic/vnic_wq.c | 245 -- lib/librte_pmd_enic/vnic/vnic_wq.h | 283 --- lib/librte_pmd_enic/vnic/wq_enet_desc.h | 114 --- 64 files changed, 7492 insertions(+), 7493 deletions(-) create mode 100644 drivers/enic/LICENSE create mode 100644 drivers/enic/Makefile create mode 100644 drivers/enic/enic.h create mode 100644 drivers/enic/enic_clsf.c create mode 100644 drivers/enic/enic_compat.h create mode 100644 drivers/enic/enic_ethdev.c create mode 100644 drivers/enic/enic_main.c create mode 100644 drivers/enic/enic_res.c create mode 100644 drivers/enic/enic_res.h create mode 100644 drivers/enic/rte_pmd_enic_version.map create mode 100644 drivers/enic/vnic/cq_desc.h create mode 100644 drivers/enic/vnic/cq_enet_desc.h create mode 100644 drivers/enic/vnic/rq_enet_desc.h create mode 100644 drivers/enic/vnic/vnic_cq.c create mode 100644 drivers/enic/vnic/vnic_cq.h create mode 100644 drivers/enic/vnic/vnic_dev.c create mode 100644 drivers/enic/vnic/vnic_dev.h create mode 100644 drivers/enic/vnic/vnic_devcmd.h create mode 100644 drivers/enic/vnic/vnic_enet.h create mode 100644 drivers/enic/vnic/vnic_intr.c create mode 100644 drivers/enic/vnic/vnic_intr.h create mode 100644 drivers/enic/vnic/vnic_ni
[dpdk-dev] [PATCH 05/19] e1000: move e1000 pmd to drivers directory
Move e1000 pmd to drivers directory Signed-off-by: Bruce Richardson --- drivers/Makefile |2 +- drivers/e1000/Makefile | 99 + drivers/e1000/e1000/README | 39 + drivers/e1000/e1000/e1000_80003es2lan.c| 1514 +++ drivers/e1000/e1000/e1000_80003es2lan.h| 100 + drivers/e1000/e1000/e1000_82540.c | 717 drivers/e1000/e1000/e1000_82541.c | 1268 ++ drivers/e1000/e1000/e1000_82541.h | 91 + drivers/e1000/e1000/e1000_82542.c | 588 +++ drivers/e1000/e1000/e1000_82543.c | 1553 +++ drivers/e1000/e1000/e1000_82543.h | 56 + drivers/e1000/e1000/e1000_82571.c | 2026 + drivers/e1000/e1000/e1000_82571.h | 65 + drivers/e1000/e1000/e1000_82575.c | 3639 drivers/e1000/e1000/e1000_82575.h | 520 +++ drivers/e1000/e1000/e1000_api.c| 1357 ++ drivers/e1000/e1000/e1000_api.h| 167 + drivers/e1000/e1000/e1000_defines.h| 1498 +++ drivers/e1000/e1000/e1000_hw.h | 1026 + drivers/e1000/e1000/e1000_i210.c | 1000 + drivers/e1000/e1000/e1000_i210.h | 110 + drivers/e1000/e1000/e1000_ich8lan.c| 5260 drivers/e1000/e1000/e1000_ich8lan.h| 313 ++ drivers/e1000/e1000/e1000_mac.c| 2247 ++ drivers/e1000/e1000/e1000_mac.h| 95 + drivers/e1000/e1000/e1000_manage.c | 573 +++ drivers/e1000/e1000/e1000_manage.h | 95 + drivers/e1000/e1000/e1000_mbx.c| 777 drivers/e1000/e1000/e1000_mbx.h| 105 + drivers/e1000/e1000/e1000_nvm.c| 1377 +++ drivers/e1000/e1000/e1000_nvm.h| 98 + drivers/e1000/e1000/e1000_osdep.c | 83 + drivers/e1000/e1000/e1000_osdep.h | 183 + drivers/e1000/e1000/e1000_phy.c| 4273 +++ drivers/e1000/e1000/e1000_phy.h| 327 ++ drivers/e1000/e1000/e1000_regs.h | 685 +++ drivers/e1000/e1000/e1000_vf.c | 586 +++ drivers/e1000/e1000/e1000_vf.h | 295 ++ drivers/e1000/e1000_ethdev.h | 340 ++ drivers/e1000/e1000_logs.h | 78 + drivers/e1000/em_ethdev.c | 1530 +++ drivers/e1000/em_rxtx.c| 1865 + drivers/e1000/igb_ethdev.c | 3656 drivers/e1000/igb_pf.c | 511 +++ drivers/e1000/igb_rxtx.c | 2397 +++ drivers/e1000/rte_pmd_e1000_version.map|4 + lib/Makefile |1 - lib/librte_pmd_e1000/Makefile | 99 - lib/librte_pmd_e1000/e1000/README | 39 - lib/librte_pmd_e1000/e1000/e1000_80003es2lan.c | 1514 --- lib/librte_pmd_e1000/e1000/e1000_80003es2lan.h | 100 - lib/librte_pmd_e1000/e1000/e1000_82540.c | 717 lib/librte_pmd_e1000/e1000/e1000_82541.c | 1268 -- lib/librte_pmd_e1000/e1000/e1000_82541.h | 91 - lib/librte_pmd_e1000/e1000/e1000_82542.c | 588 --- lib/librte_pmd_e1000/e1000/e1000_82543.c | 1553 --- lib/librte_pmd_e1000/e1000/e1000_82543.h | 56 - lib/librte_pmd_e1000/e1000/e1000_82571.c | 2026 - lib/librte_pmd_e1000/e1000/e1000_82571.h | 65 - lib/librte_pmd_e1000/e1000/e1000_82575.c | 3639 lib/librte_pmd_e1000/e1000/e1000_82575.h | 520 --- lib/librte_pmd_e1000/e1000/e1000_api.c | 1357 -- lib/librte_pmd_e1000/e1000/e1000_api.h | 167 - lib/librte_pmd_e1000/e1000/e1000_defines.h | 1498 --- lib/librte_pmd_e1000/e1000/e1000_hw.h | 1026 - lib/librte_pmd_e1000/e1000/e1000_i210.c| 1000 - lib/librte_pmd_e1000/e1000/e1000_i210.h| 110 - lib/librte_pmd_e1000/e1000/e1000_ich8lan.c | 5260 lib/librte_pmd_e1000/e1000/e1000_ich8lan.h | 313 -- lib/librte_pmd_e1000/e1000/e1000_mac.c | 2247 -- lib/librte_pmd_e1000/e1000/e1000_mac.h | 95 - lib/librte_pmd_e1000/e1000/e1000_manage.c | 573 --- lib/librte_pmd_e1000/e1000/e1000_manage.h | 95 - lib/librte_pmd_e1000/e1000/e1000_mbx.c | 777 lib/librte_pmd_e1000/e1000/e1000_mbx.h | 105 - lib/librte_pmd_e1000/e1000/e1000_nvm.c | 1377 --- lib/librte_pmd_e1000/e1000/e1000_nvm.h | 98 - lib/librte_pmd_e1000/e1000/e1000_osdep.c | 83 - lib/librte_pmd_e1000/e1000/e1000_osdep.h | 183 - lib/librte_pmd_e1000/e1000/e1000_phy.c | 4273 --- lib/librte_pmd_e1000/e1000/e1000_phy.h | 327 -- l
[dpdk-dev] [PATCH 04/19] bond: Move bonded ethdev pmd to drivers
Move bonded ethdev pmd to drivers Signed-off-by: Bruce Richardson --- doc/api/doxy-api.conf |2 +- drivers/Makefile |2 +- drivers/bonding/Makefile | 68 + drivers/bonding/rte_eth_bond.h| 366 drivers/bonding/rte_eth_bond_8023ad.c | 1216 +++ drivers/bonding/rte_eth_bond_8023ad.h | 222 ++ drivers/bonding/rte_eth_bond_8023ad_private.h | 308 +++ drivers/bonding/rte_eth_bond_alb.c| 287 +++ drivers/bonding/rte_eth_bond_alb.h| 142 ++ drivers/bonding/rte_eth_bond_api.c| 840 drivers/bonding/rte_eth_bond_args.c | 278 +++ drivers/bonding/rte_eth_bond_pmd.c| 2269 + drivers/bonding/rte_eth_bond_private.h| 287 +++ drivers/bonding/rte_eth_bond_version.map | 22 + lib/Makefile |1 - lib/librte_pmd_bond/Makefile | 68 - lib/librte_pmd_bond/rte_eth_bond.h| 366 lib/librte_pmd_bond/rte_eth_bond_8023ad.c | 1216 --- lib/librte_pmd_bond/rte_eth_bond_8023ad.h | 222 -- lib/librte_pmd_bond/rte_eth_bond_8023ad_private.h | 308 --- lib/librte_pmd_bond/rte_eth_bond_alb.c| 287 --- lib/librte_pmd_bond/rte_eth_bond_alb.h| 142 -- lib/librte_pmd_bond/rte_eth_bond_api.c| 840 lib/librte_pmd_bond/rte_eth_bond_args.c | 278 --- lib/librte_pmd_bond/rte_eth_bond_pmd.c| 2269 - lib/librte_pmd_bond/rte_eth_bond_private.h| 287 --- lib/librte_pmd_bond/rte_eth_bond_version.map | 22 - 27 files changed, 6307 insertions(+), 6308 deletions(-) create mode 100644 drivers/bonding/Makefile create mode 100644 drivers/bonding/rte_eth_bond.h create mode 100644 drivers/bonding/rte_eth_bond_8023ad.c create mode 100644 drivers/bonding/rte_eth_bond_8023ad.h create mode 100644 drivers/bonding/rte_eth_bond_8023ad_private.h create mode 100644 drivers/bonding/rte_eth_bond_alb.c create mode 100644 drivers/bonding/rte_eth_bond_alb.h create mode 100644 drivers/bonding/rte_eth_bond_api.c create mode 100644 drivers/bonding/rte_eth_bond_args.c create mode 100644 drivers/bonding/rte_eth_bond_pmd.c create mode 100644 drivers/bonding/rte_eth_bond_private.h create mode 100644 drivers/bonding/rte_eth_bond_version.map delete mode 100644 lib/librte_pmd_bond/Makefile delete mode 100644 lib/librte_pmd_bond/rte_eth_bond.h delete mode 100644 lib/librte_pmd_bond/rte_eth_bond_8023ad.c delete mode 100644 lib/librte_pmd_bond/rte_eth_bond_8023ad.h delete mode 100644 lib/librte_pmd_bond/rte_eth_bond_8023ad_private.h delete mode 100644 lib/librte_pmd_bond/rte_eth_bond_alb.c delete mode 100644 lib/librte_pmd_bond/rte_eth_bond_alb.h delete mode 100644 lib/librte_pmd_bond/rte_eth_bond_api.c delete mode 100644 lib/librte_pmd_bond/rte_eth_bond_args.c delete mode 100644 lib/librte_pmd_bond/rte_eth_bond_pmd.c delete mode 100644 lib/librte_pmd_bond/rte_eth_bond_private.h delete mode 100644 lib/librte_pmd_bond/rte_eth_bond_version.map diff --git a/doc/api/doxy-api.conf b/doc/api/doxy-api.conf index 50b0105..813edf1 100644 --- a/doc/api/doxy-api.conf +++ b/doc/api/doxy-api.conf @@ -49,7 +49,7 @@ INPUT = doc/api/doxy-api-index.md \ lib/librte_pipeline \ lib/librte_port \ lib/librte_power \ - lib/librte_pmd_bond \ + drivers/bonding \ lib/librte_reorder \ lib/librte_ring \ lib/librte_sched \ diff --git a/drivers/Makefile b/drivers/Makefile index 0ea99c5..40df712 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -32,13 +32,13 @@ include $(RTE_SDK)/mk/rte.vars.mk DIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += af_packet +DIRS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += bonding #DIRS-$(CONFIG_RTE_LIBRTE_E1000_PMD) += librte_pmd_e1000 #DIRS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += librte_pmd_ixgbe #DIRS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += librte_pmd_i40e #DIRS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += librte_pmd_fm10k #DIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += librte_pmd_mlx4 #DIRS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += librte_pmd_enic -#DIRS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += librte_pmd_bond #DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += librte_pmd_ring #DIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += librte_pmd_pcap #DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += librte_pmd_virtio diff --git a/drivers/bonding/Makefile b/drivers/bonding/Makefile new file mode 100644 index 000..83ccce3 --- /dev/null +++ b/drivers/bonding/Makefile @@ -0,0 +1,68 @@ +# BSD LICENSE +# +# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution a
[dpdk-dev] [PATCH 03/19] af_packet: move af_packet pmd to drivers directory
move af_packet pmd to drivers directory Signed-off-by: Bruce Richardson --- drivers/Makefile | 2 +- drivers/af_packet/Makefile | 64 ++ drivers/af_packet/rte_eth_af_packet.c | 847 + drivers/af_packet/rte_eth_af_packet.h | 53 ++ drivers/af_packet/rte_pmd_af_packet_version.map| 7 + lib/Makefile | 1 - lib/librte_eal/linuxapp/eal/Makefile | 2 +- lib/librte_pmd_af_packet/Makefile | 64 -- lib/librte_pmd_af_packet/rte_eth_af_packet.c | 847 - lib/librte_pmd_af_packet/rte_eth_af_packet.h | 53 -- .../rte_pmd_af_packet_version.map | 7 - 11 files changed, 973 insertions(+), 974 deletions(-) create mode 100644 drivers/af_packet/Makefile create mode 100644 drivers/af_packet/rte_eth_af_packet.c create mode 100644 drivers/af_packet/rte_eth_af_packet.h create mode 100644 drivers/af_packet/rte_pmd_af_packet_version.map delete mode 100644 lib/librte_pmd_af_packet/Makefile delete mode 100644 lib/librte_pmd_af_packet/rte_eth_af_packet.c delete mode 100644 lib/librte_pmd_af_packet/rte_eth_af_packet.h delete mode 100644 lib/librte_pmd_af_packet/rte_pmd_af_packet_version.map diff --git a/drivers/Makefile b/drivers/Makefile index cabda6b..0ea99c5 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -31,6 +31,7 @@ include $(RTE_SDK)/mk/rte.vars.mk +DIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += af_packet #DIRS-$(CONFIG_RTE_LIBRTE_E1000_PMD) += librte_pmd_e1000 #DIRS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += librte_pmd_ixgbe #DIRS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += librte_pmd_i40e @@ -40,7 +41,6 @@ include $(RTE_SDK)/mk/rte.vars.mk #DIRS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += librte_pmd_bond #DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += librte_pmd_ring #DIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += librte_pmd_pcap -#DIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += librte_pmd_af_packet #DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += librte_pmd_virtio #DIRS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += librte_pmd_vmxnet3 #DIRS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += librte_pmd_xenvirt diff --git a/drivers/af_packet/Makefile b/drivers/af_packet/Makefile new file mode 100644 index 000..f0bf537 --- /dev/null +++ b/drivers/af_packet/Makefile @@ -0,0 +1,64 @@ +# BSD LICENSE +# +# Copyright(c) 2014 John W. Linville +# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# Copyright(c) 2014 6WIND S.A. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +include $(RTE_SDK)/mk/rte.vars.mk + +# +# library name +# +LIB = librte_pmd_af_packet.a + +EXPORT_MAP := rte_pmd_af_packet_version.map + +LIBABIVER := 1 + +CFLAGS += -O3 +CFLAGS += $(WERROR_FLAGS) + +# +# all source are stored in SRCS-y +# +SRCS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += rte_eth_af_packet.c + +# +# Export include files +# +SYMLINK-y-include += rte_eth_af_packet.h + +# this lib depends upon: +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += lib/librte_mbuf +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += lib/librte_ether +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += lib/librte_malloc +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += lib/librte_kvargs + +include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/af_packet/rte_eth_af_packet.c b/drivers/af_packet/rte_eth_af_packet.c new file mode 100644 index 000..bdd9628 --- /dev/null +++
[dpdk-dev] [PATCH 02/19] drivers: create new top-level drivers directory
Add a new top-level drivers directory to which all PMDs will be moved for easier maintenance of both lib folder and drivers themselves. This new directory is a dependency of all the apps in the app folder, so the makefiles for each app are updated. Signed-off-by: Bruce Richardson --- GNUmakefile| 2 +- app/dump_cfg/Makefile | 2 +- app/test-acl/Makefile | 2 +- app/test-pipeline/Makefile | 2 +- app/test-pmd/Makefile | 2 +- app/test/Makefile | 2 +- drivers/Makefile | 50 ++ 7 files changed, 56 insertions(+), 6 deletions(-) create mode 100644 drivers/Makefile diff --git a/GNUmakefile b/GNUmakefile index d04c20b..b237b54 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -40,6 +40,6 @@ export RTE_SDK # directory list # -ROOTDIRS-y := lib app +ROOTDIRS-y := lib drivers app include $(RTE_SDK)/mk/rte.sdkroot.mk diff --git a/app/dump_cfg/Makefile b/app/dump_cfg/Makefile index 3257127..7799f36 100644 --- a/app/dump_cfg/Makefile +++ b/app/dump_cfg/Makefile @@ -40,6 +40,6 @@ CFLAGS += $(WERROR_FLAGS) SRCS-y := main.c # this application needs libraries first -DEPDIRS-y += lib +DEPDIRS-y += lib drivers include $(RTE_SDK)/mk/rte.app.mk diff --git a/app/test-acl/Makefile b/app/test-acl/Makefile index 43dfdcb..9cc0bc8 100644 --- a/app/test-acl/Makefile +++ b/app/test-acl/Makefile @@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS) SRCS-y := main.c # this application needs libraries first -DEPDIRS-y += lib +DEPDIRS-y += lib drivers include $(RTE_SDK)/mk/rte.app.mk diff --git a/app/test-pipeline/Makefile b/app/test-pipeline/Makefile index aa6df0c..33d6a75 100644 --- a/app/test-pipeline/Makefile +++ b/app/test-pipeline/Makefile @@ -57,7 +57,7 @@ SRCS-y += pipeline_lpm_ipv6.c SRCS-$(CONFIG_RTE_LIBRTE_ACL) += pipeline_acl.c # this application needs libraries first -DEPDIRS-y += lib +DEPDIRS-y += lib drivers include $(RTE_SDK)/mk/rte.app.mk diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile index dcf26f4..deae113 100644 --- a/app/test-pmd/Makefile +++ b/app/test-pmd/Makefile @@ -66,7 +66,7 @@ endif CFLAGS_cmdline.o := -D_GNU_SOURCE # this application needs libraries first -DEPDIRS-y += lib +DEPDIRS-y += lib drivers include $(RTE_SDK)/mk/rte.app.mk diff --git a/app/test/Makefile b/app/test/Makefile index 4aca77c..2d8f0ec 100644 --- a/app/test/Makefile +++ b/app/test/Makefile @@ -159,7 +159,7 @@ endif endif # this application needs libraries first -DEPDIRS-y += lib +DEPDIRS-y += lib drivers # Link against shared libraries when needed ifeq ($(CONFIG_RTE_LIBRTE_PMD_BOND),y) diff --git a/drivers/Makefile b/drivers/Makefile new file mode 100644 index 000..cabda6b --- /dev/null +++ b/drivers/Makefile @@ -0,0 +1,50 @@ +# BSD LICENSE +# +# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +include $(RTE_SDK)/mk/rte.vars.mk + +#DIRS-$(CONFIG_RTE_LIBRTE_E1000_PMD) += librte_pmd_e1000 +#DIRS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += librte_pmd_ixgbe +#DIRS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += librte_pmd_i40e +#DIRS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += librte_pmd_fm10k +#DIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += librte_pmd_mlx4 +#DIRS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += librte_pmd_enic +#DIRS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += librte_pmd_bond +#DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += librte_pmd_ring +#DIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += lib
[dpdk-dev] [PATCH 01/19] pmds: Use relative rather than absolute paths
In the Makefiles for the PMDs, the paths to the files are often specified using the full path from $(RTE_SDK) variable. These paths can be shortened, and make more flexible in case of a future path change by specifying the paths using $(SRCDIR) instead. Signed-off-by: Bruce Richardson --- lib/librte_pmd_e1000/Makefile | 4 ++-- lib/librte_pmd_enic/Makefile| 6 +++--- lib/librte_pmd_fm10k/Makefile | 4 ++-- lib/librte_pmd_i40e/Makefile| 4 ++-- lib/librte_pmd_ixgbe/Makefile | 4 ++-- lib/librte_pmd_vmxnet3/Makefile | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/librte_pmd_e1000/Makefile b/lib/librte_pmd_e1000/Makefile index 8c8fed8..158bc81 100644 --- a/lib/librte_pmd_e1000/Makefile +++ b/lib/librte_pmd_e1000/Makefile @@ -60,10 +60,10 @@ endif # Add extra flags for base driver files (also known as shared code) # to disable warnings in them # -BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(RTE_SDK)/lib/librte_pmd_e1000/e1000/*.c))) +BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/e1000/*.c))) $(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER))) -VPATH += $(RTE_SDK)/lib/librte_pmd_e1000/e1000 +VPATH += $(SRCDIR)/e1000 # # all source are stored in SRCS-y diff --git a/lib/librte_pmd_enic/Makefile b/lib/librte_pmd_enic/Makefile index 251a898..bfc0994 100644 --- a/lib/librte_pmd_enic/Makefile +++ b/lib/librte_pmd_enic/Makefile @@ -41,12 +41,12 @@ EXPORT_MAP := rte_pmd_enic_version.map LIBABIVER := 1 -CFLAGS += -I$(RTE_SDK)/lib/librte_pmd_enic/vnic/ -CFLAGS += -I$(RTE_SDK)/lib/librte_pmd_enic/ +CFLAGS += -I$(SRCDIR)/vnic/ +CFLAGS += -I$(SRCDIR) CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) -Wno-strict-aliasing -VPATH += $(RTE_SDK)/lib/librte_pmd_enic/src +VPATH += $(SRCDIR)/src # # all source are stored in SRCS-y diff --git a/lib/librte_pmd_fm10k/Makefile b/lib/librte_pmd_fm10k/Makefile index 7516d37..7395933 100644 --- a/lib/librte_pmd_fm10k/Makefile +++ b/lib/librte_pmd_fm10k/Makefile @@ -76,10 +76,10 @@ endif # # Add extra flags for base driver source files to disable warnings in them # -BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(RTE_SDK)/lib/librte_pmd_fm10k/base/*.c))) +BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c))) $(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER))) -VPATH += $(RTE_SDK)/lib/librte_pmd_fm10k/base +VPATH += $(SRCDIR)/base # # all source are stored in SRCS-y diff --git a/lib/librte_pmd_i40e/Makefile b/lib/librte_pmd_i40e/Makefile index 64bab16..050dd44 100644 --- a/lib/librte_pmd_i40e/Makefile +++ b/lib/librte_pmd_i40e/Makefile @@ -75,10 +75,10 @@ endif CFLAGS_i40e_lan_hmc.o += -Wno-error endif -OBJS_BASE_DRIVER=$(patsubst %.c,%.o,$(notdir $(wildcard $(RTE_SDK)/lib/librte_pmd_i40e/i40e/*.c))) +OBJS_BASE_DRIVER=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/i40e/*.c))) $(foreach obj, $(OBJS_BASE_DRIVER), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER))) -VPATH += $(RTE_SDK)/lib/librte_pmd_i40e/i40e +VPATH += $(SRCDIR)/i40e # # all source are stored in SRCS-y diff --git a/lib/librte_pmd_ixgbe/Makefile b/lib/librte_pmd_ixgbe/Makefile index fbf6966..e0f8916 100644 --- a/lib/librte_pmd_ixgbe/Makefile +++ b/lib/librte_pmd_ixgbe/Makefile @@ -82,10 +82,10 @@ endif # Add extra flags for base driver files (also known as shared code) # to disable warnings in them # -BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(RTE_SDK)/lib/librte_pmd_ixgbe/ixgbe/*.c))) +BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/ixgbe/*.c))) $(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER))) -VPATH += $(RTE_SDK)/lib/librte_pmd_ixgbe/ixgbe +VPATH += $(SRCDIR)/ixgbe # # all source are stored in SRCS-y diff --git a/lib/librte_pmd_vmxnet3/Makefile b/lib/librte_pmd_vmxnet3/Makefile index fc616c4..48177a3 100644 --- a/lib/librte_pmd_vmxnet3/Makefile +++ b/lib/librte_pmd_vmxnet3/Makefile @@ -64,7 +64,7 @@ CFLAGS_BASE_DRIVER += -Wno-strict-aliasing -Wno-format-extra-args endif -VPATH += $(RTE_SDK)/lib/librte_pmd_vmxnet3/vmxnet3 +VPATH += $(SRCDIR)/vmxnet3 EXPORT_MAP := rte_pmd_vmxnet3_version.map -- 2.1.0
[dpdk-dev] [PATCH 00/19] Move PMDs to drivers directory
As covered previously in an RFC, this patchset creates a new top-level drivers folder and moves the PMDs into it. Moving the drivers involves a lot of code - too big for a single patch, so each driver is moved separately in its own patchset. Some doc updates are done as part of this patchset - based on the results of git grep, but may be incomplete, so flag any doc areas that I may have missed, please. Bruce Richardson (19): pmds: Use relative rather than absolute paths drivers: create new top-level drivers directory af_packet: move af_packet pmd to drivers directory bond: Move bonded ethdev pmd to drivers e1000: move e1000 pmd to drivers directory enic: move enic PMD to drivers directory fm10k: move fm10k PMD to drivers directory i40e: move i40e PMD to drivers directory ixbge: move ixgbe PMD to drivers directory mlx4: move mlx4 PMD to drivers directory null pmd: move null PMD to drivers directory pcap: move pcap pmd to drivers directory ring pmd: move ring PMD to the drivers directory virtio: move virtio PMD to drivers directory xmvnet3: move vmxnet3 PMD to drivers directory xenvirt: move xenvirt PMD to drivers directory maintainers: update maintainers with driver paths doc: update GSG doc for new drivers subdirectory doc: update source organisation text for drivers GNUmakefile|2 +- MAINTAINERS| 28 +- app/dump_cfg/Makefile |2 +- app/test-acl/Makefile |2 +- app/test-pipeline/Makefile |2 +- app/test-pmd/Makefile |2 +- app/test/Makefile |2 +- doc/api/doxy-api.conf |2 +- doc/guides/linux_gsg/build_dpdk.rst|8 +- doc/guides/prog_guide/source_org.rst | 37 +- drivers/Makefile | 50 + drivers/af_packet/Makefile | 64 + drivers/af_packet/rte_eth_af_packet.c | 847 +++ drivers/af_packet/rte_eth_af_packet.h | 53 + drivers/af_packet/rte_pmd_af_packet_version.map|7 + drivers/bonding/Makefile | 68 + drivers/bonding/rte_eth_bond.h | 366 ++ drivers/bonding/rte_eth_bond_8023ad.c | 1216 + drivers/bonding/rte_eth_bond_8023ad.h | 222 + drivers/bonding/rte_eth_bond_8023ad_private.h | 308 ++ drivers/bonding/rte_eth_bond_alb.c | 287 + drivers/bonding/rte_eth_bond_alb.h | 142 + drivers/bonding/rte_eth_bond_api.c | 840 +++ drivers/bonding/rte_eth_bond_args.c| 278 + drivers/bonding/rte_eth_bond_pmd.c | 2269 drivers/bonding/rte_eth_bond_private.h | 287 + drivers/bonding/rte_eth_bond_version.map | 22 + drivers/e1000/Makefile | 99 + drivers/e1000/e1000/README | 39 + drivers/e1000/e1000/e1000_80003es2lan.c| 1514 ++ drivers/e1000/e1000/e1000_80003es2lan.h| 100 + drivers/e1000/e1000/e1000_82540.c | 717 +++ drivers/e1000/e1000/e1000_82541.c | 1268 + drivers/e1000/e1000/e1000_82541.h | 91 + drivers/e1000/e1000/e1000_82542.c | 588 ++ drivers/e1000/e1000/e1000_82543.c | 1553 ++ drivers/e1000/e1000/e1000_82543.h | 56 + drivers/e1000/e1000/e1000_82571.c | 2026 +++ drivers/e1000/e1000/e1000_82571.h | 65 + drivers/e1000/e1000/e1000_82575.c | 3639 + drivers/e1000/e1000/e1000_82575.h | 520 ++ drivers/e1000/e1000/e1000_api.c| 1357 + drivers/e1000/e1000/e1000_api.h| 167 + drivers/e1000/e1000/e1000_defines.h| 1498 + drivers/e1000/e1000/e1000_hw.h | 1026 drivers/e1000/e1000/e1000_i210.c | 1000 drivers/e1000/e1000/e1000_i210.h | 110 + drivers/e1000/e1000/e1000_ich8lan.c| 5260 ++ drivers/e1000/e1000/e1000_ich8lan.h| 313 ++ drivers/e1000/e1000/e1000_mac.c| 2247 drivers/e1000/e1000/e1000_mac.h| 95 + drivers/e1000/e1000/e1000_manage.c | 573 ++ drivers/e1000/e1000/e1000_manage.h | 95 + drivers/e1000/e1000/e1000_mbx.c| 777 +++ drivers/e1000/e1000/e1000_mbx.h| 105 + drivers/e1000/e1000/e1000_nvm.c| 1377 + drivers/e1000/e1000/e1000_nvm.h| 98 + drivers/e1000/e1000/e1000_osdep.c | 83 + drivers/e1000/e1000/
[dpdk-dev] [PATCH v7 1/2] Simplify the ifdefs in rte.app.mk
Hi Keith, On 05/12/2015 01:14 AM, Keith Wiles wrote: > Trying to simplify the ifdefs in rte.app.mk to make the code > more readable and maintainable by moving LDLIBS variable to use > the same style as LDLIBS-y being used in the rest of the code. > > Added a new variable called EXTRA_LDLIBS to be used by example apps > instead of using LDLIBS directly. The new internal variable _LDLIBS > should not be used outside of the rte.app.mk file. > > Signed-off-by: Keith Wiles Sorry to comment again :) I think it should be split differently, by topic/feature and not by location (mk vs doc) The first commit should only do what the title says, which is "simplify the makefile", and not add the EXTRA_LIBS variable. The second commit should add the EXTRA_LIBS + the associated doc. Few nits: - the commit log is right-shifted - the titles could be prefixed by "mk:" - don't forget the "--in-reply-to" :) Regards, Olivier
[dpdk-dev] Regarding rte_memzone_reserve with len =0
Hi Sergio, On 05/06/2015 06:10 PM, Gonzalez Monroy, Sergio wrote: > Hi, > > I was wondering about the use case of rte_memzone_reserve_ APIs with > len=0. > > From the docs (http://dpdk.org/doc/api/rte__memzone_8h.html): > len The size of the memory to be reserved. If it is 0, the > biggest contiguous zone will be reserved. > > What are the use cases? > When would you want a memzone of undetermined size? > > Any thoughts appreciated. As the application does not have access to the lengths of memory segments, probably the initial idea is when an application wants to allocate more memory that the biggest segment. Example, the application wants to allocate 1G (even fragmented): - the easy case is when it can be done in one call to rte_memzone_reserve(1G) - else, the application can iterate like in this sample: remain = 1 * 1024 * 1024 * 1024; while (remain > 0) { mz = rte_memzone_reserve(remain); if (mz != NULL) return 0; mz = rte_memzone_reserve(remain); if (mz == NULL) return -1; remain -= mz->len; } Regards, Olivier
[dpdk-dev] GitHub sandbox for the DPDK community
2015-05-07 03:37, Wiles, Keith: > On 5/6/15, 4:49 PM, "Wiles, Keith" wrote: > >On 5/6/15, 2:37 PM, "Marc Sune" wrote: > >>On 06/05/15 23:09, Thomas Monjalon wrote: > >>> Previously, there was a discussion about the contribution rules and > >>>tools: > >>> http://dpdk.org/ml/archives/dev/2015-March/015499.html > >>> Then a coding rules discussion was started: > >>> http://dpdk.org/ml/archives/dev/2015-April/016243.html > >>> And a more general thread brought some interesting opinions: > >>> http://dpdk.org/ml/archives/dev/2015-April/016551.html > >>> As a consequence, we are now discussing the workflow and especially > >>> how GitHub could help us. > > > >The emails above show one thing we can not make a decision on how to > >proceed. We have no method to decide on a topic, look at coding style we > >have yet to make any head way and it is unclear how we can decide on a > >path. We can not vote and we do not have a king of the repo to make those > >decisions, it just dies with out being resolved. No, coding rules and tools can be brought by patches. The general rule is to find a consensus. > >I was hoping the moving to Github would allow us to have multiple > >persons/companies equal access to the repos/web pages and other functions > >on a third party site. With this move we would put processes in place to > >start fixing these problems. I know we can do this now, but the move IMO > >was how we get it started. We should start now anyway. It's your vision. Saying it again and again won't make it the universal truth. We have to take care of everybody and choose the tools and workflow which are the more convenient for most of us. > >We are all over the world and it would be good to have a neutral worldwide > >site to give everyone a equal foothold into DPDK. I was hoping it would > >reduce some cost and time from 6Wind, but maybe it is consider just the > >cost of doing business for 6Wind. I don't understand what you're saying. dpdk.org is neutral and everybody is welcome. Changing the site owner won't change the need for an admin and some restricted permissions. > >>> Please note that the follow-up of some of these discussions may be done > >>> by submitting & reviewing patches (e.g. guidelines documents, > >>> tools integration, etc). > >>> Now let's talk about the workflow. > >>> > >>> When the dpdk.org project was started in 2013, it has been decided to > >>>adopt > >>> an email workflow. It is the most common model in projects which are > >>> technically close to DPDK: Linux, Qemu, GLIBC, GCC. So it is a promise > >>>to > >>> attract contributors from these projects. Moreover, the number of > >>>comments > >>> to this thread tends to prove that emails are not dead ;) > >>> See also the number of contributors of previous versions: > >>> 1.6: 25 (2014, April) > >>> 1.7: 46 (2014, September) > >>> 1.8: 54 (2014, December) > >>> 2.0: 60 (2015, April) > >>> > >>> Another choice was done about the number of mailing lists: most of the > >>>traffic > >>> is in only one list (dev@) in order to avoid separation between patches > >>>and > >>> discussions/reports leading to patches. It also allows user questions > >>>to be > >>> read by skilled developers. > >>> > >>> The portal to doc, git and mailing list is the website which is managed > >>>with > >>> git in order to open it when needed and mature enough. > >>> Please find web traffic evolution in the attached file. > >>> There is also a patchwork web interface to ease browsing patches > >>>submitted > >>> to the mailing list. It provides a view on patches status and agregate > >>> discussions on specific patches. Some improvements are in progress: > >>> http://permalink.gmane.org/gmane.comp.version-control.patchwork/1162 > >>> https://lists.ozlabs.org/pipermail/patchwork/2015-May/001310.html > > > >The patchwork site would not be required for Github as you can review and > >see all of the pull requests. Also the pull requested are quickly accessed > >to sort and manage the patches IMO better then patchwork. The feature is > >built into GitHub and we do not need to maintain that site or tool. The > >pull requests can also be placed into given states just like patchwork. > >The patchwork interface is clunky to me as it seems to be odd to manage > >patches, maybe they can fix the usability issues. The filter button is not > >very visible and when you need to change a set of patches you have to do a > >lot of clicks and back pages to change them all. Maybe I do not know how > >to use the site, but I do not think that is the problem IMO. The GitHub > >one works today without having to fix anything. > > > >>> There are 3 types of git repositories (http://dpdk.org/browse): > >>>- the main DPDK tree > >>>- subtrees, created on request or external, may help to scale by > >>>providing > >>> patches ready for merge in the main tree > >>>- side trees, created on request, e.g. dts or pktgen > > > >I like the idea of going to the Git
[dpdk-dev] [PATCH 2/2] cmdline: add polling mode for command line
Hi Pawel, On 05/12/2015 01:10 PM, Pawel Wodkowski wrote: > This patch adds the ability to process console input in the same thread > as packet processing by using poll() function. > > Signed-off-by: Pawel Wodkowski > [...] > --- a/lib/librte_cmdline/cmdline.h > +++ b/lib/librte_cmdline/cmdline.h > @@ -84,6 +84,7 @@ void cmdline_printf(const struct cmdline *cl, const char > *fmt, ...) > __attribute__((format(printf,2,3))); > int cmdline_in(struct cmdline *cl, const char *buf, int size); > int cmdline_write_char(struct rdline *rdl, char c); > +int cmdline_poll(struct cmdline *cl); > void cmdline_interact(struct cmdline *cl); > void cmdline_quit(struct cmdline *cl); > > diff --git a/lib/librte_cmdline/rte_cmdline_version.map > b/lib/librte_cmdline/rte_cmdline_version.map > index 6193462..df55def 100644 I know the rest of the file does not document the functions prototypes, but I think it could be helpful to add doxygen-style comments for new functions. > diff --git a/lib/librte_cmdline/rte_cmdline_version.map > b/lib/librte_cmdline/rte_cmdline_version.map > index 6193462..df55def 100644 > --- a/lib/librte_cmdline/rte_cmdline_version.map > +++ b/lib/librte_cmdline/rte_cmdline_version.map > @@ -40,6 +40,7 @@ DPDK_2.0 { > cmdline_parse_num; > cmdline_parse_portlist; > cmdline_parse_string; > + cmdline_poll; > cmdline_printf; > cmdline_quit; > cmdline_set_prompt; > I'm not sure the .map should be modified like this, instead I would have added a new DPDK_2.1 section, like I did for this commit (reviewed by Neil): http://dpdk.org/browse/dpdk/commit/?id=bbd778248985e542175e9b4ce560f2d379e78c4e By the way, the following link is a good documentation about the .map files: http://people.freebsd.org/~deischen/symver/freebsd_versioning.txt Regards, Olivier
[dpdk-dev] [PATCH v2] Implement memcmp using AVX/SSE instructions.
Hi, Ravi Kerur On 2015/5/9 5:19, Ravi Kerur wrote: > Preliminary results on Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz, Ubuntu > 14.04 x86_64 shows comparisons using AVX/SSE instructions taking 1/3rd > CPU ticks for 16, 32, 48 and 64 bytes comparison. In addition, I had write a program to test rte_memcmp and I have a question about the result. Why cost same CPU ticks for 128 256 512 1024 1500 bytes? Is there any problem in my test? [root at localhost test]# gcc avx_test.c -O3 -I /data/linhf/v2r2c00/open-source/dpdk/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/ -mavx2 -DRTE_MACHINE_CPUFLAG_AVX2 [root at localhost test]# ./a.out 0 each test run 1 times copy 16 bytes costs average 7(rte_memcmp) 10(memcmp) ticks copy 32 bytes costs average 9(rte_memcmp) 11(memcmp) ticks copy 64 bytes costs average 6(rte_memcmp) 13(memcmp) ticks copy 128 bytes costs average 11(rte_memcmp) 14(memcmp) ticks copy 256 bytes costs average 9(rte_memcmp) 14(memcmp) ticks copy 512 bytes costs average 9(rte_memcmp) 14(memcmp) ticks copy 1024 bytes costs average 9(rte_memcmp) 14(memcmp) ticks copy 1500 bytes costs average 11(rte_memcmp) 14(memcmp) ticks [root at localhost test]# ./a.out 1 each test run 1 times copy 16 bytes costs average 2(rte_memcpy) 10(memcpy) ticks copy 32 bytes costs average 2(rte_memcpy) 10(memcpy) ticks copy 64 bytes costs average 3(rte_memcpy) 10(memcpy) ticks copy 128 bytes costs average 7(rte_memcpy) 12(memcpy) ticks copy 256 bytes costs average 9(rte_memcpy) 23(memcpy) ticks copy 512 bytes costs average 14(rte_memcpy) 34(memcpy) ticks copy 1024 bytes costs average 37(rte_memcpy) 61(memcpy) ticks copy 1500 bytes costs average 62(rte_memcpy) 87(memcpy) ticks Here is my program: #include #include #include #include #include #define TIMES 1L void test_memcpy(size_t n) { uint64_t start, end, i, start2, end2; uint8_t *src, *dst; src = (uint8_t*)malloc(n * sizeof(uint8_t)); dst = (uint8_t*)malloc(n * sizeof(uint8_t)); start = rte_rdtsc(); for (i = 0; i < TIMES; i++) { rte_memcpy(dst, src, n); } end = rte_rdtsc(); start2 = rte_rdtsc(); for (i = 0; i < TIMES; i++) { memcpy(dst, src, n); } end2 = rte_rdtsc(); free(src); free(dst); printf("copy %u bytes costs average %llu(rte_memcpy) %llu(memcpy) ticks\n", n, (end - start)/TIMES, (end2 - start2)/TIMES); } int test_memcmp(size_t n) { uint64_t start, end, i, start2, end2, j; uint8_t *src, *dst; int *ret; src = (uint8_t*)malloc(n * sizeof(uint8_t)); dst = (uint8_t*)malloc(n * sizeof(uint8_t)); ret = (int*)malloc(TIMES * sizeof(int)); start = rte_rdtsc(); for (i = 0; i < TIMES; i++) { ret[i] = rte_memcmp(dst, src, n); } end = rte_rdtsc(); start2 = rte_rdtsc(); for (i = 0; i < TIMES; i++) { ret[i] = memcmp(dst, src, n); } end2 = rte_rdtsc(); // avoid gcc to optimize memcmp for (i = 0; i < TIMES; i++) { t += ret[i]; } free(src); free(dst); printf("copy %u bytes costs average %llu(rte_memcmp) %llu(memcmp) ticks\n", n, (end - start)/TIMES, (end2 - start2)/TIMES); return t; } int main(int narg, char** args) { printf("each test run %llu times\n", TIMES); if (narg < 2) { printf("usage:./avx_test 0/1 1:test memcpy 0:test memcmp\n"); return -1; } if (atoi(args[1])) { test_memcpy(16); test_memcpy(32); test_memcpy(64); test_memcpy(128); test_memcpy(256); test_memcpy(512); test_memcpy(1024); test_memcpy(1500); } else { test_memcmp(16); test_memcmp(32); test_memcmp(64); test_memcmp(128); test_memcmp(256); test_memcmp(512); test_memcmp(1024); test_memcmp(1500); } }
[dpdk-dev] [PATCH 0/2] cmdline: add polling mode for command line
Self NACK - misconfigured git - wrong email address :( I will resend this. > -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Pawel Wodkowski > Sent: Tuesday, May 12, 2015 1:10 PM > To: dev at dpdk.org > Subject: [dpdk-dev] [PATCH 0/2] cmdline: add polling mode for command line > > This patchset adds the ability to process console input in the same thread > as packet processing by using poll() function and fixes some minor issues. > > Pawel Wodkowski (2): > cmdline: fix missing include files > cmdline: add polling mode for command line > > lib/librte_cmdline/cmdline.c | 35 > ++ > lib/librte_cmdline/cmdline.h | 4 > lib/librte_cmdline/cmdline_rdline.h| 1 + > lib/librte_cmdline/cmdline_vt100.h | 2 ++ > lib/librte_cmdline/rte_cmdline_version.map | 1 + > 5 files changed, 43 insertions(+) > > -- > 1.9.1
[dpdk-dev] [PATCH v3 0/6] rte_sched: cleanups and API changes
Hi Stephen, 2015-05-11 10:07, Stephen Hemminger: > This is 3rd rev of DPDK changes to QoS scheduler. > The change from last revision was to fix the example and fix whitespace. > > Stephen Hemminger (6): > rte_sched: make RED optional at runtime > rte_sched: expand scheduler hierarchy for more VLAN's > rte_sched: keep track of RED drops > rte_sched: allow reading without clearing > rte_sched: don't put tabs in log messages > rte_sched: use correct log level You didn't include the acknowledgement from Cristian. I think it should be kept at least for patches which didn't change. And please try to add the v3 suffix to every patches of the series. Thanks
[dpdk-dev] [PATCH] Remove NO_AUTOLIBS option
2015-05-01 09:29, Keith Wiles: > NO_AUTOLIBS is not required as it was not used or defined in the config files. > > Signed-off-by: Keith Wiles > --- > mk/rte.app.mk | 5 - > 1 file changed, 5 deletions(-) Thanks Keith for trying to clean it, but removing half of an obsolete feature is not a real clean-up ;) When running "git grep NO_AUTOLIBS", it will return results in doc/guides/prog_guide I fixed the doc and manually applied your patch based on your _LDLIBS-y patch. Maybe I'm too kind, I know people who whould refuse this patch :) Sorry for being long here, but I want to show the work done when applying patches and I want to ask: is it a good thing to manually fix patches in order to speed-up the process or should it be more strict?
[dpdk-dev] [PATCH] l3fwd: make destination mac address configurable
> -Original Message- > From: Richardson, Bruce > Sent: Tuesday, May 12, 2015 2:16 PM > To: dev at dpdk.org > Cc: Chilikin, Andrey; Ananyev, Konstantin; Richardson, Bruce > Subject: [PATCH] l3fwd: make destination mac address configurable > > Add a command-line parameter to l3fwd, to allow the user to specify the > destination mac address for each ethernet port used. > > Signed-off-by: Andrey Chilikin > Signed-off-by: Bruce Richardson > --- > examples/l3fwd/main.c | 98 > +-- > 1 file changed, 64 insertions(+), 34 deletions(-) > > diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c > index e32512e..66f55f7 100644 > --- a/examples/l3fwd/main.c > +++ b/examples/l3fwd/main.c > @@ -72,6 +72,9 @@ > #include > #include > > +#include > +#include > + > #define APP_LOOKUP_EXACT_MATCH 0 > #define APP_LOOKUP_LPM 1 > #define DO_RFC_1812_CHECKS > @@ -159,6 +162,7 @@ static uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT; > static uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT; > > /* ethernet addresses of ports */ > +static uint64_t dest_eth_addr[RTE_MAX_ETHPORTS]; > static struct ether_addr ports_eth_addr[RTE_MAX_ETHPORTS]; > > static __m128i val_eth[RTE_MAX_ETHPORTS]; > @@ -738,7 +742,6 @@ simple_ipv4_fwd_4pkts(struct rte_mbuf* m[4], uint8_t > portid, struct lcore_conf * > { > struct ether_hdr *eth_hdr[4]; > struct ipv4_hdr *ipv4_hdr[4]; > - void *d_addr_bytes[4]; > uint8_t dst_port[4]; > int32_t ret[4]; > union ipv4_5tuple_host key[4]; > @@ -823,16 +826,6 @@ simple_ipv4_fwd_4pkts(struct rte_mbuf* m[4], uint8_t > portid, struct lcore_conf * > if (dst_port[3] >= RTE_MAX_ETHPORTS || (enabled_port_mask & 1 << > dst_port[3]) == 0) > dst_port[3] = portid; > > - /* 02:00:00:00:00:xx */ > - d_addr_bytes[0] = ð_hdr[0]->d_addr.addr_bytes[0]; > - d_addr_bytes[1] = ð_hdr[1]->d_addr.addr_bytes[0]; > - d_addr_bytes[2] = ð_hdr[2]->d_addr.addr_bytes[0]; > - d_addr_bytes[3] = ð_hdr[3]->d_addr.addr_bytes[0]; > - *((uint64_t *)d_addr_bytes[0]) = 0x0002 + > ((uint64_t)dst_port[0] << 40); > - *((uint64_t *)d_addr_bytes[1]) = 0x0002 + > ((uint64_t)dst_port[1] << 40); > - *((uint64_t *)d_addr_bytes[2]) = 0x0002 + > ((uint64_t)dst_port[2] << 40); > - *((uint64_t *)d_addr_bytes[3]) = 0x0002 + > ((uint64_t)dst_port[3] << 40); > - > #ifdef DO_RFC_1812_CHECKS > /* Update time to live and header checksum */ > --(ipv4_hdr[0]->time_to_live); > @@ -845,6 +838,12 @@ simple_ipv4_fwd_4pkts(struct rte_mbuf* m[4], uint8_t > portid, struct lcore_conf * > ++(ipv4_hdr[3]->hdr_checksum); > #endif > > + /* dst addr */ > + *(uint64_t *)ð_hdr[0]->d_addr = dest_eth_addr[dst_port[0]]; > + *(uint64_t *)ð_hdr[1]->d_addr = dest_eth_addr[dst_port[1]]; > + *(uint64_t *)ð_hdr[2]->d_addr = dest_eth_addr[dst_port[2]]; > + *(uint64_t *)ð_hdr[3]->d_addr = dest_eth_addr[dst_port[3]]; > + > /* src addr */ > ether_addr_copy(&ports_eth_addr[dst_port[0]], ð_hdr[0]->s_addr); > ether_addr_copy(&ports_eth_addr[dst_port[1]], ð_hdr[1]->s_addr); > @@ -880,7 +879,6 @@ simple_ipv6_fwd_4pkts(struct rte_mbuf* m[4], uint8_t > portid, struct lcore_conf * > { > struct ether_hdr *eth_hdr[4]; > __attribute__((unused)) struct ipv6_hdr *ipv6_hdr[4]; > - void *d_addr_bytes[4]; > uint8_t dst_port[4]; > int32_t ret[4]; > union ipv6_5tuple_host key[4]; > @@ -921,15 +919,11 @@ simple_ipv6_fwd_4pkts(struct rte_mbuf* m[4], uint8_t > portid, struct lcore_conf * > if (dst_port[3] >= RTE_MAX_ETHPORTS || (enabled_port_mask & 1 << > dst_port[3]) == 0) > dst_port[3] = portid; > > - /* 02:00:00:00:00:xx */ > - d_addr_bytes[0] = ð_hdr[0]->d_addr.addr_bytes[0]; > - d_addr_bytes[1] = ð_hdr[1]->d_addr.addr_bytes[0]; > - d_addr_bytes[2] = ð_hdr[2]->d_addr.addr_bytes[0]; > - d_addr_bytes[3] = ð_hdr[3]->d_addr.addr_bytes[0]; > - *((uint64_t *)d_addr_bytes[0]) = 0x0002 + > ((uint64_t)dst_port[0] << 40); > - *((uint64_t *)d_addr_bytes[1]) = 0x0002 + > ((uint64_t)dst_port[1] << 40); > - *((uint64_t *)d_addr_bytes[2]) = 0x0002 + > ((uint64_t)dst_port[2] << 40); > - *((uint64_t *)d_addr_bytes[3]) = 0x0002 + > ((uint64_t)dst_port[3] << 40); > + /* dst addr */ > + *(uint64_t *)ð_hdr[0]->d_addr = dest_eth_addr[dst_port[0]]; > + *(uint64_t *)ð_hdr[1]->d_addr = dest_eth_addr[dst_port[1]]; > + *(uint64_t *)ð_hdr[2]->d_addr = dest_eth_addr[dst_port[2]]; > + *(uint64_t *)ð_hdr[3]->d_addr = dest_eth_addr[dst_port[3]]; > > /* src addr */ > ether_addr_copy(&ports_eth_addr[dst_port[0]], ð_hdr[0]->s_addr); > @@ -950,7 +944,6 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid, > struct lcore_conf *qcon > { > struct ether_hdr *eth_hdr; > struct ipv4_hdr *ipv4_h
[dpdk-dev] [PATCH] scripts: fix relpath.sh output when build dir is a symlink
2015-05-05 11:14, Simon K?gstr?m: > On 2015-05-05 11:00, Olivier MATZ wrote: > > On 05/05/2015 11:00 AM, Olivier Matz wrote: > >> The script relpath.sh return the relative path of the first directory > >> from the second directory. It is used to generate relative symlinks, > >> which can be useful if the build directory is embedded in the dpdk > >> directory: the whole dpdk can be moved without breaking the links, > >> which is helpful for an installation. > >> > >> In case the build directory is a symlink, the script was not generating > >> the proper relative path. Fix this by calling "readlink -f" on the > >> arguments. > > > > Can you have a try with this patch? > > Yes, this fixes my build issue, thanks! > > Verified-by: Simon Kagstrom Applied, thanks
[dpdk-dev] [PATCH] l3fwd: make destination mac address configurable
Add a command-line parameter to l3fwd, to allow the user to specify the destination mac address for each ethernet port used. Signed-off-by: Andrey Chilikin Signed-off-by: Bruce Richardson --- examples/l3fwd/main.c | 98 +-- 1 file changed, 64 insertions(+), 34 deletions(-) diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index e32512e..66f55f7 100644 --- a/examples/l3fwd/main.c +++ b/examples/l3fwd/main.c @@ -72,6 +72,9 @@ #include #include +#include +#include + #define APP_LOOKUP_EXACT_MATCH 0 #define APP_LOOKUP_LPM 1 #define DO_RFC_1812_CHECKS @@ -159,6 +162,7 @@ static uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT; static uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT; /* ethernet addresses of ports */ +static uint64_t dest_eth_addr[RTE_MAX_ETHPORTS]; static struct ether_addr ports_eth_addr[RTE_MAX_ETHPORTS]; static __m128i val_eth[RTE_MAX_ETHPORTS]; @@ -738,7 +742,6 @@ simple_ipv4_fwd_4pkts(struct rte_mbuf* m[4], uint8_t portid, struct lcore_conf * { struct ether_hdr *eth_hdr[4]; struct ipv4_hdr *ipv4_hdr[4]; - void *d_addr_bytes[4]; uint8_t dst_port[4]; int32_t ret[4]; union ipv4_5tuple_host key[4]; @@ -823,16 +826,6 @@ simple_ipv4_fwd_4pkts(struct rte_mbuf* m[4], uint8_t portid, struct lcore_conf * if (dst_port[3] >= RTE_MAX_ETHPORTS || (enabled_port_mask & 1 << dst_port[3]) == 0) dst_port[3] = portid; - /* 02:00:00:00:00:xx */ - d_addr_bytes[0] = ð_hdr[0]->d_addr.addr_bytes[0]; - d_addr_bytes[1] = ð_hdr[1]->d_addr.addr_bytes[0]; - d_addr_bytes[2] = ð_hdr[2]->d_addr.addr_bytes[0]; - d_addr_bytes[3] = ð_hdr[3]->d_addr.addr_bytes[0]; - *((uint64_t *)d_addr_bytes[0]) = 0x0002 + ((uint64_t)dst_port[0] << 40); - *((uint64_t *)d_addr_bytes[1]) = 0x0002 + ((uint64_t)dst_port[1] << 40); - *((uint64_t *)d_addr_bytes[2]) = 0x0002 + ((uint64_t)dst_port[2] << 40); - *((uint64_t *)d_addr_bytes[3]) = 0x0002 + ((uint64_t)dst_port[3] << 40); - #ifdef DO_RFC_1812_CHECKS /* Update time to live and header checksum */ --(ipv4_hdr[0]->time_to_live); @@ -845,6 +838,12 @@ simple_ipv4_fwd_4pkts(struct rte_mbuf* m[4], uint8_t portid, struct lcore_conf * ++(ipv4_hdr[3]->hdr_checksum); #endif + /* dst addr */ + *(uint64_t *)ð_hdr[0]->d_addr = dest_eth_addr[dst_port[0]]; + *(uint64_t *)ð_hdr[1]->d_addr = dest_eth_addr[dst_port[1]]; + *(uint64_t *)ð_hdr[2]->d_addr = dest_eth_addr[dst_port[2]]; + *(uint64_t *)ð_hdr[3]->d_addr = dest_eth_addr[dst_port[3]]; + /* src addr */ ether_addr_copy(&ports_eth_addr[dst_port[0]], ð_hdr[0]->s_addr); ether_addr_copy(&ports_eth_addr[dst_port[1]], ð_hdr[1]->s_addr); @@ -880,7 +879,6 @@ simple_ipv6_fwd_4pkts(struct rte_mbuf* m[4], uint8_t portid, struct lcore_conf * { struct ether_hdr *eth_hdr[4]; __attribute__((unused)) struct ipv6_hdr *ipv6_hdr[4]; - void *d_addr_bytes[4]; uint8_t dst_port[4]; int32_t ret[4]; union ipv6_5tuple_host key[4]; @@ -921,15 +919,11 @@ simple_ipv6_fwd_4pkts(struct rte_mbuf* m[4], uint8_t portid, struct lcore_conf * if (dst_port[3] >= RTE_MAX_ETHPORTS || (enabled_port_mask & 1 << dst_port[3]) == 0) dst_port[3] = portid; - /* 02:00:00:00:00:xx */ - d_addr_bytes[0] = ð_hdr[0]->d_addr.addr_bytes[0]; - d_addr_bytes[1] = ð_hdr[1]->d_addr.addr_bytes[0]; - d_addr_bytes[2] = ð_hdr[2]->d_addr.addr_bytes[0]; - d_addr_bytes[3] = ð_hdr[3]->d_addr.addr_bytes[0]; - *((uint64_t *)d_addr_bytes[0]) = 0x0002 + ((uint64_t)dst_port[0] << 40); - *((uint64_t *)d_addr_bytes[1]) = 0x0002 + ((uint64_t)dst_port[1] << 40); - *((uint64_t *)d_addr_bytes[2]) = 0x0002 + ((uint64_t)dst_port[2] << 40); - *((uint64_t *)d_addr_bytes[3]) = 0x0002 + ((uint64_t)dst_port[3] << 40); + /* dst addr */ + *(uint64_t *)ð_hdr[0]->d_addr = dest_eth_addr[dst_port[0]]; + *(uint64_t *)ð_hdr[1]->d_addr = dest_eth_addr[dst_port[1]]; + *(uint64_t *)ð_hdr[2]->d_addr = dest_eth_addr[dst_port[2]]; + *(uint64_t *)ð_hdr[3]->d_addr = dest_eth_addr[dst_port[3]]; /* src addr */ ether_addr_copy(&ports_eth_addr[dst_port[0]], ð_hdr[0]->s_addr); @@ -950,7 +944,6 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid, struct lcore_conf *qcon { struct ether_hdr *eth_hdr; struct ipv4_hdr *ipv4_hdr; - void *d_addr_bytes; uint8_t dst_port; eth_hdr = rte_pktmbuf_mtod(m, struct ether_hdr *); @@ -974,16 +967,13 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid, struct lcore_conf *qcon (enabled_port_mask & 1 << dst_port) == 0) dst_port = portid; - /* 02:00:00:00:00:xx */ -
[dpdk-dev] [PATCH v8 2/2] mk:Update Docs for new EXTRA_LDLIBS variable
Signed-off-by: Keith Wiles --- doc/build-sdk-quick.txt | 1 + doc/guides/prog_guide/dev_kit_build_system.rst | 2 ++ doc/guides/prog_guide/dev_kit_root_make_help.rst | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/build-sdk-quick.txt b/doc/build-sdk-quick.txt index 041a40e..26d5442 100644 --- a/doc/build-sdk-quick.txt +++ b/doc/build-sdk-quick.txt @@ -13,6 +13,7 @@ Build variables EXTRA_CPPFLAGS preprocessor options EXTRA_CFLAGS compiler options EXTRA_LDFLAGSlinker options + EXTRA_LDLIBS linker libary options RTE_KERNELDIRlinux headers path CROSS toolchain prefix V verbose diff --git a/doc/guides/prog_guide/dev_kit_build_system.rst b/doc/guides/prog_guide/dev_kit_build_system.rst index 5bfef58..50bfe34 100644 --- a/doc/guides/prog_guide/dev_kit_build_system.rst +++ b/doc/guides/prog_guide/dev_kit_build_system.rst @@ -413,6 +413,8 @@ Variables that Can be Set/Overridden by the User in a Makefile or Command Line * EXTRA_LDFLAGS: The content of this variable is appended after LDFLAGS when linking. +* EXTRA_LDLIBS: The content of this variable is appended after LDLIBS when linking. + * EXTRA_ASFLAGS: The content of this variable is appended after ASFLAGS when assembling. * EXTRA_CPPFLAGS: The content of this variable is appended after CPPFLAGS when using a C preprocessor on assembly files. diff --git a/doc/guides/prog_guide/dev_kit_root_make_help.rst b/doc/guides/prog_guide/dev_kit_root_make_help.rst index 333b007..e522c12 100644 --- a/doc/guides/prog_guide/dev_kit_root_make_help.rst +++ b/doc/guides/prog_guide/dev_kit_root_make_help.rst @@ -218,7 +218,7 @@ The following variables can be specified on the command line: Enable dependency debugging. This provides some useful information about why a target is built or not. -* EXTRA_CFLAGS=, EXTRA_LDFLAGS=, EXTRA_ASFLAGS=, EXTRA_CPPFLAGS= +* EXTRA_CFLAGS=, EXTRA_LDFLAGS=, EXTRA_LDLIBS=, EXTRA_ASFLAGS=, EXTRA_CPPFLAGS= Append specific compilation, link or asm flags. -- 2.3.0
[dpdk-dev] [PATCH v8 1/2] mk:Simplify the ifdefs in rte.app.mk
Simplify the ifdefs in rte.app.mk to make the code more readable and maintainable by moving LDLIBS variable to use the same style as LDLIBS-y being used in the rest of the code. The new internal variable _LDLIBS should not be used outside of the rte.app.mk file. Signed-off-by: Keith Wiles --- mk/rte.app.mk | 242 +++--- 1 file changed, 60 insertions(+), 182 deletions(-) diff --git a/mk/rte.app.mk b/mk/rte.app.mk index 62a76ae..b8030d2 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -1,7 +1,7 @@ # BSD LICENSE # -# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. -# Copyright(c) 2014 6WIND S.A. +# Copyright(c) 2010-2015 Intel Corporation. All rights reserved. +# Copyright(c) 2014-2015 6WIND S.A. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -51,7 +51,7 @@ LDSCRIPT = $(RTE_LDSCRIPT) endif # default path for libs -LDLIBS += -L$(RTE_SDK_BIN)/lib +_LDLIBS-y += -L$(RTE_SDK_BIN)/lib # # Include libraries depending on config if NO_AUTOLIBS is not set @@ -59,215 +59,93 @@ LDLIBS += -L$(RTE_SDK_BIN)/lib # ifeq ($(NO_AUTOLIBS),) -LDLIBS += --whole-archive +_LDLIBS-y += --whole-archive -ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),y) -LDLIBS += -l$(RTE_LIBNAME) -endif +_LDLIBS-$(CONFIG_RTE_BUILD_COMBINE_LIBS)+= -l$(RTE_LIBNAME) ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),n) -ifeq ($(CONFIG_RTE_LIBRTE_DISTRIBUTOR),y) -LDLIBS += -lrte_distributor -endif - -ifeq ($(CONFIG_RTE_LIBRTE_REORDER),y) -LDLIBS += -lrte_reorder -endif +_LDLIBS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR)+= -lrte_distributor +_LDLIBS-$(CONFIG_RTE_LIBRTE_REORDER)+= -lrte_reorder -ifeq ($(CONFIG_RTE_LIBRTE_KNI),y) ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y) -LDLIBS += -lrte_kni -endif +_LDLIBS-$(CONFIG_RTE_LIBRTE_KNI)+= -lrte_kni +_LDLIBS-$(CONFIG_RTE_LIBRTE_IVSHMEM)+= -lrte_ivshmem endif -ifeq ($(CONFIG_RTE_LIBRTE_IVSHMEM),y) -ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y) -LDLIBS += -lrte_ivshmem -endif -endif +_LDLIBS-$(CONFIG_RTE_LIBRTE_PIPELINE) += -lrte_pipeline +_LDLIBS-$(CONFIG_RTE_LIBRTE_TABLE) += -lrte_table +_LDLIBS-$(CONFIG_RTE_LIBRTE_PORT) += -lrte_port +_LDLIBS-$(CONFIG_RTE_LIBRTE_TIMER) += -lrte_timer +_LDLIBS-$(CONFIG_RTE_LIBRTE_HASH) += -lrte_hash +_LDLIBS-$(CONFIG_RTE_LIBRTE_JOBSTATS) += -lrte_jobstats +_LDLIBS-$(CONFIG_RTE_LIBRTE_LPM)+= -lrte_lpm +_LDLIBS-$(CONFIG_RTE_LIBRTE_POWER) += -lrte_power +_LDLIBS-$(CONFIG_RTE_LIBRTE_ACL)+= -lrte_acl +_LDLIBS-$(CONFIG_RTE_LIBRTE_METER) += -lrte_meter -ifeq ($(CONFIG_RTE_LIBRTE_PIPELINE),y) -LDLIBS += -lrte_pipeline -endif +_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lrte_sched +_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lm +_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lrt -ifeq ($(CONFIG_RTE_LIBRTE_TABLE),y) -LDLIBS += -lrte_table -endif - -ifeq ($(CONFIG_RTE_LIBRTE_PORT),y) -LDLIBS += -lrte_port -endif - -ifeq ($(CONFIG_RTE_LIBRTE_TIMER),y) -LDLIBS += -lrte_timer -endif - -ifeq ($(CONFIG_RTE_LIBRTE_HASH),y) -LDLIBS += -lrte_hash -endif - -ifeq ($(CONFIG_RTE_LIBRTE_JOBSTATS),y) -LDLIBS += -lrte_jobstats -endif - -ifeq ($(CONFIG_RTE_LIBRTE_LPM),y) -LDLIBS += -lrte_lpm -endif - -ifeq ($(CONFIG_RTE_LIBRTE_POWER),y) -LDLIBS += -lrte_power -endif - -ifeq ($(CONFIG_RTE_LIBRTE_ACL),y) -LDLIBS += -lrte_acl -endif - -ifeq ($(CONFIG_RTE_LIBRTE_METER),y) -LDLIBS += -lrte_meter -endif - -ifeq ($(CONFIG_RTE_LIBRTE_SCHED),y) -LDLIBS += -lrte_sched -LDLIBS += -lm -LDLIBS += -lrt -endif - -ifeq ($(CONFIG_RTE_LIBRTE_VHOST), y) -LDLIBS += -lrte_vhost -endif +_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lrte_vhost endif # ! CONFIG_RTE_BUILD_COMBINE_LIBS -ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y) -LDLIBS += -lpcap -endif +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += -lpcap -ifeq ($(CONFIG_RTE_LIBRTE_VHOST)$(CONFIG_RTE_LIBRTE_VHOST_USER),yn) -LDLIBS += -lfuse +ifeq ($(CONFIG_RTE_LIBRTE_VHOST_USER),n) +_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lfuse endif -ifeq ($(CONFIG_RTE_LIBRTE_MLX4_PMD),y) -LDLIBS += -libverbs -endif +_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += -libverbs -LDLIBS += --start-group +_LDLIBS-y += --start-group ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),n) -ifeq ($(CONFIG_RTE_LIBRTE_KVARGS),y) -LDLIBS += -lrte_kvargs -endif - -ifeq ($(CONFIG_RTE_LIBRTE_MBUF),y) -LDLIBS += -lrte_mbuf -endif - -ifeq ($(CONFIG_RTE_LIBRTE_IP_FRAG),y) -LDLIBS += -lrte_ip_frag -endif - -ifeq ($(CONFIG_RTE_LIBRTE_ETHER),y) -LDLIBS += -lethdev -endif - -ifeq ($(CONFIG_RTE_LIBRTE_MALLOC),y) -LDLIBS += -lrte_malloc -endif - -ifeq ($(CONFIG_RTE_LIBRTE_MEMPOOL),y) -LDLIBS += -lrte_mempool -endif - -ifeq ($(CONFIG_RTE_LIBRTE_RING),y) -LDLIBS += -lrte_ring -endif - -ifeq ($(CONFIG_RTE_LIBRTE_EAL),y) -LDLIBS += -lrte_eal -endif - -ifeq ($(CONFIG_RTE_LIBRTE_CMDLINE),y) -LDLIBS += -lrte_cmdline -endif - -ifeq ($(CONFIG_RTE_LIBRTE_CFGFILE),y) -LDLIB
[dpdk-dev] Query: Netperf with DPDK
Hi I'm using netperf to check the performance and throughput of the DPDK application that I'd developed. For testing the above I need to run netperf on the DPDK bound interface. But I'm not able to find the correct option for running the netperf on the DPDK bound interface as the interface is no longer in kernel mode (it doesnt have an IP address) Can you let me know which option I can use/any alternative available for running netperf on the DPDK interface (specifying the MAC address of the DPDK interface). Regards Shankari.V
[dpdk-dev] ixgbevf TX hang
Hello, We're using dpdk with with the ixgbevf driver on an AWS (Xen hypervisor) instance. We use the NIC to drive jumbo packets at high throughput. Occasionally, the vf experiences a non-recoverable TX hang. Specifically, all descriptors in the TX queue are used up - and remain in this state. All descriptors' writeback status don't have the IXGBE_TXD_STAT_DD set. After resetting the port, TX no longer hangs. We're using the suggested TX conf for the 82599: static struct rte_eth_txconf tx_conf = { .tx_thresh = { .pthresh = 36, /* Ring prefetch threshold */ .hthresh = 0, /* Ring host threshold */ .wthresh = 0, /* Ring writeback threshold */ }, .tx_free_thresh = 0,/* Use PMD default values */ .tx_rs_thresh = 0,/* Use PMD default values */ }; Any ideas? Thanks, Yotam
[dpdk-dev] [PATCH 2/2] cmdline: add polling mode for command line
This patch adds the ability to process console input in the same thread as packet processing by using poll() function. Signed-off-by: Pawel Wodkowski --- lib/librte_cmdline/cmdline.c | 35 ++ lib/librte_cmdline/cmdline.h | 1 + lib/librte_cmdline/rte_cmdline_version.map | 1 + 3 files changed, 37 insertions(+) diff --git a/lib/librte_cmdline/cmdline.c b/lib/librte_cmdline/cmdline.c index e61c4f2..6a55f1f 100644 --- a/lib/librte_cmdline/cmdline.c +++ b/lib/librte_cmdline/cmdline.c @@ -65,6 +65,7 @@ #include #include #include +#include #include #include #include @@ -246,6 +247,40 @@ cmdline_quit(struct cmdline *cl) rdline_quit(&cl->rdl); } +int +cmdline_poll(struct cmdline *cl) +{ + struct pollfd pfd; + int status; + ssize_t read_status; + char c; + + if (!cl) + return -EINVAL; + else if (cl->rdl.status == RDLINE_EXITED) + return RDLINE_EXITED; + + pfd.fd = cl->s_in; + pfd.events = POLLIN; + pfd.revents = 0; + + status = poll(&pfd, 1, 0); + if (status < 0) + return status; + else if (status > 0) { + c = -1; + read_status = read(cl->s_in, &c, 1); + if (read_status < 0) + return read_status; + + status = cmdline_in(cl, &c, 1); + if (status < 0 && cl->rdl.status != RDLINE_EXITED) + return status; + } + + return cl->rdl.status; +} + void cmdline_interact(struct cmdline *cl) { diff --git a/lib/librte_cmdline/cmdline.h b/lib/librte_cmdline/cmdline.h index 9085ff6..39e8e6b 100644 --- a/lib/librte_cmdline/cmdline.h +++ b/lib/librte_cmdline/cmdline.h @@ -84,6 +84,7 @@ void cmdline_printf(const struct cmdline *cl, const char *fmt, ...) __attribute__((format(printf,2,3))); int cmdline_in(struct cmdline *cl, const char *buf, int size); int cmdline_write_char(struct rdline *rdl, char c); +int cmdline_poll(struct cmdline *cl); void cmdline_interact(struct cmdline *cl); void cmdline_quit(struct cmdline *cl); diff --git a/lib/librte_cmdline/rte_cmdline_version.map b/lib/librte_cmdline/rte_cmdline_version.map index 6193462..df55def 100644 --- a/lib/librte_cmdline/rte_cmdline_version.map +++ b/lib/librte_cmdline/rte_cmdline_version.map @@ -40,6 +40,7 @@ DPDK_2.0 { cmdline_parse_num; cmdline_parse_portlist; cmdline_parse_string; + cmdline_poll; cmdline_printf; cmdline_quit; cmdline_set_prompt; -- 1.9.1
[dpdk-dev] [PATCH 1/2] cmdline: fix missing include files
When including only some of library headers some definitions are missing and build fails. Signed-off-by: Pawel Wodkowski --- lib/librte_cmdline/cmdline.h| 3 +++ lib/librte_cmdline/cmdline_rdline.h | 1 + lib/librte_cmdline/cmdline_vt100.h | 2 ++ 3 files changed, 6 insertions(+) diff --git a/lib/librte_cmdline/cmdline.h b/lib/librte_cmdline/cmdline.h index 06ae086..9085ff6 100644 --- a/lib/librte_cmdline/cmdline.h +++ b/lib/librte_cmdline/cmdline.h @@ -61,6 +61,9 @@ #ifndef _CMDLINE_H_ #define _CMDLINE_H_ +#include +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/lib/librte_cmdline/cmdline_rdline.h b/lib/librte_cmdline/cmdline_rdline.h index ae6e24e..b9aad9b 100644 --- a/lib/librte_cmdline/cmdline_rdline.h +++ b/lib/librte_cmdline/cmdline_rdline.h @@ -84,6 +84,7 @@ * instance. */ +#include #include #include diff --git a/lib/librte_cmdline/cmdline_vt100.h b/lib/librte_cmdline/cmdline_vt100.h index b9840f6..963add8 100644 --- a/lib/librte_cmdline/cmdline_vt100.h +++ b/lib/librte_cmdline/cmdline_vt100.h @@ -61,6 +61,8 @@ #ifndef _CMDLINE_VT100_H_ #define _CMDLINE_VT100_H_ +#include + #ifdef __cplusplus extern "C" { #endif -- 1.9.1
[dpdk-dev] [PATCH 0/2] cmdline: add polling mode for command line
This patchset adds the ability to process console input in the same thread as packet processing by using poll() function and fixes some minor issues. Pawel Wodkowski (2): cmdline: fix missing include files cmdline: add polling mode for command line lib/librte_cmdline/cmdline.c | 35 ++ lib/librte_cmdline/cmdline.h | 4 lib/librte_cmdline/cmdline_rdline.h| 1 + lib/librte_cmdline/cmdline_vt100.h | 2 ++ lib/librte_cmdline/rte_cmdline_version.map | 1 + 5 files changed, 43 insertions(+) -- 1.9.1
[dpdk-dev] [PATCH] PCAP PMD fix: pcap_rx_queue/pcap_tx_queue should store it's own copy of name/type values
> > pcap_rx_queue/pcap_tx_queue should store it's own copy of name/type > > values, not the pointer to temporary allocated space. > > > > Signed-off-by: Konstantin Ananyev > > Acked-by: John Mcnamara Applied, thanks Please note the new name for this commit: pcap: fix storage of name and type in queues It begins with the lowercase name of the PMD, then a verb in imperative form and a short summary. The verb should be "fix" in case of fixes. Ideally, the bug (and its consequences) should be explained below. https://github.com/erlang/otp/wiki/Writing-good-commit-messages
[dpdk-dev] [PATCH v4 6/6] hash: rename rte_jhash2 to rte_jhash_32b
Changed name to something more meaningful, and mark rte_jhash2 as deprecated. Signed-off-by: Pablo de Lara --- app/test/test_func_reentrancy.c |2 +- app/test/test_hash.c|4 ++-- lib/librte_hash/rte_jhash.h | 17 +++-- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/app/test/test_func_reentrancy.c b/app/test/test_func_reentrancy.c index dc070af..85504c0 100644 --- a/app/test/test_func_reentrancy.c +++ b/app/test/test_func_reentrancy.c @@ -228,7 +228,7 @@ hash_create_free(__attribute__((unused)) void *arg) .entries = 16, .bucket_entries = 4, .key_len = 4, - .hash_func = (rte_hash_function)rte_jhash2, + .hash_func = (rte_hash_function)rte_jhash_32b, .hash_func_init_val = 0, .socket_id = 0, }; diff --git a/app/test/test_hash.c b/app/test/test_hash.c index 1da27c5..4ecb11b 100644 --- a/app/test/test_hash.c +++ b/app/test/test_hash.c @@ -1177,7 +1177,7 @@ test_hash_add_delete_jhash2(void) hash_params_ex.name = "hash_test_jhash2"; hash_params_ex.key_len = 4; - hash_params_ex.hash_func = (rte_hash_function)rte_jhash2; + hash_params_ex.hash_func = (rte_hash_function)rte_jhash_32b; handle = rte_hash_create(&hash_params_ex); if (handle == NULL) { @@ -1216,7 +1216,7 @@ test_hash_add_delete_2_jhash2(void) hash_params_ex.name = "hash_test_2_jhash2"; hash_params_ex.key_len = 8; - hash_params_ex.hash_func = (rte_hash_function)rte_jhash2; + hash_params_ex.hash_func = (rte_hash_function)rte_jhash_32b; handle = rte_hash_create(&hash_params_ex); if (handle == NULL) diff --git a/lib/librte_hash/rte_jhash.h b/lib/librte_hash/rte_jhash.h index aa5bb2d..01b1795 100644 --- a/lib/librte_hash/rte_jhash.h +++ b/lib/librte_hash/rte_jhash.h @@ -46,6 +46,8 @@ extern "C" { #include #include + +#include #include /* jhash.h: Jenkins hash support. @@ -278,7 +280,7 @@ rte_jhash_2hashes(const void *key, uint32_t length, uint32_t *pc, uint32_t *pb) * IN: second seed OUT: secondary hash value. */ static inline void -rte_jhash2_2hashes(const uint32_t *k, uint32_t length, uint32_t *pc, uint32_t *pb) +rte_jhash_32b_2hashes(const uint32_t *k, uint32_t length, uint32_t *pc, uint32_t *pb) { __rte_jhash_2hashes((const void *) k, (length << 2), pc, pb, 0); } @@ -321,11 +323,22 @@ rte_jhash(const void *key, uint32_t length, uint32_t initval) * Calculated hash value. */ static inline uint32_t +rte_jhash_32b(const uint32_t *k, uint32_t length, uint32_t initval) +{ + uint32_t initval2 = 0; + + rte_jhash_32b_2hashes(k, length, &initval, &initval2); + + return initval; +} + +static inline uint32_t rte_jhash2(const uint32_t *k, uint32_t length, uint32_t initval) { uint32_t initval2 = 0; - rte_jhash2_2hashes(k, length, &initval, &initval2); + RTE_LOG(WARNING, HASH, "rte_jhash2 is deprecated\n"); + rte_jhash_32b_2hashes(k, length, &initval, &initval2); return initval; } -- 1.7.4.1
[dpdk-dev] [PATCH v4 5/6] hash: remove duplicated code
rte_jhash is basically like _rte_jhash_2hashes but it returns only 1 hash, instead of 2. In order to remove duplicated code, rte_jhash calls _rte_jhash_2hashes, passing 0 as the second seed and returning just the first hash value. (performance penalty is negligible) The same is done with rte_jhash2. Also, rte_jhash2 is just an specific case where keys are multiple of 32 bits, and where no key alignment check is required. So,to avoid duplicated code, the function calls _rte_jhash_2hashes with check_align = 0 (to use the optimal path) Signed-off-by: Pablo de Lara --- lib/librte_hash/rte_jhash.h | 293 +-- 1 files changed, 60 insertions(+), 233 deletions(-) diff --git a/lib/librte_hash/rte_jhash.h b/lib/librte_hash/rte_jhash.h index f1c0a8a..aa5bb2d 100644 --- a/lib/librte_hash/rte_jhash.h +++ b/lib/librte_hash/rte_jhash.h @@ -102,29 +102,19 @@ extern "C" { #define LOWER16b_MASK rte_le_to_cpu_32(0x) #define LOWER24b_MASK rte_le_to_cpu_32(0xff) -/** - * The most generic version, hashes an arbitrary sequence - * of bytes. No alignment or length assumptions are made about - * the input key. - * - * @param key - * Key to calculate hash of. - * @param length - * Length of key in bytes. - * @param initval - * Initialising value of hash. - * @return - * Calculated hash value. - */ -static inline uint32_t -rte_jhash(const void *key, uint32_t length, uint32_t initval) +static inline void +__rte_jhash_2hashes(const void *key, uint32_t length, uint32_t *pc, uint32_t *pb, unsigned check_align) { uint32_t a, b, c; /* Set up the internal state */ - a = b = c = RTE_JHASH_GOLDEN_RATIO + ((uint32_t)length) + initval; + a = b = c = RTE_JHASH_GOLDEN_RATIO + ((uint32_t)length) + *pc; + c += *pb; - /* Check key alignment. For x86 architecture, first case is always optimal */ + /* +* Check key alignment. For x86 architecture, first case is always optimal +* If check_align is not set, first case will be used +*/ #if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) || defined(RTE_ARCH_X86_X32) const uint32_t *k = key; const uint32_t s = 0; @@ -132,8 +122,7 @@ rte_jhash(const void *key, uint32_t length, uint32_t initval) const uint32_t *k = (uint32_t *)(uintptr_t)key & (uintptr_t)~3); const uint32_t s = ((uintptr_t)key & 3) * CHAR_BIT; #endif - - if (s == 0) { + if (!check_align || s == 0) { while (length > 12) { a += k[0]; b += k[1]; @@ -172,7 +161,9 @@ rte_jhash(const void *key, uint32_t length, uint32_t initval) a += k[0] & LOWER8b_MASK; break; /* zero length strings require no mixing */ case 0: - return c; + *pc = c; + *pb = b; + return; }; } else { /* all but the last block: affect some 32 bits of (a, b, c) */ @@ -238,63 +229,16 @@ rte_jhash(const void *key, uint32_t length, uint32_t initval) break; /* zero length strings require no mixing */ case 0: - return c; + *pc = c; + *pb = b; + return; } } __rte_jhash_final(a, b, c); - return c; -} - -/** - * A special optimized version that handles 1 or more of uint32_ts. - * The length parameter here is the number of uint32_ts in the key. - * - * @param k - * Key to calculate hash of. - * @param length - * Length of key in units of 4 bytes. - * @param initval - * Initialising value of hash. - * @return - * Calculated hash value. - */ -static inline uint32_t -rte_jhash2(const uint32_t *k, uint32_t length, uint32_t initval) -{ - uint32_t a, b, c; - - /* Set up the internal state */ - a = b = c = RTE_JHASH_GOLDEN_RATIO + (((uint32_t)length) << 2) + initval; - - /* Handle most of the key */ - while (length > 3) { - a += k[0]; - b += k[1]; - c += k[2]; - - __rte_jhash_mix(a, b, c); - - k += 3; - length -= 3; - } - - /* Handle the last 3 uint32_t's */ - switch (length) { - case 3: - c += k[2]; - case 2: - b += k[1]; - case 1: - a += k[0]; - __rte_jhash_final(a, b, c); - /* case 0: nothing left to add */ - case 0: - break; - }; - - return c; + *pc = c; + *pb = b; } /** @@ -315,138 +259,7 @@ rte_jhash2(const uint32_t *k, uint32_t length, uint32_t initval) static inline void rte_jhash_2hashes(const void *key, uint32_t length, uint32_t *pc, uint32_t *pb) { - uint32_t a, b, c; - - /* Set up the intern
[dpdk-dev] [PATCH v4 4/6] hash: add two new functions to jhash library
With the jhash update, two new functions were introduced: - rte_jhash_2hashes: Same as rte_jhash, but takes two seeds and return two hashes (uint32_ts) - rte_jhash2_2hashes: Same as rte_jhash2, but takes two seeds and return two hashes (uint32_ts) Signed-off-by: Pablo de Lara --- lib/librte_hash/rte_jhash.h | 206 +++ 1 files changed, 206 insertions(+), 0 deletions(-) diff --git a/lib/librte_hash/rte_jhash.h b/lib/librte_hash/rte_jhash.h index 41297ab..f1c0a8a 100644 --- a/lib/librte_hash/rte_jhash.h +++ b/lib/librte_hash/rte_jhash.h @@ -297,6 +297,212 @@ rte_jhash2(const uint32_t *k, uint32_t length, uint32_t initval) return c; } +/** + * Same as rte_jhash, but takes two seeds and return two uint32_ts. + * pc and pb must be non-null, and *pc and *pb must both be initialized + * with seeds. If you pass in (*pb)=0, the output (*pc) will be + * the same as the return value from rte_jhash. + * + * @param k + * Key to calculate hash of. + * @param length + * Length of key in bytes. + * @param pc + * IN: seed OUT: primary hash value. + * @param pc + * IN: second seed OUT: secondary hash value. + */ +static inline void +rte_jhash_2hashes(const void *key, uint32_t length, uint32_t *pc, uint32_t *pb) +{ + uint32_t a, b, c; + + /* Set up the internal state */ + a = b = c = RTE_JHASH_GOLDEN_RATIO + ((uint32_t)length) + *pc; + c += *pb; + + /* Check key alignment. For x86 architecture, first case is always optimal */ +#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) || defined(RTE_ARCH_X86_X32) + const uint32_t *k = key; + const uint32_t s = 0; +#else + const uint32_t *k = (uint32_t *)(uintptr_t)key & (uintptr_t)~3); + const uint32_t s = ((uintptr_t)key & 3) * CHAR_BIT; +#endif + + if (s == 0) { + while (length > 12) { + a += k[0]; + b += k[1]; + c += k[2]; + + __rte_jhash_mix(a, b, c); + + k += 3; + length -= 12; + } + + switch (length) { + case 12: + c += k[2]; b += k[1]; a += k[0]; break; + case 11: + c += k[2] & LOWER24b_MASK; b += k[1]; a += k[0]; break; + case 10: + c += k[2] & LOWER16b_MASK; b += k[1]; a += k[0]; break; + case 9: + c += k[2] & LOWER8b_MASK; b += k[1]; a += k[0]; break; + case 8: + b += k[1]; a += k[0]; break; + case 7: + b += k[1] & LOWER24b_MASK; a += k[0]; break; + case 6: + b += k[1] & LOWER16b_MASK; a += k[0]; break; + case 5: + b += k[1] & LOWER8b_MASK; a += k[0]; break; + case 4: + a += k[0]; break; + case 3: + a += k[0] & LOWER24b_MASK; break; + case 2: + a += k[0] & LOWER16b_MASK; break; + case 1: + a += k[0] & LOWER8b_MASK; break; + /* zero length strings require no mixing */ + case 0: + *pc = c; + *pb = b; + return; + }; + } else { + /* all but the last block: affect some 32 bits of (a, b, c) */ + while (length > 12) { + a += BIT_SHIFT(k[0], k[1], s); + b += BIT_SHIFT(k[1], k[2], s); + c += BIT_SHIFT(k[2], k[3], s); + __rte_jhash_mix(a, b, c); + + k += 3; + length -= 12; + } + + /* last block: affect all 32 bits of (c) */ + switch (length) { + case 12: + a += BIT_SHIFT(k[0], k[1], s); + b += BIT_SHIFT(k[1], k[2], s); + c += BIT_SHIFT(k[2], k[3], s); + break; + case 11: + a += BIT_SHIFT(k[0], k[1], s); + b += BIT_SHIFT(k[1], k[2], s); + c += BIT_SHIFT(k[2], k[3], s) & LOWER24b_MASK; + break; + case 10: + a += BIT_SHIFT(k[0], k[1], s); + b += BIT_SHIFT(k[1], k[2], s); + c += BIT_SHIFT(k[2], k[3], s) & LOWER16b_MASK; + break; + case 9: + a += BIT_SHIFT(k[0], k[1], s); + b += BIT_SHIFT(k[1], k[2], s); + c += BIT_SHIFT(k[2], k[3], s) & LOWER8b_MASK; + break; + case 8: + a += B
[dpdk-dev] [PATCH v4 3/6] hash: update jhash function with the latest available
Jenkins hash function was developed originally in 1996, and was integrated in first versions of DPDK. The function has been improved in 2006, achieving up to 60% better performance, compared to the original one. This patch integrates that code into the rte_jhash library. Signed-off-by: Pablo de Lara --- lib/librte_hash/rte_jhash.h | 266 +++ 1 files changed, 193 insertions(+), 73 deletions(-) diff --git a/lib/librte_hash/rte_jhash.h b/lib/librte_hash/rte_jhash.h index a4bf5a1..41297ab 100644 --- a/lib/librte_hash/rte_jhash.h +++ b/lib/librte_hash/rte_jhash.h @@ -1,7 +1,7 @@ /*- * BSD LICENSE * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. + * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -45,38 +45,62 @@ extern "C" { #endif #include +#include +#include /* jhash.h: Jenkins hash support. * - * Copyright (C) 1996 Bob Jenkins (bob_jenkins at burtleburtle.net) + * Copyright (C) 2006 Bob Jenkins (bob_jenkins at burtleburtle.net) * * http://burtleburtle.net/bob/hash/ * * These are the credits from Bob's sources: * - * lookup2.c, by Bob Jenkins, December 1996, Public Domain. - * hash(), hash2(), hash3, and mix() are externally useful functions. - * Routines to test the hash are included if SELF_TEST is defined. - * You can use this free for any purpose. It has no warranty. + * lookup3.c, by Bob Jenkins, May 2006, Public Domain. + * + * These are functions for producing 32-bit hashes for hash table lookup. + * hashword(), hashlittle(), hashlittle2(), hashbig(), mix(), and final() + * are externally useful functions. Routines to test the hash are included + * if SELF_TEST is defined. You can use this free for any purpose. It's in + * the public domain. It has no warranty. * * $FreeBSD$ */ +#define rot(x, k) (((x) << (k)) | ((x) >> (32-(k + /** @internal Internal function. NOTE: Arguments are modified. */ #define __rte_jhash_mix(a, b, c) do { \ - a -= b; a -= c; a ^= (c>>13); \ - b -= c; b -= a; b ^= (a<<8); \ - c -= a; c -= b; c ^= (b>>13); \ - a -= b; a -= c; a ^= (c>>12); \ - b -= c; b -= a; b ^= (a<<16); \ - c -= a; c -= b; c ^= (b>>5); \ - a -= b; a -= c; a ^= (c>>3); \ - b -= c; b -= a; b ^= (a<<10); \ - c -= a; c -= b; c ^= (b>>15); \ + a -= c; a ^= rot(c, 4); c += b; \ + b -= a; b ^= rot(a, 6); a += c; \ + c -= b; c ^= rot(b, 8); b += a; \ + a -= c; a ^= rot(c, 16); c += b; \ + b -= a; b ^= rot(a, 19); a += c; \ + c -= b; c ^= rot(b, 4); b += a; \ +} while (0) + +#define __rte_jhash_final(a, b, c) do { \ + c ^= b; c -= rot(b, 14); \ + a ^= c; a -= rot(c, 11); \ + b ^= a; b -= rot(a, 25); \ + c ^= b; c -= rot(b, 16); \ + a ^= c; a -= rot(c, 4); \ + b ^= a; b -= rot(a, 14); \ + c ^= b; c -= rot(b, 24); \ } while (0) /** The golden ratio: an arbitrary value. */ -#define RTE_JHASH_GOLDEN_RATIO 0x9e3779b9 +#define RTE_JHASH_GOLDEN_RATIO 0xdeadbeef + +#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN +#define BIT_SHIFT(x, y, k) (((x) >> (k)) | ((uint64_t)(y) << (32-(k +#else +#define BIT_SHIFT(x, y, k) (((uint64_t)(x) << (k)) | ((y) >> (32-(k +#endif + +#define LOWER8b_MASK rte_le_to_cpu_32(0xff) +#define LOWER16b_MASK rte_le_to_cpu_32(0x) +#define LOWER24b_MASK rte_le_to_cpu_32(0xff) /** * The most generic version, hashes an arbitrary sequence @@ -95,42 +119,130 @@ extern "C" { static inline uint32_t rte_jhash(const void *key, uint32_t length, uint32_t initval) { - uint32_t a, b, c, len; - const uint8_t *k = (const uint8_t *)key; - const uint32_t *k32 = (const uint32_t *)key; + uint32_t a, b, c; - len = length; - a = b = RTE_JHASH_GOLDEN_RATIO; - c = initval; + /* Set up the internal state */ + a = b = c = RTE_JHASH_GOLDEN_RATIO + ((uint32_t)length) + initval; - while (len >= 12) { - a += k32[0]; - b += k32[1]; - c += k32[2]; + /* Check key alignment. For x86 architecture, first case is always optimal */ +#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) || defined(RTE_ARCH_X86_X32) + const uint32_t *k = key; + const uint32_t s = 0; +#else + const uint32_t *k = (uint32_t *)(uintptr_t)key & (uintptr_t)~3); + const uint32_t s = ((uintptr_t)key & 3) * CHAR_BIT; +#endif - __rte_jhash_mix(a,b,c); + if (s == 0) { + while (length > 12) { + a += k[0]; + b += k[1]; + c += k[2]; - k += (3 * sizeof(uint32_t)), k32 += 3; - len -= (3 * sizeof(uint32_t)); - } + __rte_jhash_mix(a, b, c); - c += length; - switch (len) { -
[dpdk-dev] [PATCH v4 2/6] test/hash: improve accuracy on cycle measurements
Cycles per hash calculation were measured per single operation. It is much more accurate to run several iterations between measurements and divide by number of iterations. Signed-off-by: Pablo de Lara --- app/test/test_hash_func_perf.c | 18 +- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/test/test_hash_func_perf.c b/app/test/test_hash_func_perf.c index ba31c53..004c9be 100644 --- a/app/test/test_hash_func_perf.c +++ b/app/test/test_hash_func_perf.c @@ -82,21 +82,21 @@ static const char *get_hash_name(rte_hash_function f) static void run_hash_func_test(rte_hash_function f, uint32_t init_val, uint32_t key_len) { - static uint8_t key[RTE_HASH_KEY_LENGTH_MAX]; - uint64_t ticks = 0, start, end; + static uint8_t key[HASHTEST_ITERATIONS][RTE_HASH_KEY_LENGTH_MAX]; + uint64_t ticks, start, end; unsigned i, j; for (i = 0; i < HASHTEST_ITERATIONS; i++) { - for (j = 0; j < key_len; j++) - key[j] = (uint8_t) rte_rand(); - - start = rte_rdtsc(); - f(key, key_len, init_val); - end = rte_rdtsc(); - ticks += end - start; + key[i][j] = (uint8_t) rte_rand(); } + start = rte_rdtsc(); + for (i = 0; i < HASHTEST_ITERATIONS; i++) + f(key[i], key_len, init_val); + end = rte_rdtsc(); + ticks = end - start; + printf("%-12s, %-18u, %-13u, %.02f\n", get_hash_name(f), (unsigned) key_len, (unsigned) init_val, (double)ticks / HASHTEST_ITERATIONS); } -- 1.7.4.1
[dpdk-dev] [PATCH v4 1/6] test/hash: move hash function perf tests to separate file
This patch moves hash function performance tests to a separate file, so user can check performance of the existing hash functions quicker, without having to run all the other hash operation performance tests, which takes some time. Signed-off-by: Pablo de Lara --- app/test/Makefile |1 + app/test/test_hash_func_perf.c | 145 app/test/test_hash_perf.c | 71 +--- 3 files changed, 147 insertions(+), 70 deletions(-) create mode 100644 app/test/test_hash_func_perf.c diff --git a/app/test/Makefile b/app/test/Makefile index 4aca77c..77a9c42 100644 --- a/app/test/Makefile +++ b/app/test/Makefile @@ -83,6 +83,7 @@ SRCS-y += test_memcpy_perf.c SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash.c SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_perf.c +SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_func_perf.c SRCS-$(CONFIG_RTE_LIBRTE_LPM) += test_lpm.c SRCS-$(CONFIG_RTE_LIBRTE_LPM) += test_lpm6.c diff --git a/app/test/test_hash_func_perf.c b/app/test/test_hash_func_perf.c new file mode 100644 index 000..ba31c53 --- /dev/null +++ b/app/test/test_hash_func_perf.c @@ -0,0 +1,145 @@ +/*- + * BSD LICENSE + * + * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "test.h" + +#include +#include +#include + +/*** + * Hash function performance test configuration section. Each performance test + * will be performed HASHTEST_ITERATIONS times. + * + * The three arrays below control what tests are performed. Every combination + * from the array entries is tested. + */ +#define HASHTEST_ITERATIONS 100 + +static rte_hash_function hashtest_funcs[] = {rte_jhash, rte_hash_crc}; +static uint32_t hashtest_initvals[] = {0}; +static uint32_t hashtest_key_lens[] = {2, 4, 5, 6, 7, 8, 10, 11, 15, 16, 21, 31, 32, 33, 63, 64}; +/**/ + +/* + * To help print out name of hash functions. + */ +static const char *get_hash_name(rte_hash_function f) +{ + if (f == rte_jhash) + return "jhash"; + + if (f == rte_hash_crc) + return "rte_hash_crc"; + + return "UnknownHash"; +} + +/* + * Test a hash function. + */ +static void run_hash_func_test(rte_hash_function f, uint32_t init_val, + uint32_t key_len) +{ + static uint8_t key[RTE_HASH_KEY_LENGTH_MAX]; + uint64_t ticks = 0, start, end; + unsigned i, j; + + for (i = 0; i < HASHTEST_ITERATIONS; i++) { + + for (j = 0; j < key_len; j++) + key[j] = (uint8_t) rte_rand(); + + start = rte_rdtsc(); + f(key, key_len, init_val); + end = rte_rdtsc(); + ticks += end - start; + } + + printf("%-12s, %-18u, %-13u, %.02f\n", get_hash_name(f), (unsigned) key_len, + (unsigned) init_val, (double)ticks / HASHTEST_ITERATIONS); +} + +/* + * Test all hash functions. + */ +static void run_hash_func_tests(void) +{ + unsigned i, j, k; + + printf(" *** Hash function performance test results ***\n"); + printf(" Number of iterations for each test
[dpdk-dev] [PATCH v4 0/6] update jhash function
Jenkins hash function was developed originally in 1996, and was integrated in first versions of DPDK. The function has been improved in 2006, achieving up to 60% better performance, compared to the original one. This patchset updates the current jhash in DPDK, including two new functions that generate two hashes from a single key. It also separates the existing hash function performance tests to another file, to make it quicker to run. changes in v4: - Simplify key alignment checks - Include missing x86 arch check changes in v3: - Update rte_jhash_1word, rte_jhash_2words and rte_jhash_3words functions changes in v2: - Split single commit in three commits, one that updates the existing functions and another that adds two new functions and use one of those functions as a base to be called by the other ones. - Remove some unnecessary ifdefs in the code. - Add new macros to help on the reutilization of constants - Separate hash function performance tests to another file and improve cycle measurements. - Rename existing function rte_jhash2 to rte_jhash_32b (something more meaninful) and mark rte_jhash2 as deprecated Pablo de Lara (6): test/hash: move hash function perf tests to separate file test/hash: improve accuracy on cycle measurements hash: update jhash function with the latest available hash: add two new functions to jhash library hash: remove duplicated code hash: rename rte_jhash2 to rte_jhash_32b app/test/Makefile |1 + app/test/test_func_reentrancy.c |2 +- app/test/test_hash.c|4 +- app/test/test_hash_func_perf.c | 145 + app/test/test_hash_perf.c | 71 + lib/librte_hash/rte_jhash.h | 338 +-- 6 files changed, 402 insertions(+), 159 deletions(-) create mode 100644 app/test/test_hash_func_perf.c -- 1.7.4.1
[dpdk-dev] [PATCH] virtio: Fix enqueue/dequeue can't handle chained vring descriptors.
Hi Changchun, Why the title begins with virtio for a patch on vhost? Could you rephrase it in a positive form? 2015-05-04 14:26, Ouyang Changchun: > Vring enqueue need consider the 2 cases: > 1. Vring descriptors chained together, the first one is for virtio header, > the rest are for real data; > 2. Only one descriptor, virtio header and real data share one single > descriptor; Please explain what was not working before. > So does vring dequeue. > > Signed-off-by: Changchun Ouyang > --- > lib/librte_vhost/vhost_rxtx.c | 60 > +++ > 1 file changed, 44 insertions(+), 16 deletions(-) > > diff --git a/lib/librte_vhost/vhost_rxtx.c b/lib/librte_vhost/vhost_rxtx.c > index 510ffe8..3135883 100644 > --- a/lib/librte_vhost/vhost_rxtx.c > +++ b/lib/librte_vhost/vhost_rxtx.c > @@ -59,7 +59,7 @@ virtio_dev_rx(struct virtio_net *dev, uint16_t queue_id, > struct virtio_net_hdr_mrg_rxbuf virtio_hdr = {{0, 0, 0, 0, 0, 0}, 0}; > uint64_t buff_addr = 0; > uint64_t buff_hdr_addr = 0; > - uint32_t head[MAX_PKT_BURST], packet_len = 0; > + uint32_t head[MAX_PKT_BURST]; > uint32_t head_idx, packet_success = 0; > uint16_t avail_idx, res_cur_idx; > uint16_t res_base_idx, res_end_idx; > @@ -113,6 +113,10 @@ virtio_dev_rx(struct virtio_net *dev, uint16_t queue_id, > rte_prefetch0(&vq->desc[head[packet_success]]); > > while (res_cur_idx != res_end_idx) { > + uint32_t offset = 0; > + uint32_t data_len, len_to_cpy; > + uint8_t plus_hdr = 0; plus_hdr is not very meaningful to me I'm not a vhost expert so I won't review the rest. If nobody comments it in the coming days, it will be accepted.
[dpdk-dev] [PATCH 0/2] cmdline: add polling mode for command line
> -Original Message- > From: Pawel Wodkowski [mailto:pwodkowx at stargo] > Sent: Tuesday, May 12, 2015 12:10 PM > To: dev at dpdk.org > Cc: Dumitrescu, Cristian; Jastrzebski, MichalX K > Subject: [PATCH 0/2] cmdline: add polling mode for command line > > This patchset adds the ability to process console input in the same thread > as packet processing by using poll() function and fixes some minor issues. > > Pawel Wodkowski (2): > cmdline: fix missing include files > cmdline: add polling mode for command line > > lib/librte_cmdline/cmdline.c | 35 > ++ > lib/librte_cmdline/cmdline.h | 4 > lib/librte_cmdline/cmdline_rdline.h| 1 + > lib/librte_cmdline/cmdline_vt100.h | 2 ++ > lib/librte_cmdline/rte_cmdline_version.map | 1 + > 5 files changed, 43 insertions(+) > > -- > 1.9.1 Acked by: Cristian Dumitrescu The existing cmdline API requires a thread to be completely consumed for running the CLI, so it is not possible to push any other tasks (typically slow tasks, control plane related) on the same thread. This is because the cmdline_interact() function implements an infinite loop internally, so once called after initialization, it only returns when the application is terminated (e.g. as result of quit CLI command). This patch removes this limitation by providing an alternative function called cmdline_poll(), which allows the application to own the thread dispatch loop and work with the CLI in polling mode, hence making it possible for the application to push additional work on the same thread. The thread dispatch loop should be owned by the application, and not by the cmdline library.
[dpdk-dev] [PATCH v4 0/6] update jhash function
On Tue, May 12, 2015 at 12:02:32PM +0100, Pablo de Lara wrote: > Jenkins hash function was developed originally in 1996, > and was integrated in first versions of DPDK. > The function has been improved in 2006, > achieving up to 60% better performance, compared to the original one. > > This patchset updates the current jhash in DPDK, > including two new functions that generate two hashes from a single key. > > It also separates the existing hash function performance tests to > another file, to make it quicker to run. > > changes in v4: > - Simplify key alignment checks > - Include missing x86 arch check > > changes in v3: > > - Update rte_jhash_1word, rte_jhash_2words and rte_jhash_3words > functions > > changes in v2: > > - Split single commit in three commits, one that updates the existing > functions > and another that adds two new functions and use one of those functions > as a base to be called by the other ones. > - Remove some unnecessary ifdefs in the code. > - Add new macros to help on the reutilization of constants > - Separate hash function performance tests to another file > and improve cycle measurements. > - Rename existing function rte_jhash2 to rte_jhash_32b > (something more meaninful) and mark rte_jhash2 as > deprecated > > Pablo de Lara (6): > test/hash: move hash function perf tests to separate file > test/hash: improve accuracy on cycle measurements > hash: update jhash function with the latest available > hash: add two new functions to jhash library > hash: remove duplicated code > hash: rename rte_jhash2 to rte_jhash_32b > > app/test/Makefile |1 + > app/test/test_func_reentrancy.c |2 +- > app/test/test_hash.c|4 +- > app/test/test_hash_func_perf.c | 145 + > app/test/test_hash_perf.c | 71 + > lib/librte_hash/rte_jhash.h | 338 > +-- > 6 files changed, 402 insertions(+), 159 deletions(-) > create mode 100644 app/test/test_hash_func_perf.c > > -- > 1.7.4.1 > > did you run this through the ABI checker? I see you're removing several symbols that will likely need to go through the ABI deprecation process. Neil
[dpdk-dev] [PATCH] vhost: Fix compilation issue
> Minor fix for the referring of a pointer when debug and dump is enabled. > The original commit is: 72ec8d77 > > Signed-off-by: Changchun Ouyang Applied, thanks This bug was not seen before because it was disabled: examples/vhost/main.h: //#define DEBUG That's why we must avoid putting some code in #if blocks. Please use log levels when possible. If you absolutely want a compile-time option (other than CONFIG_RTE_LOG_LEVEL), please put it in the config file instead of commenting a #define in a header file. In this case, it should be handled only with CONFIG_RTE_LOG_LEVEL. I think we can assume the debug level will have an impact on datapath performance. And maybe we should raise the default log level to RTE_LOG_NOTICE. Last comment about logs in vhost example: CONFIG_RTE_LOG_LEVEL should be used to define the macro PRINT_PACKET. In case of debug level at compile-time, it should call a function checking the runtime log level as in rte_vlog(). Please, let's avoid defining entirely a function in a macro, it's ugly. Thanks
[dpdk-dev] [PATCH 1/4] pci: allow access to PCI config space
On Mon, May 11, 2015 at 10:31:04AM -0700, Stephen Hemminger wrote: > On Mon, 11 May 2015 12:54:54 + > Neil Horman wrote: > > > On Thu, May 07, 2015 at 04:25:32PM -0700, Stephen Hemminger wrote: > > > From: Stephen Hemminger > > > > > > Some drivers need ability to access PCI config (for example for power > > > management). This adds an abstraction to do this; only implemented > > > on Linux, but should be possible on BSD. > > > > > Could someone who has BSD infrastructure try this, not sure if it will even > build. No, it doesn't. :-) Version that compiles is below. However, I haven't tried testing it yet or anything. Is there any easy way for me to do so? /Bruce diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c index 61e8921..4194199 100644 --- a/lib/librte_eal/bsdapp/eal/eal_pci.c +++ b/lib/librte_eal/bsdapp/eal/eal_pci.c @@ -490,6 +490,87 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, struct rte_pci_device *d return 1; } +/* Read PCI config space. */ +int rte_eal_pci_read_config(const struct rte_pci_device *dev, + void *buf, size_t len, off_t offset) +{ + int fd = -1; + + struct pci_io pi = { + .pi_sel = { + .pc_domain = dev->addr.domain, + .pc_bus = dev->addr.bus, + .pc_dev = dev->addr.devid, + .pc_func = dev->addr.function, + }, + .pi_reg = offset, + .pi_width = len, + }; + + if (len == 3 || len > sizeof(pi.pi_data)) { + RTE_LOG(ERR, EAL, "%s(): invalid pci read length\n", __func__); + goto error; + } + + fd = open("/dev/pci", O_RDONLY); + if (fd < 0) { + RTE_LOG(ERR, EAL, "%s(): error opening /dev/pci\n", __func__); + goto error; + } + + if (ioctl(fd, PCIOCREAD, &pi) < 0) + goto error; + close(fd); + + memcpy(buf, &pi.pi_data, len); + return 0; + +error: + if (fd >= 0) + close(fd); + return -1; +} + +/* Write PCI config space. */ +int rte_eal_pci_write_config(const struct rte_pci_device *dev, +const void *buf, size_t len, off_t offset) +{ + int fd = -1; + + struct pci_io pi = { + .pi_sel = { + .pc_domain = dev->addr.domain, + .pc_bus = dev->addr.bus, + .pc_dev = dev->addr.devid, + .pc_func = dev->addr.function, + }, + .pi_reg = offset, + .pi_data = *(u_int32_t *)buf, + .pi_width = len, + }; + + if (len == 3 || len > sizeof(pi.pi_data)) { + RTE_LOG(ERR, EAL, "%s(): invalid pci read length\n", __func__); + goto error; + } + + fd = open("/dev/pci", O_RDONLY); + if (fd < 0) { + RTE_LOG(ERR, EAL, "%s(): error opening /dev/pci\n", __func__); + goto error; + } + + if (ioctl(fd, PCIOCWRITE, &pi) < 0) + goto error; + close(fd); + return 0; + +error: + if (fd >= 0) + close(fd); + return -1; +} + /* Init the PCI EAL subsystem */ int rte_eal_pci_init(void)
[dpdk-dev] [PATCH v7 08/10] ixgbe: enable rx queue interrupts for both PF and VF
On 5/11/2015 11:00 PM, Stephen Hemminger wrote: > On Mon, 11 May 2015 13:31:04 +0800 > "Liang, Cunming" wrote: > >>> Since MSI-X vectors are limited on many hardware platforms, this whole API >>> should be changed so that max_intr is based on number of rx_queues actually >>> used by the application. That means the setup needs to move from init to >>> configure. >> [LCM] When MSI-X is not used, intr_vec and set max_intr are useless. It >> doesn't matter to non MSI-X mode. >> As it allows the sequence "dev_stop->dev_reconfig->dev_start", the real >> used number of queue may change. >> So allocation only on dev_init and release only on dev_close, just make >> it simple. During configure_msix, it do use the real useful queue number >> to set queue/vector mapping, refer xxx_configure_msix(). > The problem is that if a customer has 16 NIC's with 32 MSI vectors per NIC, > it maybe that the MSI table in south bridge gets full. That is why the ixgbe > driver for Linux limits itself to num_online_cpu() + 1 MSI interrrupts. > [LCM] So your concern actual is not about when to allocate the queue/vec mapping table, but the number of vectors enabled per NIC. But even using num_online_cpu()+1, the number of online cpu on a 2U system is easy to exceed 32. So probably using a MSI_VECTOR_NB_MAX to define it in config.
[dpdk-dev] Intel fortville not working with multi-segment
Hi Nissim It seems that our validation guys here can reproduce it in our lab. I will check that soon later, and update you later. Thank you very much for the good finding! Regards, Helin > -Original Message- > From: Nissim Nisimov [mailto:NissimN at Radware.com] > Sent: Monday, May 11, 2015 11:44 AM > To: Zhang, Helin > Cc: 'dev at dpdk.org' > Subject: RE: Intel fortville not working with multi-segment > > Hi, > > I am using PF pass-through and it doesn't work even with 2000 bytes of > server response page size. > Looks like the first segment of each session is not received. > > When i am changing the server response size to 1000 bytes, all works as > expected. > > I am working with dpdk 1.8 version. > > Any idea why ? Is it related to i40e multi segment support? > > Thx > Nissim > > On May 11, 2015 5:03 AM, "Zhang, Helin" > wrote: > > > > Hi Nissim > > > > Are you using PF pass-through or VF pass-through? > > For PF pass-through, you might have already gotten the fix. > > For VF pass-through, there is > > Hi Nissim > > Are you using PF pass-through or VF pass-through? > For PF pass-through, you might have already gotten the fix. > For VF pass-through, there is a bug fix which is needed for supporting > jumbo frame and multiple mbuf. > http://www.dpdk.org/dev/patchwork/patch/4641/ > > > Regards, > Helin > > > -Original Message- > > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Nissim Nisimov > > Sent: Monday, May 11, 2015 3:48 AM > > To: Nissim Nisimov; 'dev at dpdk.org' > > Subject: Re: [dpdk-dev] Intel fortville not working with multi-segment > > > > Hi, > > > > can someone assist regarding this issue? > > > > Is it a known limitation in i40e/dpdk (no support for multi-segment)? > > > > Thx > > Nissim > > > > -Original Message- > > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Nissim Nisimov > > Sent: Thursday, May 07, 2015 5:44 PM > > To: 'dev at dpdk.org' > > Subject: [dpdk-dev] Intel fortville not working with multi-segment > > > > Hi, > > > > > > > > I am trying to work with Intel Fortville (XL710) NICs in Passthrough > > mode from a VM running dpdk app. > > > > > > First I didn't have any TX traffic from the VM, I got dpdk patch for > > this issue and it fixed it. > > (http://www.dpdk.org/dev/patchwork/patch/4588/) > > > > But now I see that when trying to run multi-segment traffic not all > > the packets reaching the VM (I tested it on bare metal as well and saw > > the same issue) > > > > Is it a known issue? any workaround for it? > > > > Thanks, > > Nissim
[dpdk-dev] [PATCH] librte_pmd_fm10k: Fix max_vfs issue in fm10k PMD
Hi, thomas What about this patch? Thanks, Michael On 4/16/2015 4:09 PM, Chen, Jing D wrote: > Hi, > >> -Original Message- >> From: Michael Qiu [mailto:qiudayu at cn.ibm.com] >> Sent: Tuesday, April 14, 2015 5:25 PM >> To: dev at dpdk.org >> Cc: Chen, Jing D; Qiu, Michael >> Subject: [PATCH] librte_pmd_fm10k: Fix max_vfs issue in fm10k PMD >> >> From: Michael Qiu >> >> In DPDK, max_vfs means vf numbers created, not the max number vfs >> the device supported. >> >> Signed-off-by: Michael Qiu >> --- >> lib/librte_pmd_fm10k/fm10k_ethdev.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c >> b/lib/librte_pmd_fm10k/fm10k_ethdev.c >> index 0312fad..297ff88 100644 >> --- a/lib/librte_pmd_fm10k/fm10k_ethdev.c >> +++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c >> @@ -770,7 +770,7 @@ fm10k_dev_infos_get(struct rte_eth_dev *dev, >> dev_info->max_tx_queues = hw->mac.max_queues; >> dev_info->max_mac_addrs = 1; >> dev_info->max_hash_mac_addrs = 0; >> -dev_info->max_vfs= FM10K_MAX_VF_NUM; >> +dev_info->max_vfs= dev->pci_dev->max_vfs; >> dev_info->max_vmdq_pools = ETH_64_POOLS; >> dev_info->rx_offload_capa = >> DEV_RX_OFFLOAD_IPV4_CKSUM | >> -- >> 1.9.3 > Acked-by Jing Chen > >
[dpdk-dev] TX performance regression caused by the mbuf cachline split
On 12/05/15 02:28, Marc Sune wrote: > > > On 12/05/15 01:18, Paul Emmerich wrote: >> Found a really simple solution that almost restores the original >> performance: just add a prefetch on alloc. For some reason, I assumed >> that this was already done since the troublesome commit I >> investigated mentioned something about prefetching... I guess the >> commit referred to the hardware prefetcher in the CPU. >> >> Adding an explicit prefetch command in the mbuf alloc function gives >> a throughput of 12.7/10.35 Mpps in my benchmark with the >> simple/full-featured tx path. >> >> DPDK 1.7.1 was at 14.1/10.7 Mpps. I guess I can live with that, since >> I'm primarily interested in the full-featured path and the drop from >> 10.7 to ~10.4 was due to another change. > > Maybe a stupid question; > > Does the performance of v1.7.1 also improve if you backport this patch > to it? Self answered... split was done in 1.8, so it is indeed stupid. Marc > > Marc > >> >> Patch: https://github.com/dpdk-org/dpdk/pull/2 >> I also sent an email to the mailing list. >> >> I also think that the rx-path could also benefit from prefetching >> somewhere. >> >> >> Paul >> >
[dpdk-dev] TX performance regression caused by the mbuf cachline split
On 12/05/15 01:18, Paul Emmerich wrote: > Found a really simple solution that almost restores the original > performance: just add a prefetch on alloc. For some reason, I assumed > that this was already done since the troublesome commit I investigated > mentioned something about prefetching... I guess the commit referred > to the hardware prefetcher in the CPU. > > Adding an explicit prefetch command in the mbuf alloc function gives a > throughput of 12.7/10.35 Mpps in my benchmark with the > simple/full-featured tx path. > > DPDK 1.7.1 was at 14.1/10.7 Mpps. I guess I can live with that, since > I'm primarily interested in the full-featured path and the drop from > 10.7 to ~10.4 was due to another change. Maybe a stupid question; Does the performance of v1.7.1 also improve if you backport this patch to it? Marc > > Patch: https://github.com/dpdk-org/dpdk/pull/2 > I also sent an email to the mailing list. > > I also think that the rx-path could also benefit from prefetching > somewhere. > > > Paul >
[dpdk-dev] [RFC PATCH 2/2] Filling speed capability bitmaps in the PMDs
Added speed capabilities to all pmds supporting physical NICs: * e1000 * ixgbe * i40 * mlx4 * fm10k This commit should be revised to ensure accuracy. It is mostly untested (HW not available). Signed-off-by: Marc Sune --- lib/librte_pmd_e1000/em_ethdev.c| 6 ++ lib/librte_pmd_e1000/igb_ethdev.c | 6 ++ lib/librte_pmd_fm10k/fm10k_ethdev.c | 3 +++ lib/librte_pmd_i40e/i40e_ethdev.c | 9 + lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 10 ++ lib/librte_pmd_mlx4/mlx4.c | 6 ++ 6 files changed, 40 insertions(+) diff --git a/lib/librte_pmd_e1000/em_ethdev.c b/lib/librte_pmd_e1000/em_ethdev.c index da02988..593e182 100644 --- a/lib/librte_pmd_e1000/em_ethdev.c +++ b/lib/librte_pmd_e1000/em_ethdev.c @@ -883,6 +883,12 @@ eth_em_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) dev_info->max_rx_queues = 1; dev_info->max_tx_queues = 1; + + dev_info->speed_capa = ETH_SPEED_CAP_10M_HD | + ETH_SPEED_CAP_10M_FD | + ETH_SPEED_CAP_100M_HD | + ETH_SPEED_CAP_100M_FD | + ETH_SPEED_CAP_1G; } /* return 0 means link status changed, -1 means not changed */ diff --git a/lib/librte_pmd_e1000/igb_ethdev.c b/lib/librte_pmd_e1000/igb_ethdev.c index 4415155..8b5514f 100644 --- a/lib/librte_pmd_e1000/igb_ethdev.c +++ b/lib/librte_pmd_e1000/igb_ethdev.c @@ -1398,6 +1398,12 @@ eth_igb_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) }, .txq_flags = 0, }; + + dev_info->speed_capa = ETH_SPEED_CAP_10M_HD | + ETH_SPEED_CAP_10M_FD | + ETH_SPEED_CAP_100M_HD | + ETH_SPEED_CAP_100M_FD | + ETH_SPEED_CAP_1G; } static void diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c index 275c19c..e97b857 100644 --- a/lib/librte_pmd_fm10k/fm10k_ethdev.c +++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c @@ -791,6 +791,9 @@ fm10k_dev_infos_get(struct rte_eth_dev *dev, ETH_TXQ_FLAGS_NOOFFLOADS, }; + dev_info->speed_capa = ETH_SPEED_CAP_1G | ETH_SPEED_CAP_2_5G | + ETH_SPEED_CAP_10G | ETH_SPEED_CAP_25G | + ETH_SPEED_CAP_40G | ETH_SPEED_CAP_100G; } static int diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c index 43762f2..70675d6 100644 --- a/lib/librte_pmd_i40e/i40e_ethdev.c +++ b/lib/librte_pmd_i40e/i40e_ethdev.c @@ -1518,6 +1518,7 @@ static void i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) { struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private); + struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private); struct i40e_vsi *vsi = pf->main_vsi; dev_info->max_rx_queues = vsi->nb_qps; @@ -1573,6 +1574,14 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) dev_info->max_rx_queues += dev_info->vmdq_queue_num; dev_info->max_tx_queues += dev_info->vmdq_queue_num; } + + if (i40e_is_40G_device(hw->device_id)) + /* For XL710 */ + dev_info->speed_capa = ETH_SPEED_CAP_1G | ETH_SPEED_CAP_10G; + else + /* For X710 */ + dev_info->speed_capa = ETH_SPEED_CAP_10G | ETH_SPEED_CAP_40G; + } static int diff --git a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c index 5f9a1cf..1b5de9a 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c +++ b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c @@ -2054,6 +2054,16 @@ ixgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) }; dev_info->reta_size = ETH_RSS_RETA_SIZE_128; dev_info->flow_type_rss_offloads = IXGBE_RSS_OFFLOAD_ALL; + + dev_info->speed_capa = ETH_SPEED_CAP_1G | ETH_SPEED_CAP_10G; + + if (hw->mac.type == ixgbe_mac_X540 || + hw->mac.type == ixgbe_mac_X540_vf || + hw->mac.type == ixgbe_mac_X550 || + hw->mac.type == ixgbe_mac_X550_vf) + + dev_info->speed_capa |= ETH_SPEED_CAP_100M_FD | + ETH_SPEED_CAP_100M_HD; } static void diff --git a/lib/librte_pmd_mlx4/mlx4.c b/lib/librte_pmd_mlx4/mlx4.c index f915bc1..d4442fb 100644 --- a/lib/librte_pmd_mlx4/mlx4.c +++ b/lib/librte_pmd_mlx4/mlx4.c @@ -3482,6 +3482,12 @@ mlx4_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info) info->max_rx_queues = max; info->max_tx_queues = max; info->max_mac_addrs = elemof(priv->mac); + + info->speed_capa = ETH_SPEED_CAP_10G | ETH_SPEED_CAP_20G | +
[dpdk-dev] [RFC PATCH 1/2] Added ETH_SPEED_CAP bitmap in rte_eth_dev_info
Added constants and bitmap to struct rte_eth_dev_info to be used by PMDs. Signed-off-by: Marc Sune --- lib/librte_ether/rte_ethdev.h | 24 1 file changed, 24 insertions(+) diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index 4648290..05f6e88 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -899,6 +899,29 @@ struct rte_eth_conf { #define DEV_TX_OFFLOAD_UDP_TSO 0x0040 #define DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM 0x0080 /**< Used for tunneling packet. */ +/** + * Device supported speeds + */ +#define ETH_SPEED_CAP_NOT_PHY (0) /*< No phy media > */ +#define ETH_SPEED_CAP_10M_HD (1 << 0) /*< 10 Mbps half-duplex> */ +#define ETH_SPEED_CAP_10M_FD (1 << 1) /*< 10 Mbps full-duplex> */ +#define ETH_SPEED_CAP_100M_HD (1 << 2) /*< 100 Mbps half-duplex> */ +#define ETH_SPEED_CAP_100M_FD (1 << 3) /*< 100 Mbps full-duplex> */ +#define ETH_SPEED_CAP_1G (1 << 4) /*< 1 Gbps > */ +#define ETH_SPEED_CAP_2_5G (1 << 5) /*< 2.5 Gbps > */ +#define ETH_SPEED_CAP_5G (1 << 6) /*< 5 Gbps > */ +#define ETH_SPEED_CAP_10G (1 << 7) /*< 10 Mbps > */ +#define ETH_SPEED_CAP_20G (1 << 8) /*< 20 Gbps > */ +#define ETH_SPEED_CAP_25G (1 << 9) /*< 25 Gbps > */ +#define ETH_SPEED_CAP_40G (1 << 10) /*< 40 Gbps > */ +#define ETH_SPEED_CAP_50G (1 << 11) /*< 50 Gbps > */ +#define ETH_SPEED_CAP_56G (1 << 12) /*< 56 Gbps > */ +#define ETH_SPEED_CAP_100G (1 << 13) /*< 100 Gbps > */ + + +/** + * Ethernet device information + */ struct rte_eth_dev_info { struct rte_pci_device *pci_dev; /**< Device PCI information. */ const char *driver_name; /**< Device Driver name. */ @@ -924,6 +947,7 @@ struct rte_eth_dev_info { uint16_t vmdq_queue_base; /**< First queue ID for VMDQ pools. */ uint16_t vmdq_queue_num; /**< Queue number for VMDQ pools. */ uint16_t vmdq_pool_base; /**< First ID of VMDQ pools. */ + uint16_t speed_capa; /**< Supported speeds bitmap. */ }; /** Maximum name length for extended statistics counters */ -- 2.1.4
[dpdk-dev] [RFC PATCH 0/2] ethdev: add port speed capability bitmap
The current rte_eth_dev_info abstraction does not provide any mechanism to know the supported speed(s) of an ethdev. For some drivers (e.g. ixgbe), an educated guess can be done based on the driver's name (driver_name in rte_eth_dev_info), see: http://dpdk.org/ml/archives/dev/2013-August/000412.html However, i) doing string comparisons is annoying, and can silently break existing applications if PMDs change their names ii) it does not provide all the supported capabilities of the ethdev iii) for some drivers it is impossible determine correctly the (max) speed by the application (e.g. in i40, distinguish between XL710 and X710). This small patch adds speed_capa bitmap in rte_eth_dev_info, which is filled by the PMDs according to the physical device capabilities. WARNING: the patch is only tested with e1000s, and should be reviewed for accuracy. Marc Sune (2): Added ETH_SPEED_CAP bitmap in rte_eth_dev_info Filling speed capability bitmaps in the PMDs lib/librte_ether/rte_ethdev.h | 24 lib/librte_pmd_e1000/em_ethdev.c| 6 ++ lib/librte_pmd_e1000/igb_ethdev.c | 6 ++ lib/librte_pmd_fm10k/fm10k_ethdev.c | 3 +++ lib/librte_pmd_i40e/i40e_ethdev.c | 9 + lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 10 ++ lib/librte_pmd_mlx4/mlx4.c | 6 ++ 7 files changed, 64 insertions(+) -- 2.1.4
[dpdk-dev] TX performance regression caused by the mbuf cachline split
Found a really simple solution that almost restores the original performance: just add a prefetch on alloc. For some reason, I assumed that this was already done since the troublesome commit I investigated mentioned something about prefetching... I guess the commit referred to the hardware prefetcher in the CPU. Adding an explicit prefetch command in the mbuf alloc function gives a throughput of 12.7/10.35 Mpps in my benchmark with the simple/full-featured tx path. DPDK 1.7.1 was at 14.1/10.7 Mpps. I guess I can live with that, since I'm primarily interested in the full-featured path and the drop from 10.7 to ~10.4 was due to another change. Patch: https://github.com/dpdk-org/dpdk/pull/2 I also sent an email to the mailing list. I also think that the rx-path could also benefit from prefetching somewhere. Paul
[dpdk-dev] [PATCH] prefetch second cacheline of mbufs on alloc
this improves the throughput of a simple tx-only application by 11% in the full-featured ixgbe tx path and by 14% in the simple tx path. --- lib/librte_mbuf/rte_mbuf.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index ab6de67..f6895b4 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -538,6 +538,7 @@ static inline struct rte_mbuf *__rte_mbuf_raw_alloc(struct rte_mempool *mp) if (rte_mempool_get(mp, &mb) < 0) return NULL; m = (struct rte_mbuf *)mb; + rte_prefetch0(&m->cacheline1); RTE_MBUF_ASSERT(rte_mbuf_refcnt_read(m) == 0); rte_mbuf_refcnt_set(m, 1); return (m); -- 1.9.1
[dpdk-dev] TX performance regression caused by the mbuf cachline split
Paul Emmerich: > I naively tried to move the pool pointer into the first cache line in > the v2.0.0 tag and the performance actually decreased, I'm not yet sure > why this happens. There are probably assumptions about the cacheline > locations and prefetching in the code that would need to be adjusted. This happens because the next-pointer in the mbuf is touched almost everywhere, even for mbufs with only one segment because it is used to determine if there is another segment (instead of using the nb_segs field). I guess a solution for me would be to use a custom layout that is optimized for tx. I can shrink ol_flags to 32 bits and move the seqn and hash fields to the second cache line. A quick-and-dirty test shows that this even gives me a slightly higher performance than DPDK 1.7 in the full-featured tx path. This is probably going to break the vector rx/tx path, but I can't use that anyways since I always need offloading features (timestamping and checksums). I'll have to see how this affects the rx path. But I value tx performance over rx performance. My rx logic is usually very simple. This solution is kind of ugly. I would prefer to be able to use an unmodified version of DPDK :/ By the way, I think there is something wrong with this assumption in commit f867492346bd271742dd34974e9cf8ac55ddb869: > The general approach that we are looking to take is to focus the first > cache line on fields that are updated on RX , so that receive only deals > with one cache line. I think this might be wrong due to the next pointer. I'll probably build a simple rx-only benchmark in a few weeks or so. I suspect that it will also be significantly slower. But that should be fixable. Paul