summaryrefslogtreecommitdiff
path: root/examples/multi_process/client_server_mp
AgeCommit message (Collapse)Author
2018-11-04examples/multi_process: add sigint handler to serverRaslan Darawsheh
add sigint handler in the server application to stop and close ports Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
2018-07-12examples: make Linux environment check consistentThomas Monjalon
Some Makefiles are using CONFIG_RTE_EXEC_ENV and others are using CONFIG_RTE_EXEC_ENV_LINUXAPP. Use the latter one for consistency. We could remove CONFIG_RTE_EXEC_ENV later if considered useless. Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-04-27ethdev: remove experimental flag of ports enumerationThomas Monjalon
The basic operations for ports enumeration should not be considered as experimental in DPDK 18.05. The iterator RTE_ETH_FOREACH_DEV was introduced in DPDK 17.05. It uses the function the rte_eth_find_next_owned_by() to get only ownerless ports. Its API can be considered stable. So the flag experimental is removed from rte_eth_find_next_owned_by(). The flag experimental is removed from rte_eth_dev_count_avail() which is the new name of the old function rte_eth_dev_count(). The flag experimental is set to rte_eth_dev_count_total() in the .c file for consistency with the declaration in the .h file. A lot of internal applications are fixed to not allow experimental API. Fixes: 8728ccf37615 ("fix ethdev ports enumeration") Fixes: d9a42a69febf ("ethdev: deprecate port count function") Fixes: e70e26861eaf ("net/mvpp2: fix build") Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Tested-by: David Marchand <david.marchand@6wind.com>
2018-04-18ethdev: deprecate port count functionThomas Monjalon
Some DPDK applications wrongly assume these requirements: - no hotplug, i.e. ports are never detached - all allocated ports are available to the application Such application iterates over ports by its own mean. The most common pattern is to request the port count and assume ports with index in the range [0..count[ can be used. In order to fix this common mistake in all external applications, the function rte_eth_dev_count is deprecated, while introducing the new functions rte_eth_dev_count_avail and rte_eth_dev_count_total. Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-02-01examples: increase default ring sizes to 1024Kevin Laatz
Increase the default RX/TX ring sizes to 1024/1024 to accommodate for NICs with higher throughput (25G, 40G etc) Signed-off-by: Kevin Laatz <kevin.laatz@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2018-01-04examples: use SPDX tag for Intel copyright filesBruce Richardson
Replace the BSD license header with the SPDX tag for files with only an Intel copyright on them. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2017-11-07examples: remove dependency on PCIBruce Richardson
All PCI functionality should be hidden from apps via the PCI bus driver, the EAL and individual device drivers. Therefore remove the inclusion of rte_pci.h from sample apps. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2017-11-06remove useless memzone includesThomas Monjalon
The memzone header is often included without good reason. Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2017-10-13examples: fix port id typeZhiyong Yang
Fixes: f8244c6399d9 ("ethdev: increase port id range") Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
2017-10-12mk: sort headers before wildcard inclusionLuca Boccassi
In order to achieve fully reproducible builds, always use the same inclusion order for headers in the Makefiles. Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
2017-10-06ethdev: increase port id rangeZhiyong Yang
Extend port_id definition from uint8_t to uint16_t in lib and drivers data structures, specifically rte_eth_dev_data. Modify the APIs, drivers and app using port_id at the same time. Fix some checkpatch issues from the original code and remove some unnecessary cast operations. release_17_11 and deprecation docs have been updated in this patch. Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-07-16examples: remove duplicate includesThomas Monjalon
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2017-07-08examples: adjust Rx and Tx descriptors to device limitsRoman Zhukov
Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-06-14fix typos using codespell utilityJerin Jacob
Fixing typos across dpdk source code using codespell utility. Skipped the ethdev driver's base code fixes to keep the base code intact. Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com> Acked-by: John McNamara <john.mcnamara@intel.com>
2017-03-29ring: return remaining entry count when dequeuingBruce Richardson
Add an extra parameter to the ring dequeue burst/bulk functions so that those functions can optionally return the amount of remaining objs in the ring. This information can be used by applications in a number of ways, for instance, with single-consumer queues, it provides a max dequeue size which is guaranteed to work. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-03-29ring: return free space when enqueuingBruce Richardson
Add an extra parameter to the ring enqueue burst/bulk functions so that those functions can optionally return the amount of free space in the ring. This information can be used by applications in a number of ways, for instance, with single-producer queues, it provides a max enqueue size which is guaranteed to work. It can also be used to implement watermark functionality in apps, replacing the older functionality with a more flexible version, which enables apps to implement multiple watermark thresholds, rather than just one. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-03-29ring: make bulk and burst return values consistentBruce Richardson
The bulk fns for rings returns 0 for all elements enqueued and negative for no space. Change that to make them consistent with the burst functions in returning the number of elements enqueued/dequeued, i.e. 0 or N. This change also allows the return value from enq/deq to be used directly without a branch for error checking. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
2016-07-10examples: fix dependencies on hash libraryThomas Monjalon
The multi_process example do not need rte_hash. But these examples cannot compile if rte_hash is not available: - ipsec-secgw (was already protected - no change) - ipv4_multicast - l3fwd-power - l3fwd-vf - tep_termination - ip_pipeline The ip_pipeline example is not disabled because its dependencies are handled with #ifdef. It may require a separate fix. Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-04-01ethdev: use constants for link stateThomas Monjalon
Define and use ETH_LINK_UP and ETH_LINK_DOWN where appropriate. Signed-off-by: Marc Sune <marcdevel@gmail.com> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-03-11examples: use buffered TxTomasz Kulasek
The internal buffering of packets for TX in sample apps is no longer needed, so this patchset also replaces this code with calls to the new rte_eth_tx_buffer* APIs in: * l2fwd-jobstats * l2fwd-keepalive * l2fwd * l3fwd-acl * l3fwd-power * link_status_interrupt * client_server_mp * l2fwd_fork * packet_ordering * qos_meter Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2016-02-10remove extra parentheses in return statementHuawei Xie
fix the error reported by checkpatch: "ERROR: return is not a function, parentheses are not required" remove parentheses in return like: "return (logical expressions)" remove parentheses in return a function like: "return (rte_mempool_lookup(...))" Fixes: 6307b909b8e0 ("lib: remove extra parenthesis after return") Signed-off-by: Huawei Xie <huawei.xie@intel.com>
2015-06-12examples: fix whitespaceStephen Hemminger
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2015-05-11apps: fix default mbuf sizeKonstantin Ananyev
Latest mbuf changes (priv_size addition and related fixes) exposed small problem with testpmd and few other sample apps: when mbuf size is exaclty 2KB or less, that causes ixgbe PMD to select scattered RX even for configs with 'normal' max packet length (max_rx_pkt_len == ETHER_MAX_LEN). To overcome that problem and unify the code, new macro was created to represent recommended minimal buffer length for mbuf. When appropriate, samples are updated to use that macro. Fixes: dfb03bbe2b ("app/testpmd: use standard functions to initialize mbufs and mbuf pool") Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
2015-04-28apps: use helper to create mbuf poolsOlivier Matz
When it's possible, use the new helper to create the mbuf pools. Most of the patch is trivial, except for the following files that have some specifics (indirect mbufs): - ip_fragmentation - ip_pipeline - ipv4_multicast - vhost Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2015-03-10tailq: remove unneeded inclusionsDavid Marchand
Only keep inclusion where really needed. Signed-off-by: David Marchand <david.marchand@6wind.com> Acked-by: Neil Horman <nhorman@tuxdriver.com>
2014-11-27examples: no more bare metal environmentDavid Marchand
Signed-off-by: David Marchand <david.marchand@6wind.com> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: Neil Horman <nhorman@tuxdriver.com>
2014-10-10examples: use factorized default Rx/Tx configurationPablo de Lara
For apps that were using default rte_eth_rxconf and rte_eth_txconf structures, these have been removed and now they are obtained by calling rte_eth_dev_info_get, just before setting up RX/TX queues. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: David Marchand <david.marchand@6wind.com>
2014-09-29examples: do not probe pci twiceThomas Monjalon
Since commit a155d430119 ("support link bonding device initialization"), rte_eal_pci_probe() is called in rte_eal_init(). So it doesn't have to be called by application anymore. It has been fixed for testpmd in commit 2950a769315, and this patch remove it from other applications. Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: David Marchand <david.marchand@6wind.com> Acked-by: Neil Horman <nhorman@tuxdriver.com>
2014-09-17mbuf: rename in_port to just portBruce Richardson
In some cases we may want to tag a packet for a particular destination or output port, so rename the "in_port" field in the mbuf to just "port" so that it can be re-used for this purpose if an application needs it. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
2014-09-17mbuf: remove the rte_pktmbuf structureOlivier Matz
The rte_pktmbuf structure was initially included in the rte_mbuf structure. This was needed when there was 2 types of mbuf (ctrl and packet). As the control mbuf has been removed, we can merge the rte_pktmbuf into the rte_mbuf structure. Advantages of doing this: - the access to mbuf fields is easier (ex: m->data instead of m->pkt.data) - make the structure more consistent: for instance, there was no reason to have the ol_flags field in rte_mbuf - it will allow a deeper reorganization of the rte_mbuf structure in the next commits, allowing to gain several bytes in it Signed-off-by: Olivier Matz <olivier.matz@6wind.com> [Bruce: updated for latest code and new example apps] Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2014-06-27eal: deprecate rte_snprintfStephen Hemminger
The function rte_snprintf serves no useful purpose. It is the same as snprintf() for all valid inputs. Deprecate it and replace all uses in current code. Leave the tests for the deprecated function in place. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-06-11remove trailing whitespacesBruce Richardson
This commit removes trailing whitespace from lines in files. Almost all files are affected, as the BSD license copyright header had trailing whitespace on 4 lines in it [hence the number of files reporting 8 lines changed in the diffstat]. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> [Thomas: remove spaces before tabs in libs] [Thomas: remove more trailing spaces in non-C files] Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-21config: rename "default" configurations as "native"David Marchand
The "default" part in configuration filenames is misleading. Rename this as "native", as this is the RTE_MACHINE that is set in these files. This should make it clearer for people who build DPDK on a system then run it on another one. Signed-off-by: David Marchand <david.marchand@6wind.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2014-05-20ethdev: remove rte_pmd_init_all functionNeil Horman
Now that we've converted all the pmds in dpdk to use the driver registration macro, rte_pmd_init_all has become empty. As theres no reason to keep it around anymore, just remove it and fix up all the eample callers. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-16examples: use rte.extsubdir.mk to build examples with subdirectoriesOlivier Matz
Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-02-25update Intel copyright years to 2014Bruce Richardson
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2013-10-09doc: whitespace changes in licensesIntel
Signed-off-by: Intel
2013-09-17examples: work only on defined lcoresIntel
Signed-off-by: Intel
2013-09-17examples: numa updatesIntel
Signed-off-by: Intel
2013-09-17ethdev: update VMDq/DCB supportIntel
Signed-off-by: Intel
2013-07-25update copyright date to 2013Intel
Signed-off-by: Intel
2013-07-25examples/multi_process: updateIntel
Signed-off-by: Intel
2013-07-25examples: update link status checksIntel
Signed-off-by: Intel
2013-07-25ethdev: init all builtin driversIntel
Signed-off-by: Intel
2013-07-05remove version in all filesIntel
Signed-off-by: Intel
2013-03-11first public releasev1.2.3r0Intel
version 1.2.3 Signed-off-by: Intel