aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-dpdk/odp_packet_dpdk.c
AgeCommit message (Collapse)Author
2016-01-25linux-dpdk: packet_io: reuse linux-generic code and enable classificationZoltan Kiss
This patch reuses odp_packet_io.c and pktio/loop.c from linux-generic's codebase, and plugs the DPDK specific pieces from odp_packet_dpdk.c into that framework. In order to do that the following steps were taken: - sync up odp_packet_io_internal.h: this file is nearly the same, except we use only loop and our DPDK specific parts - move DPDK specific functionality to odp_packet_dpdk.c, and use those functions in dpdk_pktio_ops. The old pktio code will be deleted in a separate patch - enable classification in Makefiles and init: linux-generic code refers to that, that's why we can't do this in separate patches Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-12-21linux-dpdk: remove clang warningsv1.5.0.0_DPDK_2.2.0-rc1Zoltan Kiss
There is a type compatibility issue in recv_pkt_dpdk(), although it doesn't have an effect as both of them are pointers. The rte_mbuf accessor functions are bringing up alignment change warnings, which are false-positives in this case. These fields are defined with their appropriate type in the original structure, so their alignment is guaranteed, but the reason for these functions is to hide that structure. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-11-06linux-dpdk: move support target to DPDK 2.2.0-rc1Zoltan Kiss
- ixgbe vPMD now has lower requirement for recv burst - mlx5 supported Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-11-03linux-dpdk: packet_io: implement start and stop for pktiov1.3.0.0_DPDK_2.1.0Zoltan Kiss
The original implementation in 51226cbd 'Port 5176d3 "linux-generic: add pktio_start and pktio_stop"' was only an empty one, this patch use the relevant DPDK functions. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-10-20linux-dpdk: packet_io: merge received packet handling loopsZoltan Kiss
These two loops are going through the same set of packets, it's better to have them in one. Also move those two struct members adjacent to help optimization. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-09-10linux-dpdk: packet_io: fix max_rx_pkt_lenZoltan Kiss
seg_len might be 0, new unit tests are failing due to this issue. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-09-08linux-dpdk: packet: uplevel default RSS config to DPDK 2.0 conventionsv1.2.0.0_DPDK_2.1.0Bill Fischofer
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-09-08linux-dpdk: pktio: use default RX/TX configuration of the PMDsZoltan Kiss
It is more universal. Later on we should introduce a more flexible way for the applications to fine tune it. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Ciprian Barbu <ciprian.barbu@enea.com>
2015-09-02linux-dpdk: pktio: handle vector PMDsZoltan Kiss
The ixgbe PMD introduced vector operations on the RX path, and the plan is to change the other drivers into this direction as well. Unfortunately that means these new drivers mandate a minimum burst size for receive, otherwise they don't return any packets. As ODP can't impose such a requirement on applications, we have to deal with it during the receive function. Currently ixgbe requires 32 buffers, it is expected to change to 4 later on. The rest of the packets in the burst are dropped, and a debug message is printed. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-07-27linux-dpdk: packet_io: scale down descriptor numbers when pool is smallZoltan Kiss
Depending on the PMD the descriptor rings may need a buffer for each descriptor. And a pool is likely to be used for multiple interfaces. Scale down the descriptor numbers when they are more than a quarter of the pool. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-07-01linux-dpdk: update to enable compile on DPDK 1.8 through 2.0Bill Fischofer
* RTE_MBUF_SCATTER_GATHER is not optional anymore * delete some dead code * no need to call rte_eal_pci_probe() * struct rte_mbuf changed, that causes most of the changes here * RSS config changed Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-06-11pktio: fix promisc settingZoltan Kiss
19121fd264: "dpdk: pktio implement promisc mode on vdevs" forgets to set the value when PMD supports promisc change. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-06-09dpdk: pktio implement promisc mode on vdevsMaxim Uvarov
DPDK PMD vdev like pcap does not support switching promisc mode. Use system calls for corresponding devices. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-06-09dpdk: turn on jumbo framesMaxim Uvarov
Turn on jumbo frames and make odp pktio jumbo test pass. In case if pcap DPDK PMD is used to capture jumbo frames needed to aujust snap len from 4096 to max packet size, like this: ./drivers/net/pcap/rte_eth_pcap.c Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-06-09dpdk: implement port closeMaxim Uvarov
Implement port close and remove code to not init already inited ports. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> [Zoltan Kiss: fix checkpatch issues] Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-06-02packet_io: change default tx_free_threshZoltan Kiss
This value performs better with odp_l2fwd and OVS over 10Gb links. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-05-15linux-dpdk: packet: enable lazy parsingBill Fischofer
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> [Zoltan Kiss: added the hunk to delete old _odp_packet_parse definition from the previous patch]
2015-05-07setup_pkt_dpdk: validate device nameMaxim Uvarov
There is a test odp_pktio_open("notthere', ) which should return fail. If we use atoi() in that function we need to validate if dev name has only digits. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> [zoltan.kiss@linaro.org: improved the subject and message a bit] Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-05-07setup_pkt_dpdk: return if error happenedMaxim Uvarov
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> [zoltan.kiss@linaro.org: improved the subject a bit] Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-04-28packet_io: use one queue per deviceZoltan Kiss
Set up the devices with only one queue when opened. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-04-23pktio: remove send_pkt_dpdk()Zoltan Kiss
Apart from calling rte_eth_tx_burst the only thing it does is to copy the pkt_table[] array into an another one. As far as I can determine DPDK doesn't touch this array of pointers, so it's not necessary to copy it. I've merged the rest of it into odp_pktio_send() Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-03-17ODP-DPDK: Fix code style changesZoltan Kiss
Ran checkpatch on platform/linux-dpdk to fix up some accumulated code style problems, mostly indentation. This patch doesn't contain any functional changes. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>
2015-03-17pktio: add strong typing supportVenkatesh Vivekanandan
- Fixes the compilation error due to introduction of strong typing. Port of a2fdaa2e Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org>
2015-03-17api: cpu: odp_sys_core_count() is obsoleted. Getting cpu count using ↵Venkatesh Vivekanandan
odp_cpu_count - odp_linux.c doesn't need header file odp/api/cpu.h, as this is internally included from odp/helper/linux.h Port of 4feec768 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org>
2015-03-17api: pool: Rename odp_buffer_pool_ to odp_pool_Venkatesh Vivekanandan
Ported from 939a0233 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org>
2015-03-04DPDK: Follow up the header renamings and movesZoltan Kiss
- api/odp_*.h -> odp/*.h - odp and odp/plat in linux-generic/include - odph_*.h -> odp/helper/*.h - coremask -> cpumask - new api impementations from linux-generic: errno, event, version Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>
2015-03-02packet_dpdk: Fixing up setup_pkt_dpdkZoltan Kiss
- fixing debug messages - generate socket_id properly - enable multicast and promiscuous mode by default Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-03-02packet_dpdk: Adjust default port config for OVS-DPDKZoltan Kiss
This is copying the config of the OVS-DPDK implementation. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-02-27DPDK: Add required headers and remove some stale includesZoltan Kiss
Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-02-27api: move internal debug macrosZoltan Kiss
Porting commit from linux-generic (f158) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2014-10-09linux-dpdk: Rework buffer managementCiprian Barbu
Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> Reviewed-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>
2014-10-06Revert "git split: delete dpdk"Venkatesh Vivekanandan
This reverts commit d8cda8b0f395d00902a50690fee3679f65780013.
2014-10-01git split: delete dpdkMaxim Uvarov
Dpdk will be developed and supported in different git repo: https://git.linaro.org/lng/odp-dpdk.git Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2014-08-07ODP-DPDK multi-queue supportVenkatesh Vivekanandan
- Multi queue support per interface is enabled. - odp_pktio_send with "0" packet is called in odp_pktio_recv to give the transmitted buffers back to mempool. - mbuf alloc failure during receive is fixed by giving more buffers to mempool. - mempool cache size is given equivalent to MAX_PKT_BURST. Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>
2014-07-23Initial ODP-DPDK portVincent Hsu
- Pulled necessary files from platform/linux-generic into platform/linux-dpdk - Made necessary changes in files to get it compiled with dpdk library for eg., * odp_buffer_hdr_t is mapped to struct rte_mbuf * All odp_buffer_* maps to rte_* in dpdk * necessary initialisations like odp_init_dpdk * All packet related changes in odp_packet.c and odp_packet_io.c * dpdk support in odp_packet_dpdk.c Signed-off-by: Vincent Hsu <vincent.hsu@linaro.org> - Add/modify files to support linux-dpdk compilation in new automake environment. * Modified configure.ac * Added platform/linux-dpdk/Makefile.am * Moved all files from platform/linux-dpdk/source to platform/linux-dpdk/. - Added platform/linux-dpdk/README on how to clone, compile DPDK and commands to execute on ODP. - Made ODP_BUFFER_<TYPES> consistent with linux-generic. - Removed odp_buffer_is_scatter API to be inline with linux-generic. - Added platform/linux-dpdk/odp_linux.c to supply the function and argument to the pthread created by dpdk. Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>