[dpdk-dev] [PATCH] doc: announce API change for virtual device initialization
Hey folks, > On 28 Jul 2016, at 17:47, De Lara Guarch, Pablo intel.com> wrote: > Fair enough. So you mean to use rte_eth_dev_attach in ethdev library and > a similar function in cryptodev library? There is a rte_eth_dev_get_port_by_name() which gets the port id right after the rte_eal_vdev_init() call. You might consider the same for the crypto... Regards, Andriy
[dpdk-dev] [dpdk-announce] DPDK 16.07 released
On behalf of contributors, thank you so much all the reviewers, maintainers and un tr?s grand merci ? Thomas for your great job, help and patience ;) Regards, Andriy > On 28 Jul 2016, at 23:39, Thomas Monjalon > wrote: > > Once again, a great release from the impressive DPDK community: >http://fast.dpdk.org/rel/dpdk-16.07.tar.xz > > The statistics are awesome: >955 patches from 115 authors >839 files changed, 127162 insertions(+), 24668 deletions(-) > > There are 50 new contributors > (including authors, reviewers and testers): > Thanks to Adam Bynes, Ajit Khaparde, Akhil Goyal, Alex Wang, > Amin Tootoonchian, Anupam Kapoor, Bj?rn T?pel, Chaeyong Chong, > David Christensen, Dmitriy Yakovlev, Dumitru Ceara, Eoin Breen, > Fengtian Guo, Guruprasad Mukundarao, Hiroyuki Mikita, Ian Stokes, > Ido Barnea, Jeff Guo, John Guzik, Juan Antonio Montesinos, > Juhamatti Kuusisaari, Maxime Coquelin, Michael Habibi, Nikhil Rao, > Patrik Andersson, Radoslaw Biernacki, Raslan Darawsheh, Ricardo Salveti, > Ricky Li, Ronghua Zhang, Sameh Gobriel, Sankar Chokkalingam, > Sergey Dyasly, Shreyansh Jain, Slawomir Rosek, Sony Chacko, Stephen Hurd, > Thadeu Lima de Souza Cascardo, Thomas Petazzoni, Tiwei Bie, > Vasily Philipov, Vincent Li, Wei Dai, WeiJie Zhuang, Wei Shen, > Xiaoban Wu, Xueqin Lin, Yari Adan Petralanda, Yongseok Koh, Zyta Szpak. > > These new contributors are associated with these domain names: > 6wind.com, awakenetworks.com, broadcom.com, caviumnetworks.com, > cisco.com, coriant.com, ericsson.com, free-electrons.com, gmail.com, > berkeley.edu, intel.com, linaro.org, mellanox.com, nxp.com, outlook.com, > qlogic.com, redhat.com, samsung.com, schaman.hu, semihalf.com, > shieldxnetworks.com, uml.edu, vmware.com. > > Some highlights: >* mempool reworked >* KASUMI crypto >* driver bnxt >* driver for ThunderX >* virtio for POWER8 >* virtio-user for containers >* vhost-user client mode >* packet capture framework > > More details in the release notes: >http://dpdk.org/doc/guides/rel_notes/release_16_07.html > > The new features for the 16.11 cycle must be submitted before August 28. > The features properly reviewed and approved before October will be part > of the next release which will be a bit shorter (3 months) than before. > > If you read until this line, please take few more minutes to fill out > this survey: http://surveymonkey.com/r/DPDK_Community_Survey > > Thanks everyone
[dpdk-dev] [PATCH] doc: fix old dpdk-nic-bind.py references
dpdk-nic-bind.py script has been renamed to dpdk-devbind.py, but some references to the old script have remained. This commit completes the renaming. Fixes: a5d7a3f77ddc ("unify tools naming") Signed-off-by: Pablo de Lara --- doc/guides/howto/flow_bifurcation.rst | 8 doc/guides/howto/lm_bond_virtio_sriov.rst | 8 doc/guides/howto/lm_virtio_vhost_user.rst | 16 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/doc/guides/howto/flow_bifurcation.rst b/doc/guides/howto/flow_bifurcation.rst index a1c6262..0d7226a 100644 --- a/doc/guides/howto/flow_bifurcation.rst +++ b/doc/guides/howto/flow_bifurcation.rst @@ -119,8 +119,8 @@ The typical procedure to achieve this is as follows: .. code-block:: console modprobe vfio-pci - dpdk_nic_bind.py -b vfio-pci 01:10.0 - dpdk_nic_bind.py -b vfio-pci 01:10.1 + dpdk-devbind.py -b vfio-pci 01:10.0 + dpdk-devbind.py -b vfio-pci 01:10.1 #. Run a DPDK application on the VFs: @@ -279,8 +279,8 @@ The typical procedure to achieve this is as follows: .. code-block:: console modprobe vfio-pci - dpdk_nic_bind.py -b vfio-pci 01:10.0 - dpdk_nic_bind.py -b vfio-pci 01:10.1 + dpdk-devbind.py -b vfio-pci 01:10.0 + dpdk-devbind.py -b vfio-pci 01:10.1 #. run DPDK application on VFs: diff --git a/doc/guides/howto/lm_bond_virtio_sriov.rst b/doc/guides/howto/lm_bond_virtio_sriov.rst index 49666f1..9bc3450 100644 --- a/doc/guides/howto/lm_bond_virtio_sriov.rst +++ b/doc/guides/howto/lm_bond_virtio_sriov.rst @@ -613,17 +613,17 @@ Set up DPDK in the Virtual Machine cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages ifconfig -a - /root/dpdk/tools/dpdk_nic_bind.py --status + /root/dpdk/tools/dpdk-devbind.py --status rmmod virtio-pci ixgbevf modprobe uio insmod /root/dpdk/x86_64-default-linuxapp-gcc/kmod/igb_uio.ko - /root/dpdk/tools/dpdk_nic_bind.py -b igb_uio :00:03.0 - /root/dpdk/tools/dpdk_nic_bind.py -b igb_uio :00:04.0 + /root/dpdk/tools/dpdk-devbind.py -b igb_uio :00:03.0 + /root/dpdk/tools/dpdk-devbind.py -b igb_uio :00:04.0 - /root/dpdk/tools/dpdk_nic_bind.py --status + /root/dpdk/tools/dpdk-devbind.py --status run_testpmd_bonding_in_vm.sh diff --git a/doc/guides/howto/lm_virtio_vhost_user.rst b/doc/guides/howto/lm_virtio_vhost_user.rst index fad1f2a..4937781 100644 --- a/doc/guides/howto/lm_virtio_vhost_user.rst +++ b/doc/guides/howto/lm_virtio_vhost_user.rst @@ -91,14 +91,14 @@ For Fortville NIC. .. code-block:: console cd /root/dpdk/tools - ./dpdk_nic_bind.py -b igb_uio :02:00.0 + ./dpdk-devbind.py -b igb_uio :02:00.0 For Niantic NIC. .. code-block:: console cd /root/dpdk/tools - ./dpdk_nic_bind.py -b igb_uio :09:00.0 + ./dpdk-devbind.py -b igb_uio :09:00.0 On host_server_1: Terminal 3 @@ -172,14 +172,14 @@ For Fortville NIC. .. code-block:: console cd /root/dpdk/tools - ./dpdk_nic_bind.py -b igb_uio :03:00.0 + ./dpdk-devbind.py -b igb_uio :03:00.0 For Niantic NIC. .. code-block:: console cd /root/dpdk/tools - ./dpdk_nic_bind.py -b igb_uio :06:00.0 + ./dpdk-devbind.py -b igb_uio :06:00.0 On host_server_2: Terminal 3 @@ -444,17 +444,17 @@ setup_dpdk_virtio_in_vm.sh cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages ifconfig -a - /root/dpdk/tools/dpdk_nic_bind.py --status + /root/dpdk/tools/dpdk-devbind.py --status rmmod virtio-pci modprobe uio insmod /root/dpdk/x86_64-default-linuxapp-gcc/kmod/igb_uio.ko - /root/dpdk/tools/dpdk_nic_bind.py -b igb_uio :00:03.0 - /root/dpdk/tools/dpdk_nic_bind.py -b igb_uio :00:04.0 + /root/dpdk/tools/dpdk-devbind.py -b igb_uio :00:03.0 + /root/dpdk/tools/dpdk-devbind.py -b igb_uio :00:04.0 - /root/dpdk/tools/dpdk_nic_bind.py --status + /root/dpdk/tools/dpdk-devbind.py --status run_testpmd_in_vm.sh -- 2.7.4
[dpdk-dev] [PATCH 2/2] app/testpmd: fix handling of multiprocess
Added lookup for pool name because secondary process should attach to mempool created by primary process rather than create new. Added function free_mp_shared_dev_data() which causes that if secondary process quit or force quit then detach own devices from common array rte_eth_dev_data[] for all processes. This allows to have a up-to-date list of devices and run again secondary application with the same name. Signed-off-by: Marcin Kerlin --- app/test-pmd/testpmd.c | 30 -- app/test-pmd/testpmd.h | 1 + 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 1428974..2fa33d0 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -453,8 +453,10 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf, rte_mempool_obj_iter(rte_mp, rte_pktmbuf_init, NULL); } else { /* wrapper to rte_mempool_create() */ - rte_mp = rte_pktmbuf_pool_create(pool_name, nb_mbuf, - mb_mempool_cache, 0, mbuf_seg_size, socket_id); + rte_mp = rte_mempool_lookup(pool_name); + if (rte_mp == NULL) + rte_mp = rte_pktmbuf_pool_create(pool_name, nb_mbuf, + mb_mempool_cache, 0, mbuf_seg_size, socket_id); } } @@ -1610,6 +1612,29 @@ detach_port(uint8_t port_id) return; } +void free_mp_shared_dev_data(portid_t pid) +{ + portid_t pi; + + if (port_id_is_invalid(pid, ENABLED_WARN)) + return; + + /* free data only if the secondary process exits */ + if (rte_eal_process_type() != RTE_PROC_SECONDARY) + return; + + FOREACH_PORT(pi, ports) { + if (pid != pi && pid != (portid_t)RTE_PORT_ALL) + continue; + + if (!port_is_closed(pi)) + return; + + if (rte_eth_dev_release_dev_data(pi) < 0) + return; + } +} + void pmd_test_exit(void) { @@ -1625,6 +1650,7 @@ pmd_test_exit(void) fflush(stdout); stop_port(pt_id); close_port(pt_id); + free_mp_shared_dev_data(pt_id); } } printf("\nBye...\n"); diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index 2b281cc..63f82f7 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -553,6 +553,7 @@ void attach_port(char *identifier); void detach_port(uint8_t port_id); int all_ports_stopped(void); int port_is_started(portid_t port_id); +void free_mp_shared_dev_data(portid_t pid); void pmd_test_exit(void); void fdir_get_infos(portid_t port_id); void fdir_set_flex_mask(portid_t port_id, -- 1.9.1
[dpdk-dev] [PATCH 1/2] lib/librte_ether: ensure not overwrite device data
Added ensure consistent device data in the multiprocess application. Primary process creates array rte_eth_dev_data[] and secondary process appends in the first free place rather than at the beginning. This behavior prevents overwriting devices of primary process by secondary process. Two arrays rte_eth_dev_data[] and rte_eth_devices[] are shifted relative to each other and it required the addition new functions to search separately data. Signed-off-by: Marcin Kerlin --- lib/librte_ether/rte_ethdev.c | 87 ++ lib/librte_ether/rte_ethdev.h | 23 + lib/librte_ether/rte_ether_version.map | 8 3 files changed, 110 insertions(+), 8 deletions(-) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index f62a9ec..a8f89c9 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -177,6 +177,19 @@ rte_eth_dev_allocated(const char *name) return NULL; } +struct rte_eth_dev_data * +rte_eth_dev_data_shared_allocated(const char *name) +{ + unsigned i; + + for (i = 0; i < RTE_MAX_ETHPORTS; i++) { + if (strcmp(rte_eth_dev_data[i].name, name) == 0) + return _eth_dev_data[i]; + } + + return NULL; +} + static uint8_t rte_eth_dev_find_free_port(void) { @@ -189,10 +202,43 @@ rte_eth_dev_find_free_port(void) return RTE_MAX_ETHPORTS; } +static uint8_t +rte_eth_dev_find_free_dev_data_id(void) +{ + unsigned i; + + for (i = 0; i < RTE_MAX_ETHPORTS; i++) { + if (!strlen(rte_eth_dev_data[i].name)) + return i; + } + return RTE_MAX_ETHPORTS; +} + +int +rte_eth_dev_release_dev_data(uint8_t port_id) +{ + char device[RTE_ETH_NAME_MAX_LEN]; + struct rte_eth_dev_data *eth_dev_data = NULL; + + /* get device name by port id */ + if (rte_eth_dev_get_name_by_port(port_id, device)) + return -EINVAL; + + /* look for an entry in the shared device data */ + eth_dev_data = rte_eth_dev_data_shared_allocated(device); + if (eth_dev_data == NULL) + return -EINVAL; + + /* clear an entry in the shared device data */ + memset(eth_dev_data, 0, sizeof(struct rte_eth_dev_data)); + + return 0; +} + struct rte_eth_dev * rte_eth_dev_allocate(const char *name, enum rte_eth_dev_type type) { - uint8_t port_id; + uint8_t port_id, dev_data_id; struct rte_eth_dev *eth_dev; port_id = rte_eth_dev_find_free_port(); @@ -204,14 +250,28 @@ rte_eth_dev_allocate(const char *name, enum rte_eth_dev_type type) if (rte_eth_dev_data == NULL) rte_eth_dev_data_alloc(); + dev_data_id = rte_eth_dev_find_free_dev_data_id(); + + if (dev_data_id == RTE_MAX_ETHPORTS) { + RTE_PMD_DEBUG_TRACE("Reached maximum number of Ethernet ports by all " + "the processes\n"); + return NULL; + } + if (rte_eth_dev_allocated(name) != NULL) { RTE_PMD_DEBUG_TRACE("Ethernet Device with name %s already allocated!\n", name); return NULL; } + if (rte_eth_dev_data_shared_allocated(name) != NULL) { + RTE_PMD_DEBUG_TRACE("Ethernet Device with name %s already allocated by " + "another process!\n", name); + return NULL; + } + eth_dev = _eth_devices[port_id]; - eth_dev->data = _eth_dev_data[port_id]; + eth_dev->data = _eth_dev_data[dev_data_id]; snprintf(eth_dev->data->name, sizeof(eth_dev->data->name), "%s", name); eth_dev->data->port_id = port_id; eth_dev->attached = DEV_ATTACHED; @@ -237,6 +297,7 @@ rte_eth_dev_create_unique_device_name(char *name, size_t size, int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev) { + if (eth_dev == NULL) return -EINVAL; @@ -418,9 +479,7 @@ rte_eth_dev_get_name_by_port(uint8_t port_id, char *name) return -EINVAL; } - /* shouldn't check 'rte_eth_devices[i].data', -* because it might be overwritten by VDEV PMD */ - tmp = rte_eth_dev_data[port_id].name; + tmp = rte_eth_devices[port_id].data->name; strcpy(name, tmp); return 0; } @@ -439,9 +498,7 @@ rte_eth_dev_get_port_by_name(const char *name, uint8_t *port_id) for (i = 0; i < RTE_MAX_ETHPORTS; i++) { - if (!strncmp(name, - rte_eth_dev_data[i].name, strlen(name))) { - + if (!strncmp(name, rte_eth_devices[i].data->name, strlen(name))) { *port_id = i; return 0; @@ -632,6 +689,8 @@ int rte_eth_dev_detach(uint8_t port_id, char *name) { struct rte_pci_addr addr; + struct rte_eth_dev_data *eth_dev_data = NULL; + char
[dpdk-dev] [PATCH 0/2] add ensure consistent device data in multiprocess mode
This patch ensure not overwrite device data in the multiprocess application. 1)Changes in the library introduces continuity in device data rte_eth_dev_data[] common for to all processes. Functionality detach cleans data of detachable device and leaves space for other devices or for the next run app. 2)Changes in application testpmd allow secondary process to attach the mempool created by primary process rather than create new and in the case of quit or force quit to free devices of this process from shared array rte_eth_dev_data[]. Marcin Kerlin (2): lib/librte_ether: ensure not overwrite device data in multiprocess app app/testpmd: fix handling of multiprocess app/test-pmd/testpmd.c | 30 +++- app/test-pmd/testpmd.h | 1 + lib/librte_ether/rte_ethdev.c | 87 ++ lib/librte_ether/rte_ethdev.h | 23 + lib/librte_ether/rte_ether_version.map | 8 5 files changed, 139 insertions(+), 10 deletions(-) -- 1.9.1
[dpdk-dev] [PATCH v2] log: remove history dump
On Fri, Jul 29, 2016 at 3:50 PM, Thomas Monjalon wrote: > The log history feature was deprecated in 16.07. > The remaining empty functions are removed in 16.11. > > Signed-off-by: Thomas Monjalon > --- > v2: fix LIBABIVER and compilation of test Thanks Thomas. Acked-by: David Marchand -- David Marchand
[dpdk-dev] [PATCH v2] net/i40e: fix Rx statistic inconsistent
rx_good_bytes and rx_good_packets statistic is inconsistent when port stopped,ipackets statistic is minus the discard packets but rx_bytes statistic not.Also,i40e has no statistic of discard bytes, so we have to delete discard packets item from rx_good_packets statistic. Fixes: 9aace75fc82e ("i40e: fix statistics") Signed-off-by: Wei Zhao1 --- drivers/net/i40e/i40e_ethdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 11a5804..553dfd9 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -2319,8 +2319,7 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) stats->ipackets = pf->main_vsi->eth_stats.rx_unicast + pf->main_vsi->eth_stats.rx_multicast + - pf->main_vsi->eth_stats.rx_broadcast - - pf->main_vsi->eth_stats.rx_discards; + pf->main_vsi->eth_stats.rx_broadcast; stats->opackets = pf->main_vsi->eth_stats.tx_unicast + pf->main_vsi->eth_stats.tx_multicast + pf->main_vsi->eth_stats.tx_broadcast; -- 2.5.5
[dpdk-dev] [PATCH v2] log: remove history dump
The log history feature was deprecated in 16.07. The remaining empty functions are removed in 16.11. Signed-off-by: Thomas Monjalon --- v2: fix LIBABIVER and compilation of test --- app/test/test.h | 5 +++- doc/guides/rel_notes/deprecation.rst| 3 --- doc/guides/rel_notes/release_16_11.rst | 4 +++- lib/librte_eal/bsdapp/eal/Makefile | 2 +- lib/librte_eal/common/eal_common_log.c | 19 --- lib/librte_eal/common/include/rte_log.h | 41 - lib/librte_eal/linuxapp/eal/Makefile| 2 +- 7 files changed, 9 insertions(+), 67 deletions(-) diff --git a/app/test/test.h b/app/test/test.h index 467b9c0..74d6021 100644 --- a/app/test/test.h +++ b/app/test/test.h @@ -33,9 +33,12 @@ #ifndef _TEST_H_ #define _TEST_H_ + #include #include -#include "rte_log.h" + +#include +#include #define TEST_SUCCESS (0) #define TEST_FAILED (-1) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 8263d03..96db661 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -8,9 +8,6 @@ API and ABI deprecation notices are to be posted here. Deprecation Notices --- -* The log history is deprecated. - It is voided in 16.07 and will be removed in release 16.11. - * The ethdev library file will be renamed from libethdev.* to librte_ethdev.* in release 16.11 in order to have a more consistent namespace. diff --git a/doc/guides/rel_notes/release_16_11.rst b/doc/guides/rel_notes/release_16_11.rst index a6e3307..0b9022d 100644 --- a/doc/guides/rel_notes/release_16_11.rst +++ b/doc/guides/rel_notes/release_16_11.rst @@ -94,6 +94,8 @@ API Changes This section is a comment. Make sure to start the actual text at the margin. +* The log history is removed. + ABI Changes --- @@ -131,7 +133,7 @@ The libraries prepended with a plus sign were incremented in this version. librte_cmdline.so.2 librte_cryptodev.so.1 librte_distributor.so.1 - librte_eal.so.2 + + librte_eal.so.3 librte_hash.so.2 librte_ip_frag.so.1 librte_ivshmem.so.1 diff --git a/lib/librte_eal/bsdapp/eal/Makefile b/lib/librte_eal/bsdapp/eal/Makefile index 988cbbc..7a0fea5 100644 --- a/lib/librte_eal/bsdapp/eal/Makefile +++ b/lib/librte_eal/bsdapp/eal/Makefile @@ -48,7 +48,7 @@ LDLIBS += -lgcc_s EXPORT_MAP := rte_eal_version.map -LIBABIVER := 2 +LIBABIVER := 3 # specific to linuxapp exec-env SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) := eal.c diff --git a/lib/librte_eal/common/eal_common_log.c b/lib/librte_eal/common/eal_common_log.c index 7916c78..967991a 100644 --- a/lib/librte_eal/common/eal_common_log.c +++ b/lib/librte_eal/common/eal_common_log.c @@ -64,19 +64,6 @@ static RTE_DEFINE_PER_LCORE(struct log_cur_msg, log_cur_msg); /* default logs */ -int -rte_log_add_in_history(const char *buf __rte_unused, size_t size __rte_unused) -{ - return 0; -} - -void -rte_log_set_history(int enable) -{ - if (enable) - RTE_LOG(WARNING, EAL, "The log history is deprecated.\n"); -} - /* Change the stream that will be used by logging system */ int rte_openlog_stream(FILE *f) @@ -131,12 +118,6 @@ int rte_log_cur_msg_logtype(void) return RTE_PER_LCORE(log_cur_msg).logtype; } -/* Dump log history to file */ -void -rte_log_dump_history(FILE *out __rte_unused) -{ -} - /* * Generates a log message The message will be sent in the stream * defined by the previous call to rte_openlog_stream(). diff --git a/lib/librte_eal/common/include/rte_log.h b/lib/librte_eal/common/include/rte_log.h index b1add04..919563c 100644 --- a/lib/librte_eal/common/include/rte_log.h +++ b/lib/librte_eal/common/include/rte_log.h @@ -42,8 +42,6 @@ * This file provides a log API to RTE applications. */ -#include "rte_common.h" /* for __rte_deprecated macro */ - #ifdef __cplusplus extern "C" { #endif @@ -181,45 +179,6 @@ int rte_log_cur_msg_loglevel(void); int rte_log_cur_msg_logtype(void); /** - * @deprecated - * Enable or disable the history (enabled by default) - * - * @param enable - * true to enable, or 0 to disable history. - */ -__rte_deprecated -void rte_log_set_history(int enable); - -/** - * @deprecated - * Dump the log history to a file - * - * @param f - * A pointer to a file for output - */ -__rte_deprecated -void rte_log_dump_history(FILE *f); - -/** - * @deprecated - * Add a log message to the history. - * - * This function can be called from a user-defined log stream. It adds - * the given message in the history that can be dumped using - * rte_log_dump_history(). - * - * @param buf - * A data buffer containing the message to be saved in the history. - * @param size - * The length of the data buffer. - * @return - * - 0: Success. - * - (-ENOBUFS) if there is no room to store the message. - */ -__rte_deprecated -int rte_log_add_in_history(const char *buf, size_t size); - -/** * Generates a
[dpdk-dev] [PATCH] doc: postpone mempool ABI breakage
It was planned to remove some mempool functions which are deprecated since 16.07. As no other mempool ABI change is planned in 16.11, it is better to postpone and group every mempool ABI changes in 17.02. Signed-off-by: Thomas Monjalon --- doc/guides/rel_notes/deprecation.rst | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 1b953fe..96db661 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -41,15 +41,14 @@ Deprecation Notices PKT_RX_QINQ_STRIPPED, that are better described. The old flags and their behavior will be kept in 16.07 and will be removed in 16.11. -* The APIs rte_mempool_count and rte_mempool_free_count are being deprecated - on the basis that they are confusing to use - free_count actually returns - the number of allocated entries, not the number of free entries as expected. - They are being replaced by rte_mempool_avail_count and - rte_mempool_in_use_count respectively. +* mempool: The functions ``rte_mempool_count`` and ``rte_mempool_free_count`` + will be removed in 17.02. + They are replaced by ``rte_mempool_avail_count`` and + ``rte_mempool_in_use_count`` respectively. -* The mempool functions for single/multi producer/consumer are deprecated and - will be removed in 16.11. - It is replaced by rte_mempool_generic_get/put functions. +* mempool: The functions for single/multi producer/consumer are deprecated + and will be removed in 17.02. + It is replaced by ``rte_mempool_generic_get/put`` functions. * The ``rte_ivshmem`` feature (including library and EAL code) will be removed in 16.11 because it has some design issues which are not planned to be fixed. -- 2.7.0
[dpdk-dev] [PATCH v3] i40: fix the VXLAN TSO issue
Hi, On 7/18/2016 7:56 PM, Zhe Tao wrote: > Problem: > When using the TSO + VXLAN feature in i40e, the outer UDP length fields in > the multiple UDP segments which are TSOed by the i40e will have a > wrong value. > > Fix this problem by adding the tunnel type field in the i40e descriptor > which was missed before. > > Fixes: 77b8301733c3 ("i40e: VXLAN Tx checksum offload") > > Signed-off-by: Zhe Tao > --- > v2: edited the comments > v3: added external IP offload flag when TSO is enabled for tunnelling packets > > app/test-pmd/csumonly.c | 29 + > drivers/net/i40e/i40e_rxtx.c | 12 +--- > lib/librte_mbuf/rte_mbuf.h | 16 +++- > 3 files changed, 45 insertions(+), 12 deletions(-) > ... > diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h > index 15e3a10..90812ea 100644 > --- a/lib/librte_mbuf/rte_mbuf.h > +++ b/lib/librte_mbuf/rte_mbuf.h > @@ -133,6 +133,17 @@ extern "C" { > /* add new TX flags here */ > > /** > + * Bits 45:48 used for the tunnel type. > + * When doing Tx offload like TSO or checksum, the HW needs to configure the > + * tunnel type into the HW descriptors. > + */ > +#define PKT_TX_TUNNEL_VXLAN (1ULL << 45) > +#define PKT_TX_TUNNEL_GRE (2ULL << 45) > +#define PKT_TX_TUNNEL_IPIP(3ULL << 45) > +/* add new TX TUNNEL type here */ > +#define PKT_TX_TUNNEL_MASK(0xFULL << 45) > + Above flag bits are added so that i40e driver can tell tunnel type of this packet (udp or gre or ipip), just interested to know how about just do a simple analysis like below without introducing these flags? if outer_ether.proto == ipv4 l4_proto = ipv4_hdr->next_proto; else outer_ether.proto == ipv6 l4_proto = ipv6_hdr->next_proto; switch (l4_proto) case ipv4: case ipv6: tunnel_type = ipip; break; case udp: tunnel_type = udp; break; case gre: tunnel_type = gre; break; default: error; Thanks, Jianfeng > +/** >* Second VLAN insertion (QinQ) flag. >*/ > #define PKT_TX_QINQ_PKT(1ULL << 49) /**< TX packet with double VLAN > inserted. */ > @@ -867,7 +878,10 @@ struct rte_mbuf { > union { > uint64_t tx_offload; /**< combined for easy fetch */ > struct { > - uint64_t l2_len:7; /**< L2 (MAC) Header Length. */ > + uint64_t l2_len:7; > + /**< L2 (MAC) Header Length if it isn't a tunneling pkt. > + * for tunnel it is outer L4 len+tunnel len+inner L2 len > + */ > uint64_t l3_len:9; /**< L3 (IP) Header Length. */ > uint64_t l4_len:8; /**< L4 (TCP/UDP) Header Length. */ > uint64_t tso_segsz:16; /**< TCP TSO segment size */
[dpdk-dev] [PATCH] log: remove history dump
The log history feature was deprecated in 16.07. The remaining empty functions are removed in 16.11. Signed-off-by: Thomas Monjalon --- doc/guides/rel_notes/deprecation.rst| 3 --- doc/guides/rel_notes/release_16_11.rst | 4 +++- lib/librte_eal/common/eal_common_log.c | 19 --- lib/librte_eal/common/include/rte_log.h | 41 - 4 files changed, 3 insertions(+), 64 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index d2dc4a9..1b953fe 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -8,9 +8,6 @@ API and ABI deprecation notices are to be posted here. Deprecation Notices --- -* The log history is deprecated. - It is voided in 16.07 and will be removed in release 16.11. - * The ethdev library file will be renamed from libethdev.* to librte_ethdev.* in release 16.11 in order to have a more consistent namespace. diff --git a/doc/guides/rel_notes/release_16_11.rst b/doc/guides/rel_notes/release_16_11.rst index a6e3307..0b9022d 100644 --- a/doc/guides/rel_notes/release_16_11.rst +++ b/doc/guides/rel_notes/release_16_11.rst @@ -94,6 +94,8 @@ API Changes This section is a comment. Make sure to start the actual text at the margin. +* The log history is removed. + ABI Changes --- @@ -131,7 +133,7 @@ The libraries prepended with a plus sign were incremented in this version. librte_cmdline.so.2 librte_cryptodev.so.1 librte_distributor.so.1 - librte_eal.so.2 + + librte_eal.so.3 librte_hash.so.2 librte_ip_frag.so.1 librte_ivshmem.so.1 diff --git a/lib/librte_eal/common/eal_common_log.c b/lib/librte_eal/common/eal_common_log.c index 7916c78..967991a 100644 --- a/lib/librte_eal/common/eal_common_log.c +++ b/lib/librte_eal/common/eal_common_log.c @@ -64,19 +64,6 @@ static RTE_DEFINE_PER_LCORE(struct log_cur_msg, log_cur_msg); /* default logs */ -int -rte_log_add_in_history(const char *buf __rte_unused, size_t size __rte_unused) -{ - return 0; -} - -void -rte_log_set_history(int enable) -{ - if (enable) - RTE_LOG(WARNING, EAL, "The log history is deprecated.\n"); -} - /* Change the stream that will be used by logging system */ int rte_openlog_stream(FILE *f) @@ -131,12 +118,6 @@ int rte_log_cur_msg_logtype(void) return RTE_PER_LCORE(log_cur_msg).logtype; } -/* Dump log history to file */ -void -rte_log_dump_history(FILE *out __rte_unused) -{ -} - /* * Generates a log message The message will be sent in the stream * defined by the previous call to rte_openlog_stream(). diff --git a/lib/librte_eal/common/include/rte_log.h b/lib/librte_eal/common/include/rte_log.h index b1add04..919563c 100644 --- a/lib/librte_eal/common/include/rte_log.h +++ b/lib/librte_eal/common/include/rte_log.h @@ -42,8 +42,6 @@ * This file provides a log API to RTE applications. */ -#include "rte_common.h" /* for __rte_deprecated macro */ - #ifdef __cplusplus extern "C" { #endif @@ -181,45 +179,6 @@ int rte_log_cur_msg_loglevel(void); int rte_log_cur_msg_logtype(void); /** - * @deprecated - * Enable or disable the history (enabled by default) - * - * @param enable - * true to enable, or 0 to disable history. - */ -__rte_deprecated -void rte_log_set_history(int enable); - -/** - * @deprecated - * Dump the log history to a file - * - * @param f - * A pointer to a file for output - */ -__rte_deprecated -void rte_log_dump_history(FILE *f); - -/** - * @deprecated - * Add a log message to the history. - * - * This function can be called from a user-defined log stream. It adds - * the given message in the history that can be dumped using - * rte_log_dump_history(). - * - * @param buf - * A data buffer containing the message to be saved in the history. - * @param size - * The length of the data buffer. - * @return - * - 0: Success. - * - (-ENOBUFS) if there is no room to store the message. - */ -__rte_deprecated -int rte_log_add_in_history(const char *buf, size_t size); - -/** * Generates a log message. * * The message will be sent in the stream defined by the previous call -- 2.7.0
[dpdk-dev] [PATCH] ivshmem: remove integration in dpdk
Following discussions on the mailing list [1] and since nobody stood up to implement the necessary cleanups, here is the ivshmem integration removal. There is not much to say about this patch, a lot of code is being removed. The default configuration file for packet_ordering example is replaced with the "native" x86 file. The only tricky part is in eal_memory with the memseg index stuff. More cleanups can be done after this but will come in subsequent patchsets. [1]: http://dpdk.org/ml/archives/dev/2016-June/040844.html Signed-off-by: David Marchand --- MAINTAINERS | 8 - app/test/Makefile| 1 - app/test/autotest_data.py| 6 - app/test/test.c | 3 - app/test/test.h | 1 - app/test/test_ivshmem.c | 433 config/defconfig_arm64-armv8a-linuxapp-gcc | 1 - config/defconfig_x86_64-ivshmem-linuxapp-gcc | 49 -- config/defconfig_x86_64-ivshmem-linuxapp-icc | 49 -- doc/api/doxy-api-index.md| 1 - doc/api/doxy-api.conf| 1 - doc/api/examples.dox | 2 - doc/guides/linux_gsg/build_dpdk.rst | 2 +- doc/guides/linux_gsg/quick_start.rst | 14 +- doc/guides/prog_guide/img/ivshmem.png| Bin 44920 -> 0 bytes doc/guides/prog_guide/index.rst | 1 - doc/guides/prog_guide/ivshmem_lib.rst| 160 - doc/guides/prog_guide/source_org.rst | 1 - doc/guides/rel_notes/deprecation.rst | 3 - doc/guides/rel_notes/release_16_11.rst | 3 + examples/Makefile| 1 - examples/l2fwd-ivshmem/Makefile | 43 -- examples/l2fwd-ivshmem/guest/Makefile| 50 -- examples/l2fwd-ivshmem/guest/guest.c | 452 - examples/l2fwd-ivshmem/host/Makefile | 50 -- examples/l2fwd-ivshmem/host/host.c | 895 - examples/l2fwd-ivshmem/include/common.h | 111 examples/packet_ordering/Makefile| 2 +- lib/Makefile | 1 - lib/librte_eal/common/eal_common_memzone.c | 12 - lib/librte_eal/common/eal_private.h | 22 - lib/librte_eal/common/include/rte_memory.h | 3 - lib/librte_eal/common/include/rte_memzone.h | 7 +- lib/librte_eal/common/malloc_heap.c | 8 - lib/librte_eal/linuxapp/eal/Makefile | 9 - lib/librte_eal/linuxapp/eal/eal.c| 10 - lib/librte_eal/linuxapp/eal/eal_ivshmem.c| 954 --- lib/librte_eal/linuxapp/eal/eal_memory.c | 30 +- lib/librte_ivshmem/Makefile | 54 -- lib/librte_ivshmem/rte_ivshmem.c | 919 -- lib/librte_ivshmem/rte_ivshmem.h | 165 - lib/librte_ivshmem/rte_ivshmem_version.map | 12 - mk/rte.app.mk| 1 - 43 files changed, 13 insertions(+), 4537 deletions(-) delete mode 100644 app/test/test_ivshmem.c delete mode 100644 config/defconfig_x86_64-ivshmem-linuxapp-gcc delete mode 100644 config/defconfig_x86_64-ivshmem-linuxapp-icc delete mode 100644 doc/guides/prog_guide/img/ivshmem.png delete mode 100644 doc/guides/prog_guide/ivshmem_lib.rst delete mode 100644 examples/l2fwd-ivshmem/Makefile delete mode 100644 examples/l2fwd-ivshmem/guest/Makefile delete mode 100644 examples/l2fwd-ivshmem/guest/guest.c delete mode 100644 examples/l2fwd-ivshmem/host/Makefile delete mode 100644 examples/l2fwd-ivshmem/host/host.c delete mode 100644 examples/l2fwd-ivshmem/include/common.h delete mode 100644 lib/librte_eal/linuxapp/eal/eal_ivshmem.c delete mode 100644 lib/librte_ivshmem/Makefile delete mode 100644 lib/librte_ivshmem/rte_ivshmem.c delete mode 100644 lib/librte_ivshmem/rte_ivshmem.h delete mode 100644 lib/librte_ivshmem/rte_ivshmem_version.map diff --git a/MAINTAINERS b/MAINTAINERS index 6536c6b..5e3d825 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -546,14 +546,6 @@ F: app/test/test_cmdline* F: examples/cmdline/ F: doc/guides/sample_app_ug/cmd_line.rst -Qemu IVSHMEM -M: Anatoly Burakov -F: lib/librte_ivshmem/ -F: lib/librte_eal/linuxapp/eal/eal_ivshmem.c -F: doc/guides/prog_guide/ivshmem_lib.rst -F: app/test/test_ivshmem.c -F: examples/l2fwd-ivshmem/ - Key/Value parsing M: Olivier Matz F: lib/librte_kvargs/ diff --git a/app/test/Makefile b/app/test/Makefile index 49ea195..611d77a 100644 --- a/app/test/Makefile +++ b/app/test/Makefile @@ -167,7 +167,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_KNI) += test_kni.c SRCS-$(CONFIG_RTE_LIBRTE_POWER) += test_power.c test_power_acpi_cpufreq.c SRCS-$(CONFIG_RTE_LIBRTE_POWER) += test_power_kvm_vm.c SRCS-y += test_common.c -SRCS-$(CONFIG_RTE_LIBRTE_IVSHMEM) += test_ivshmem.c SRCS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) += test_distributor.c SRCS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) += test_distributor_perf.c
[dpdk-dev] [PATCH v1] doc: add template release notes for 16.11
2016-07-29 12:23, John McNamara: > Add template release notes for DPDK 16.11 with inline > comments and explanations of the various sections. > > Signed-off-by: John McNamara Applied as the first patch for 16.11, thanks :)
[dpdk-dev] [PATCH v2] net/i40e: fix Rx statistic inconsistent
On Fri, Jul 29, 2016 at 4:50 AM, Wei Zhao1 wrote: > rx_good_bytes and rx_good_packets statistic is inconsistent when port > stopped,ipackets statistic is minus the discard packets but rx_bytes > statistic not.Also,i40e has no statistic of discard bytes, so we have to > delete discard packets item from rx_good_packets statistic. > > Fixes: 9aace75fc82e ("i40e: fix statistics") > > Signed-off-by: Wei Zhao1 > --- > drivers/net/i40e/i40e_ethdev.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c > index 11a5804..553dfd9 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -2319,8 +2319,7 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct > rte_eth_stats *stats) > > stats->ipackets = pf->main_vsi->eth_stats.rx_unicast + > pf->main_vsi->eth_stats.rx_multicast + > - pf->main_vsi->eth_stats.rx_broadcast - > - pf->main_vsi->eth_stats.rx_discards; > + pf->main_vsi->eth_stats.rx_broadcast; > stats->opackets = pf->main_vsi->eth_stats.tx_unicast + > pf->main_vsi->eth_stats.tx_multicast + > pf->main_vsi->eth_stats.tx_broadcast; > -- > 2.5.5 > Is it not worse to report a received packet when no packet was actually received by the upper layers under normal operations than to ensure that packets and bytes are consistent when an interface is stopped? It seems like the first case is much more likely to occur than the second. Are we just introducing a new issue to fix another? How does this behaviour compare to other NICs? Does the ixgbe report discarded packets in its ipackets? My reading of the driver is that it does not. In fact, it does something interesting to deal with the problem: from: http://dpdk.org/browse/dpdk/tree/drivers/net/ixgbe/ixgbe_ethdev.c /* * An errata states that gprc actually counts good + missed packets: * Workaround to set gprc to summated queue packet receives */ hw_stats->gprc = *total_qprc; total_gprc is equal to the sum of the qprc per queue. Can we do something similar on the i40e instead of adding unicast, mulitcast and broadcast?
[dpdk-dev] [PATCH v3] doc: autogenerate nic overview table from ini files
Convert the NIC feature table in the overview doc into a set of ini files and add functions into the Sphinx conf.py file to auto-generate them back into an RST table. The reason for doing this is to make it easier for PMD maintainers to update the feature matrix that makes up the table and to avoid frequent and hard to resolve conflicts in doc/guides/nics/overview.rst. A NIC/PMD feature matrix is now an ini file like the following: $ head doc/guides/nics/nic_features/i40e.ini ; ; Features of the i40e network driver. ; [Features] Link status = Y Link status event= Y Rx interrupt = Y Queue start/stop = Y ... The output RST table matches the existing table with the column headers sorted. Signed-off-by: John McNamara Tested-by: Ferruh Yigit --- .gitignore | 2 + doc/guides/conf.py | 155 +++ doc/guides/nics/nic_features/afpacket.ini| 6 ++ doc/guides/nics/nic_features/bnx2x.ini | 16 +++ doc/guides/nics/nic_features/bnx2x_vf.ini| 17 +++ doc/guides/nics/nic_features/bnxt.ini| 16 +++ doc/guides/nics/nic_features/bonding.ini | 6 ++ doc/guides/nics/nic_features/cxgbe.ini | 31 ++ doc/guides/nics/nic_features/default.ini | 68 doc/guides/nics/nic_features/e1000.ini | 28 + doc/guides/nics/nic_features/ena.ini | 26 + doc/guides/nics/nic_features/enic.ini| 28 + doc/guides/nics/nic_features/fm10k.ini | 34 ++ doc/guides/nics/nic_features/fm10k_vec.ini | 34 ++ doc/guides/nics/nic_features/fm10k_vf.ini| 28 + doc/guides/nics/nic_features/fm10kvf_vec.ini | 28 + doc/guides/nics/nic_features/i40e.ini| 47 doc/guides/nics/nic_features/i40e_vec.ini| 39 +++ doc/guides/nics/nic_features/i40e_vf.ini | 36 +++ doc/guides/nics/nic_features/i40evf_vec.ini | 28 + doc/guides/nics/nic_features/igb.ini | 44 doc/guides/nics/nic_features/igb_vf.ini | 27 + doc/guides/nics/nic_features/ixgbe.ini | 54 ++ doc/guides/nics/nic_features/ixgbe_vec.ini | 46 doc/guides/nics/nic_features/ixgbe_vf.ini| 37 +++ doc/guides/nics/nic_features/ixgbevf_vec.ini | 29 + doc/guides/nics/nic_features/mlx4.ini| 32 ++ doc/guides/nics/nic_features/mlx5.ini| 35 ++ doc/guides/nics/nic_features/mpipe.ini | 6 ++ doc/guides/nics/nic_features/nfp.ini | 6 ++ doc/guides/nics/nic_features/null.ini| 6 ++ doc/guides/nics/nic_features/pcap.ini| 16 +++ doc/guides/nics/nic_features/qede.ini| 29 + doc/guides/nics/nic_features/qede_vf.ini | 30 ++ doc/guides/nics/nic_features/ring.ini| 6 ++ doc/guides/nics/nic_features/szedata2.ini| 17 +++ doc/guides/nics/nic_features/thunderx.ini| 30 ++ doc/guides/nics/nic_features/vhost.ini | 13 +++ doc/guides/nics/nic_features/virtio.ini | 24 + doc/guides/nics/nic_features/virtio_vec.ini | 22 doc/guides/nics/nic_features/vmxnet3.ini | 6 ++ doc/guides/nics/nic_features/xenvirt.ini | 6 ++ doc/guides/nics/overview.rst | 76 + 43 files changed, 1195 insertions(+), 75 deletions(-) create mode 100644 doc/guides/nics/nic_features/afpacket.ini create mode 100644 doc/guides/nics/nic_features/bnx2x.ini create mode 100644 doc/guides/nics/nic_features/bnx2x_vf.ini create mode 100644 doc/guides/nics/nic_features/bnxt.ini create mode 100644 doc/guides/nics/nic_features/bonding.ini create mode 100644 doc/guides/nics/nic_features/cxgbe.ini create mode 100644 doc/guides/nics/nic_features/default.ini create mode 100644 doc/guides/nics/nic_features/e1000.ini create mode 100644 doc/guides/nics/nic_features/ena.ini create mode 100644 doc/guides/nics/nic_features/enic.ini create mode 100644 doc/guides/nics/nic_features/fm10k.ini create mode 100644 doc/guides/nics/nic_features/fm10k_vec.ini create mode 100644 doc/guides/nics/nic_features/fm10k_vf.ini create mode 100644 doc/guides/nics/nic_features/fm10kvf_vec.ini create mode 100644 doc/guides/nics/nic_features/i40e.ini create mode 100644 doc/guides/nics/nic_features/i40e_vec.ini create mode 100644 doc/guides/nics/nic_features/i40e_vf.ini create mode 100644 doc/guides/nics/nic_features/i40evf_vec.ini create mode 100644 doc/guides/nics/nic_features/igb.ini create mode 100644 doc/guides/nics/nic_features/igb_vf.ini create mode 100644 doc/guides/nics/nic_features/ixgbe.ini create mode 100644 doc/guides/nics/nic_features/ixgbe_vec.ini create mode 100644 doc/guides/nics/nic_features/ixgbe_vf.ini create mode 100644 doc/guides/nics/nic_features/ixgbevf_vec.ini create mode 100644 doc/guides/nics/nic_features/mlx4.ini create mode 100644 doc/guides/nics/nic_features/mlx5.ini create mode 100644
[dpdk-dev] [dpdk-announce] SPP mail list created
A new mail list created under dpdk.org for SPP: spp at dpdk.org Please feel free to register and use it for any SPP related discussion. See the previous announcement for a description of SPP (Soft Patch Panel): http://dpdk.org/ml/archives/dev/2016-May/039773.html Latest SPP source: http://dpdk.org/browse/apps/spp Regards, ferruh
[dpdk-dev] [PATCH v1] doc: add template release notes for 16.11
Add template release notes for DPDK 16.11 with inline comments and explanations of the various sections. Signed-off-by: John McNamara --- doc/guides/rel_notes/index.rst | 1 + doc/guides/rel_notes/release_16_11.rst | 205 + 2 files changed, 206 insertions(+) create mode 100644 doc/guides/rel_notes/release_16_11.rst diff --git a/doc/guides/rel_notes/index.rst b/doc/guides/rel_notes/index.rst index 52c63b4..7e51b2c 100644 --- a/doc/guides/rel_notes/index.rst +++ b/doc/guides/rel_notes/index.rst @@ -36,6 +36,7 @@ Release Notes :numbered: rel_description +release_16_11 release_16_07 release_16_04 release_2_2 diff --git a/doc/guides/rel_notes/release_16_11.rst b/doc/guides/rel_notes/release_16_11.rst new file mode 100644 index 000..a6e3307 --- /dev/null +++ b/doc/guides/rel_notes/release_16_11.rst @@ -0,0 +1,205 @@ +DPDK Release 16.11 +== + +.. **Read this first.** + + The text below explains how to update the release notes. + + Use proper spelling, capitalization and punctuation in all sections. + + Variable and config names should be quoted as fixed width text: ``LIKE_THIS``. + + Build the docs and view the output file to ensure the changes are correct:: + + make doc-guides-html + + firefox build/doc/html/guides/rel_notes/release_16_11.html + + +New Features + + +.. This section should contain new features added in this release. Sample format: + + * **Add a title in the past tense with a full stop.** + + Add a short 1-2 sentence description in the past tense. The description + should be enough to allow someone scanning the release notes to understand + the new feature. + + If the feature adds a lot of sub-features you can use a bullet list like this. + + * Added feature foo to do something. + * Enhanced feature bar to do something else. + + Refer to the previous release notes for examples. + + This section is a comment. Make sure to start the actual text at the margin. + + +Resolved Issues +--- + +.. This section should contain bug fixes added to the relevant sections. Sample format: + + * **code/section Fixed issue in the past tense with a full stop.** + + Add a short 1-2 sentence description of the resolved issue in the past tense. + The title should contain the code/lib section like a commit message. + Add the entries in alphabetic order in the relevant sections below. + + This section is a comment. Make sure to start the actual text at the margin. + + +EAL +~~~ + + +Drivers +~~~ + + +Libraries +~ + + +Examples + + + +Other +~ + + +Known Issues + + +.. This section should contain new known issues in this release. Sample format: + + * **Add title in present tense with full stop.** + + Add a short 1-2 sentence description of the known issue in the present + tense. Add information on any known workarounds. + + This section is a comment. Make sure to start the actual text at the margin. + + +API Changes +--- + +.. This section should contain API changes. Sample format: + + * Add a short 1-2 sentence description of the API change. Use fixed width + quotes for ``rte_function_names`` or ``rte_struct_names``. Use the past tense. + + This section is a comment. Make sure to start the actual text at the margin. + + +ABI Changes +--- + +.. This section should contain ABI changes. Sample format: + + * Add a short 1-2 sentence description of the ABI change that was announced in + the previous releases and made in this release. Use fixed width quotes for + ``rte_function_names`` or ``rte_struct_names``. Use the past tense. + + This section is a comment. Make sure to start the actual text at the margin. + + + +Shared Library Versions +--- + +.. Update any library version updated in this release and prepend with a ``+`` + sign, like this: + + libethdev.so.4 + librte_acl.so.2 + + librte_cfgfile.so.2 + librte_cmdline.so.2 + + + +The libraries prepended with a plus sign were incremented in this version. + +.. code-block:: diff + + libethdev.so.4 + librte_acl.so.2 + librte_cfgfile.so.2 + librte_cmdline.so.2 + librte_cryptodev.so.1 + librte_distributor.so.1 + librte_eal.so.2 + librte_hash.so.2 + librte_ip_frag.so.1 + librte_ivshmem.so.1 + librte_jobstats.so.1 + librte_kni.so.2 + librte_kvargs.so.1 + librte_lpm.so.2 + librte_mbuf.so.2 + librte_mempool.so.2 + librte_meter.so.1 + librte_pdump.so.1 + librte_pipeline.so.3 + librte_pmd_bond.so.1 + librte_pmd_ring.so.2 + librte_port.so.3 + librte_power.so.1 + librte_reorder.so.1 + librte_ring.so.1 + librte_sched.so.1 + librte_table.so.2 + librte_timer.so.1 + librte_vhost.so.3 + + +Tested Platforms + + +.. This section should contain a list of
[dpdk-dev] [PATCH v3] doc: autogenerate nic overview table from ini files
I forgot to add the annotations: v3: * Updated to latest version of the nic overview table. v2: * Updated to latest version of the nic overview table. * Removed blank entries from the ini file.
[dpdk-dev] [PATCH v3] i40: fix the VXLAN TSO issue
> -Original Message- > From: Ananyev, Konstantin > Sent: Friday, July 29, 2016 4:46 PM > To: Tan, Jianfeng; dev at dpdk.org > Cc: Wu, Jingjing > Subject: RE: [dpdk-dev] [PATCH v3] i40: fix the VXLAN TSO issue > > Hi Jianfeng, > > > > > Hi, > > > > On 7/18/2016 7:56 PM, Zhe Tao wrote: > > > Problem: > > > When using the TSO + VXLAN feature in i40e, the outer UDP length > > > fields in the multiple UDP segments which are TSOed by the i40e will > > > have a wrong value. > > > > > > Fix this problem by adding the tunnel type field in the i40e > > > descriptor which was missed before. > > > > > > Fixes: 77b8301733c3 ("i40e: VXLAN Tx checksum offload") > > > > > > Signed-off-by: Zhe Tao > > > --- > > > v2: edited the comments > > > v3: added external IP offload flag when TSO is enabled for tunnelling > > > packets > > > > > > app/test-pmd/csumonly.c | 29 + > > > drivers/net/i40e/i40e_rxtx.c | 12 +--- > > > lib/librte_mbuf/rte_mbuf.h | 16 +++- > > > 3 files changed, 45 insertions(+), 12 deletions(-) > > > > > ... > > > diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h > > > index 15e3a10..90812ea 100644 > > > --- a/lib/librte_mbuf/rte_mbuf.h > > > +++ b/lib/librte_mbuf/rte_mbuf.h > > > @@ -133,6 +133,17 @@ extern "C" { > > > /* add new TX flags here */ > > > > > > /** > > > + * Bits 45:48 used for the tunnel type. > > > + * When doing Tx offload like TSO or checksum, the HW needs to > > > +configure the > > > + * tunnel type into the HW descriptors. > > > + */ > > > +#define PKT_TX_TUNNEL_VXLAN (1ULL << 45) > > > +#define PKT_TX_TUNNEL_GRE (2ULL << 45) > > > +#define PKT_TX_TUNNEL_IPIP(3ULL << 45) > > > +/* add new TX TUNNEL type here */ > > > +#define PKT_TX_TUNNEL_MASK(0xFULL << 45) > > > + > > > > Above flag bits are added so that i40e driver can tell tunnel type of this > packet (udp or gre or ipip), just interested to know how about just do > > a simple analysis like below without introducing these flags? > > > > if outer_ether.proto == ipv4 > > l4_proto = ipv4_hdr->next_proto; > > else outer_ether.proto == ipv6 > > l4_proto = ipv6_hdr->next_proto; > > > > switch (l4_proto) > > case ipv4: > > case ipv6: > > tunnel_type = ipip; > > break; > > case udp: > > tunnel_type = udp; > > break; > > case gre: > > tunnel_type = gre; > > break; > > default: > > error; > > Right now none of our PMDs reads/writes actual packet data, > and I think it is better to keep it that way. > It is an upper layer responsibility to specify which offload > needs to be enabled and provide necessary information. > Konstantin Make sense. I'll send out v4 as the original way later. Thanks, Jianfeng
[dpdk-dev] usages issue with external mempool
Hi Oliver > -Original Message- > From: Olivier MATZ [mailto:olivier.matz at 6wind.com] > Sent: Thursday, July 28, 2016 2:03 PM > On 07/27/2016 11:51 AM, Jerin Jacob wrote: > > On Tue, Jul 26, 2016 at 10:11:13AM +, Hemant Agrawal wrote: > >> Hi, > >> There was lengthy discussions w.r.t external mempool > >> patches. > However, I am still finding usages issue with the agreed approach. > >> > >> The existing API to create packet mempool, "rte_pktmbuf_pool_create" does > not provide the option to change the object init iterator. This may be the > reason > that many applications (e.g. OVS) are using rte_mempool_create to create > packet mempool with their own object iterator (e.g. ovs_rte_pktmbuf_init). > >> > >> e.g the existing usages are: > >> dmp->mp = rte_mempool_create(mp_name, mp_size, MBUF_SIZE(mtu), > >> MP_CACHE_SZ, > >> sizeof(struct > >> rte_pktmbuf_pool_private), > >> rte_pktmbuf_pool_init, NULL, > >> ovs_rte_pktmbuf_init, NULL, > >> socket_id, 0); > >> > >> > >> With the new API set for packet pool create, this need to be changed to: > >> > >> dmp->mp = rte_mempool_create_empty(mp_name, mp_size, > MBUF_SIZE(mtu), > >> MP_CACHE_SZ, > >> sizeof(struct > >> rte_pktmbuf_pool_private), > >> socket_id, 0); > >>if (dmp->mp == NULL) > >> break; > >> > >>rte_errno = > >> rte_mempool_set_ops_byname(dmp-mp, > >> > >> RTE_MBUF_DEFAULT_MEMPOOL_OPS, > NULL); > >>if (rte_errno != 0) { > >> RTE_LOG(ERR, MBUF, "error > >> setting mempool > handler\n"); > >> return NULL; > >>} > >>rte_pktmbuf_pool_init(dmp->mp, NULL); > >> > >>ret = rte_mempool_populate_default(dmp->mp); > >>if (ret < 0) { > >> rte_mempool_free(dmp->mp); > >> rte_errno = -ret; > >> return NULL; > >>} > >> > >>rte_mempool_obj_iter(dmp->mp, > >> ovs_rte_pktmbuf_init, NULL); > >> > >> This is not a user friendly approach to ask for changing 1 API to 6 new > >> APIs. > Or, am I missing something? > > The example you are giving first still works today, right? [Hemant] No. The rte_mempool_create, may not work with offloaded mempool. In the current code, the default option in rte_mempool_create is hardcoded as "ring_mp_mc". So it will not use any other config file specified mempool. One possible solution, I see that the default option in rte_mempool_create can be changed to "CONFIG_RTE_MBUF_DEFAULT_MEMPOOL_OPS" from "ring_mp_mc". > > Since the mempool rework, as the objects are linked together in the mempool, > it > is also possible to use rte_pktmbuf_pool_create() and call another iterator > after, > like below: > > mp = rte_pktmbuf_pool_create(name, size, cache_size, priv_size, > data_room_size, socket_id); > if (mp == NULL) > handle_error(); > rte_mempool_obj_iter(mp, ovs_rte_pktmbuf_init); > [Hemant] Why? The purpose of rte_pktmbuf_pool_create was to provide a usable wrapper. If applications are not able to use it, we should retrospect and upgrade it as per common usages. your ease-of-usages definition may differ from my definition. > By the way, rte_mempool_set_ops_byname() is not needed in your example > above since it sets the default ops. [Hemant] I think it is needed. I could not find a MEMPOOL_REGISTER_OPS for "default" value. Default may not be ""ring_mp_mc". > > > > > I agree, To me, this is very bad. I have raised this concern earlier > > also > > > > Since applications like OVS goes through "rte_mempool_create" for even > > packet buffer pool creation. IMO it make senses to extend > > "rte_mempool_create" to take one more argument to provide external > > pool handler name(NULL for default). I don't see any valid technical > > reason to treat external pool handler based mempool creation API > > different from default handler. > > I disagree that changing from one function do_many_stuff(11 args) to several > do_one_stuff(few args) functions is a regression. > > I don't feel that having a new function with 12 args solves anything. > What is the problem of having 20 lines of code for initializing a mbuf pool?
[dpdk-dev] [PATCH v3] i40: fix the VXLAN TSO issue
Hi Jianfeng, > > Hi, > > On 7/18/2016 7:56 PM, Zhe Tao wrote: > > Problem: > > When using the TSO + VXLAN feature in i40e, the outer UDP length > > fields in the multiple UDP segments which are TSOed by the i40e will > > have a wrong value. > > > > Fix this problem by adding the tunnel type field in the i40e > > descriptor which was missed before. > > > > Fixes: 77b8301733c3 ("i40e: VXLAN Tx checksum offload") > > > > Signed-off-by: Zhe Tao > > --- > > v2: edited the comments > > v3: added external IP offload flag when TSO is enabled for tunnelling > > packets > > > > app/test-pmd/csumonly.c | 29 + > > drivers/net/i40e/i40e_rxtx.c | 12 +--- > > lib/librte_mbuf/rte_mbuf.h | 16 +++- > > 3 files changed, 45 insertions(+), 12 deletions(-) > > > ... > > diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h > > index 15e3a10..90812ea 100644 > > --- a/lib/librte_mbuf/rte_mbuf.h > > +++ b/lib/librte_mbuf/rte_mbuf.h > > @@ -133,6 +133,17 @@ extern "C" { > > /* add new TX flags here */ > > > > /** > > + * Bits 45:48 used for the tunnel type. > > + * When doing Tx offload like TSO or checksum, the HW needs to > > +configure the > > + * tunnel type into the HW descriptors. > > + */ > > +#define PKT_TX_TUNNEL_VXLAN (1ULL << 45) > > +#define PKT_TX_TUNNEL_GRE (2ULL << 45) > > +#define PKT_TX_TUNNEL_IPIP(3ULL << 45) > > +/* add new TX TUNNEL type here */ > > +#define PKT_TX_TUNNEL_MASK(0xFULL << 45) > > + > > Above flag bits are added so that i40e driver can tell tunnel type of this > packet (udp or gre or ipip), just interested to know how about just do > a simple analysis like below without introducing these flags? > > if outer_ether.proto == ipv4 > l4_proto = ipv4_hdr->next_proto; > else outer_ether.proto == ipv6 > l4_proto = ipv6_hdr->next_proto; > > switch (l4_proto) > case ipv4: > case ipv6: > tunnel_type = ipip; > break; > case udp: > tunnel_type = udp; > break; > case gre: > tunnel_type = gre; > break; > default: > error; Right now none of our PMDs reads/writes actual packet data, and I think it is better to keep it that way. It is an upper layer responsibility to specify which offload needs to be enabled and provide necessary information. Konstantin > > Thanks, > Jianfeng > > > > +/** > >* Second VLAN insertion (QinQ) flag. > >*/ > > #define PKT_TX_QINQ_PKT(1ULL << 49) /**< TX packet with double VLAN > > inserted. */ > > @@ -867,7 +878,10 @@ struct rte_mbuf { > > union { > > uint64_t tx_offload; /**< combined for easy fetch */ > > struct { > > - uint64_t l2_len:7; /**< L2 (MAC) Header Length. */ > > + uint64_t l2_len:7; > > + /**< L2 (MAC) Header Length if it isn't a tunneling pkt. > > +* for tunnel it is outer L4 len+tunnel len+inner L2 len > > +*/ > > uint64_t l3_len:9; /**< L3 (IP) Header Length. */ > > uint64_t l4_len:8; /**< L4 (TCP/UDP) Header Length. */ > > uint64_t tso_segsz:16; /**< TCP TSO segment size */
[dpdk-dev] [PATCH] net/i40e: fiX statstic inconsistent when port stopped
Hi, Wu Jingjing Thanks for your feedback .I didn't find statistic of discard bytes i40e data sheet, so I have to delete discard packets item from rx_good_packets statistic. In other words, we have no way to to minus the discard byte count from rx_good_bytes. Also I will make some change to meet requirements of commit log and subject. -Original Message- From: Wu, Jingjing Sent: Friday, July 29, 2016 10:50 AM To: Zhao1, Wei Cc: dev at dpdk.org Subject: RE: [dpdk-dev] [PATCH] net/i40e: fiX statstic inconsistent when port stopped Hi, zhaowei Few comments below: > -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Wei Zhao1 > Sent: Tuesday, July 26, 2016 10:06 AM > To: dev at dpdk.org > Cc: Zhao1, Wei > Subject: [dpdk-dev] [PATCH] net/i40e: fiX statstic inconsistent when > port stopped > Avoid typo: fiX -> fix; statstic -> statistic And there are some requirements based on the subject and commit log in , such as: * The summary line should be around 50 characters. * The text of the commit message should be wrapped at 72 characters. Please check the doc " doc/guides/contributing/patches.rst" and use " scripts/check-git-log.sh" to help you. > rx_good_bytes and rx_good_packets statstic is inconsistent when port > stopped,ipackets statistic is minus the discard packets but rx_bytes > statistic not. > Also,i40e has no statstic of discard bytes, so we have to delete > discard packets item from rx_good_packets statstic. > > Fixes: 9aace75fc82e ("i40e: fix statistics") > > Signed-off-by: Wei Zhao1 > --- > drivers/net/i40e/i40e_ethdev.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/net/i40e/i40e_ethdev.c > b/drivers/net/i40e/i40e_ethdev.c index 11a5804..553dfd9 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -2319,8 +2319,7 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, > struct rte_eth_stats *stats) > > stats->ipackets = pf->main_vsi->eth_stats.rx_unicast + > pf->main_vsi->eth_stats.rx_multicast + > - pf->main_vsi->eth_stats.rx_broadcast - > - pf->main_vsi->eth_stats.rx_discards; > + pf->main_vsi->eth_stats.rx_broadcast; > stats->opackets = pf->main_vsi->eth_stats.tx_unicast + > pf->main_vsi->eth_stats.tx_multicast + > pf->main_vsi->eth_stats.tx_broadcast; rx_discards is included in imiss. So I think it's better to minus the discard count. /Jingjing
[dpdk-dev] [PATCH] net/i40e: fiX statstic inconsistent when port stopped
Hi, zhaowei Few comments below: > -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Wei Zhao1 > Sent: Tuesday, July 26, 2016 10:06 AM > To: dev at dpdk.org > Cc: Zhao1, Wei > Subject: [dpdk-dev] [PATCH] net/i40e: fiX statstic inconsistent when port > stopped > Avoid typo: fiX -> fix; statstic -> statistic And there are some requirements based on the subject and commit log in , such as: * The summary line should be around 50 characters. * The text of the commit message should be wrapped at 72 characters. Please check the doc " doc/guides/contributing/patches.rst" and use " scripts/check-git-log.sh" to help you. > rx_good_bytes and rx_good_packets statstic is inconsistent when port > stopped,ipackets statistic is minus the discard packets but rx_bytes statistic > not. > Also,i40e has no statstic of discard bytes, so we have to delete discard > packets item from rx_good_packets statstic. > > Fixes: 9aace75fc82e ("i40e: fix statistics") > > Signed-off-by: Wei Zhao1 > --- > drivers/net/i40e/i40e_ethdev.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c > index 11a5804..553dfd9 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -2319,8 +2319,7 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, > struct rte_eth_stats *stats) > > stats->ipackets = pf->main_vsi->eth_stats.rx_unicast + > pf->main_vsi->eth_stats.rx_multicast + > - pf->main_vsi->eth_stats.rx_broadcast - > - pf->main_vsi->eth_stats.rx_discards; > + pf->main_vsi->eth_stats.rx_broadcast; > stats->opackets = pf->main_vsi->eth_stats.tx_unicast + > pf->main_vsi->eth_stats.tx_multicast + > pf->main_vsi->eth_stats.tx_broadcast; rx_discards is included in imiss. So I think it's better to minus the discard count. /Jingjing
[dpdk-dev] [dpdk-announce] DPDK 16.07 released
Once again, a great release from the impressive DPDK community: http://fast.dpdk.org/rel/dpdk-16.07.tar.xz The statistics are awesome: 955 patches from 115 authors 839 files changed, 127162 insertions(+), 24668 deletions(-) There are 50 new contributors (including authors, reviewers and testers): Thanks to Adam Bynes, Ajit Khaparde, Akhil Goyal, Alex Wang, Amin Tootoonchian, Anupam Kapoor, Bj?rn T?pel, Chaeyong Chong, David Christensen, Dmitriy Yakovlev, Dumitru Ceara, Eoin Breen, Fengtian Guo, Guruprasad Mukundarao, Hiroyuki Mikita, Ian Stokes, Ido Barnea, Jeff Guo, John Guzik, Juan Antonio Montesinos, Juhamatti Kuusisaari, Maxime Coquelin, Michael Habibi, Nikhil Rao, Patrik Andersson, Radoslaw Biernacki, Raslan Darawsheh, Ricardo Salveti, Ricky Li, Ronghua Zhang, Sameh Gobriel, Sankar Chokkalingam, Sergey Dyasly, Shreyansh Jain, Slawomir Rosek, Sony Chacko, Stephen Hurd, Thadeu Lima de Souza Cascardo, Thomas Petazzoni, Tiwei Bie, Vasily Philipov, Vincent Li, Wei Dai, WeiJie Zhuang, Wei Shen, Xiaoban Wu, Xueqin Lin, Yari Adan Petralanda, Yongseok Koh, Zyta Szpak. These new contributors are associated with these domain names: 6wind.com, awakenetworks.com, broadcom.com, caviumnetworks.com, cisco.com, coriant.com, ericsson.com, free-electrons.com, gmail.com, berkeley.edu, intel.com, linaro.org, mellanox.com, nxp.com, outlook.com, qlogic.com, redhat.com, samsung.com, schaman.hu, semihalf.com, shieldxnetworks.com, uml.edu, vmware.com. Some highlights: * mempool reworked * KASUMI crypto * driver bnxt * driver for ThunderX * virtio for POWER8 * virtio-user for containers * vhost-user client mode * packet capture framework More details in the release notes: http://dpdk.org/doc/guides/rel_notes/release_16_07.html The new features for the 16.11 cycle must be submitted before August 28. The features properly reviewed and approved before October will be part of the next release which will be a bit shorter (3 months) than before. If you read until this line, please take few more minutes to fill out this survey: http://surveymonkey.com/r/DPDK_Community_Survey Thanks everyone
[dpdk-dev] [PATCH] doc: announce driver name changes
On Sat, Jul 09, 2016 at 05:56:34PM +0100, Pablo de Lara wrote: > Driver names for all the supported devices in DPDK do not have > a naming convention. Some are using a prefix, some are not > and some have long names. Driver names are used when creating > virtual devices, so it is useful to have consistency in the names. > > Signed-off-by: Pablo de Lara Acked-by: Jerin Jacob > --- > doc/guides/rel_notes/deprecation.rst | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/doc/guides/rel_notes/deprecation.rst > b/doc/guides/rel_notes/deprecation.rst > index f502f86..37d65c8 100644 > --- a/doc/guides/rel_notes/deprecation.rst > +++ b/doc/guides/rel_notes/deprecation.rst > @@ -41,3 +41,8 @@ Deprecation Notices > * The mempool functions for single/multi producer/consumer are deprecated and >will be removed in 16.11. >It is replaced by rte_mempool_generic_get/put functions. > + > +* Driver names are quite inconsistent among each others and they will be > + renamed to something more consistent (net_ prefix for net drivers and > + crypto_ for crypto drivers) in 16.11. Some of these driver names are used > + publicly, to create virtual devices, so a deprecation notice is necessary. > -- > 2.7.4 >