summaryrefslogtreecommitdiff
path: root/examples
AgeCommit message (Collapse)Author
2018-11-07examples/fips_validation: fix uninitialized accessMarko Kovacevic
Fixing a bug raised in coverity using uninitialized value. Coverity issue: 325881 Fixes: 527cbf3d5ee3 ("examples/fips_validation: support TDES parsing") Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
2018-11-06examples/fips_validation: fix unitialized variablesMarko Kovacevic
Fixed compilation issue with variable which may be used uninitialized. Fixes: 527cbf3d5ee3 ("examples/fips_validation: support TDES parsing") Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
2018-11-06examples/flow_filtering: remove VLAN itemOri Kam
Since the VLAN is not in use and some PMD can't support vlan = 0 this item was removed. Fixes: 4a3ef59a10c8 ("examples/flow_filtering: add simple demo of flow API") Cc: stable@dpdk.org Signed-off-by: Ori Kam <orika@mellanox.com>
2018-11-06examples/flow_filtering: filter out unsupported offloadsOri Kam
Some of the requested offloads are not supported by all devices. This patch fixes this issue by setting only the supported offloads. Fixes: feca6c428a5e ("examples/flow_filtering: add Tx queues setup process") Cc: stable@dpdk.org Signed-off-by: Ori Kam <orika@mellanox.com> Acked-by: Wei Zhao <wei.zhao1@intel.com>
2018-11-05examples/fips_validation: fix buildThomas Monjalon
The example was not added to the Makefile and there are some compilation errors: examples/fips_validation/main.c: In function ‘prepare_aead_op’: error: control reaches end of non-void function examples/fips_validation/main.c: In function ‘prepare_auth_op’: error: control reaches end of non-void function Fixes: 3d0fad56b74a ("examples/fips_validation: add crypto FIPS application") Fixes: f64adb6714e0 ("examples/fips_validation: support HMAC parsing") Fixes: 4aaad2995e13 ("examples/fips_validation: support GCM parsing") Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com> Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-11-02examples/fips_validation: support CCM parsingMarko Kovacevic
Added enablement for CCM parser, to allow the application to parser the ccm request files and to validate all test types supported. Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com> Reviewed-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-11-02examples/fips_validation: support CMAC parsingMarko Kovacevic
Added enablement for CMAC parser, to allow the application to parser the cmac request files and to validate all test types supported. Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com> Reviewed-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-11-02examples/fips_validation: support GCM parsingMarko Kovacevic
Added enablement for GCM parser, to allow the application to parser the GCM request file and to validate all tests supported. Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com> Reviewed-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-11-02examples/fips_validation: support TDES parsingMarko Kovacevic
Added enablement for TDES parser, to allow the application to parser the TDES request files and to validate all test types supported. Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com> Reviewed-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-11-02examples/fips_validation: support HMAC parsingMarko Kovacevic
Added enablement for HMAC parser, to allow the application to parser the hmac request files and to validate all tests supported Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com> Reviewed-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-11-02examples/fips_validation: support AES parsingMarko Kovacevic
Added enablement for AES-CBC parser, to allow the application to parser the aes request file and to validate all test types supported. Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com> Reviewed-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-11-02examples/fips_validation: add crypto FIPS applicationMarko Kovacevic
Added FIPS application into the examples to allow users to use a simple sample app to validate their systems and be able to get FIPS certification. Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com> Reviewed-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-11-02examples/ip_pipeline: fix port and table stats readCristian Dumitrescu
Fix the pipeline port and table stats read operation. Fixes: 50e73d051806 ("examples/ip_pipeline: add stats read commands") Cc: stable@dpdk.org Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com> Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2018-11-02examples/ip_pipeline: support table rule showCristian Dumitrescu
Add support for the table rule show operation. Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-11-02examples/ip_pipeline: support rule time readCristian Dumitrescu
Add support for the table rule timestamp read operation. Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-11-02examples/ip_pipeline: support rule TTL stats readCristian Dumitrescu
Add support for the table rule TTL stats read operation. Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-11-02examples/ip_pipeline: support meter stats readCristian Dumitrescu
Add support for the rule meter stats read operation. Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-11-02examples/ip_pipeline: support rule stats readCristian Dumitrescu
Add support for rule stats read operation. Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-11-02examples/ip_pipeline: track rules on delete defaultCristian Dumitrescu
Support table rule tracking on table rule delete default operation. Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-11-02examples/ip_pipeline: track table rules on deleteCristian Dumitrescu
Support table rule tracking on table rule delete operation. Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com> Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2018-11-02examples/ip_pipeline: track rules on add defaultCristian Dumitrescu
Support table rule tracking on table rule add default operation. Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-11-02examples/ip_pipeline: track table rules on add bulkCristian Dumitrescu
Support table rule tracking on table rule add bulk operation. Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-11-02examples/ip_pipeline: track table rules on addCristian Dumitrescu
Support table rule tracking on table rule add operation. Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com> Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2018-11-02examples/ip_pipeline: add rule list per tableCristian Dumitrescu
For each pipeline table, have the master thread maintain the list of rules that are currently stored in the table. This list allows the master thread to handle table queries with minimal impact for the data plane threads: requests to read the current set of table rules are fully handled by the master thread with no involvement from data plane threads, requests to read the per table rule moving data (such as stats counters or timestamp associated with specific actions) are handled by the data plane threads through plain memory reads rather than key lookup. Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com> Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2018-11-04examples/vm_power: respect maximum CPUsDavid Hunt
The vm_power_manager app was not respecting the POWER_MGR_MAX_CPUS during initialisation, so if there were more CPUs than this value (64), it would lead to buffer overruns of there were more then 64 cores in the system. Added in a check during init and un-init to only initialise up to lcore_id 63. This raises the question as to why not simply increase the value of POWER_MGR_MAX_CPUS. Well, it's not that simple, as many of the APIs take a uint64_t as a parameter for the core mask, and this will not work for cores greater than 63. So some work needs to be done in the future to remove this limitation. For now we'll fix the memory corruption. Also, the patch that this fixes says "allow greater than 64 cores" but that's not across the entire application, it's only for the out-of-band monitoring. I'll add a notice for an API change in the next release to clean this up, i.e. depricate any API calls that use masks. Fixes: 6453b9284b64 ("examples/vm_power: allow greater than 64 cores") Cc: stable@dpdk.org Signed-off-by: David Hunt <david.hunt@intel.com>
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-10-29examples/service_cores: check cores before runVipin Varghese
The service core samples has varied profiles created to run on specified lcore count. The patch adds the check before each run, to ensure example has sufficent lcores to be added as service cores on given run profile. If sufficent cores are not found, the run is skipped with user notification. Signed-off-by: Vipin Varghese <vipin.varghese@intel.com> Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-10-29examples/ipv4_multicast: enable multicast promiscuousWei Zhao
This example has not been enable for receiving multicast packet, so it will drop multicast packet. Users must send packet with ether MAC destination address the same as pf port MAC address, in order to forward packet successfully, but this is an example for forwarding ipv4 multicastpacket. So calling function rte_eth_promiscuous_enable() or rte_eth_allmulticast_enable() can enable promiscuous mode of all multicast packet. And also, DPDK has rte API function of rte_eth_dev_set_mc_addr_list() for setting specific multicast filter table for specific multicast IP address, but this example do not support this configuration, so it need to be enable multicast promiscuous mode instead. Signed-off-by: Wei Zhao <wei.zhao1@intel.com> Tested-by: Dong Wang <dong1.wang@intel.com>
2018-10-26examples/vdpa: fix spelling in error messageStephen Hemminger
Fixes: edbed86d1cc3 ("examples/vdpa: introduce a new sample for vDPA") Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-10-27examples/l3fwd-power: fix build with iccThomas Monjalon
main.c(376): error #592: variable "lcore_id" is used before its value is set RTE_SET_USED(lcore_id); ^ The variables were voided with RTE_SET_USED without an obvious reason. Removing these voidings should avoid the icc error. Fixes: a137d012 ("examples/l3fwd-power: support traffic pattern aware control") Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-10-26examples/kni: improve zeroing statisticsDan Gora
The worker threads incrementing the rx/tx_packets race with the signal handler from the main thread zeroing the entire statistics structure. This can cause the statistics to fail to be zeroed, even when there is no traffic on those interfaces. Improve zeroing the statistics by only incrementing rx/tx_packets in worker threads by a non-zero amount. This limits the race to the periods in which traffic is actually being received or transmitted. Signed-off-by: Dan Gora <dg@adax.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-10-26examples/kni: add logs to show and clear statsDan Gora
Add logging messages showing the commands necessary for the user to have the application display and zero the statistics. Signed-off-by: Dan Gora <dg@adax.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-10-26examples/kni: monitor and update link state continuallyDan Gora
Update KNI example to add the command line flag '-m' to enable a function to continuously monitor the Ethernet link status of the physical link and update the link status of the corresponding interfaces with rte_kni_update_link(). Signed-off-by: Dan Gora <dg@adax.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-10-26examples/power: support meson/ninja buildDavid Hunt
Add meson.build in vm_power_manager and the guest_cli subdirectory. Building can be achieved by going to the build directory, and using meson configure -Dexamples=vm_power_manager,vm_power_manager/guest_cli Then, when ninja is invoked, it will build dpdk-vm_power_manger and dpdk-guest_cli Work still needs to be done on the meson build system to handles the case where the target list of example apps is defined as 'all'. That will come in a future patch. Signed-off-by: David Hunt <david.hunt@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-10-26examples/power: clean up verbose messagesDavid Hunt
Some messages appearing several times a second, removing as they are unnecessary. Other less severe messages change from INFO to DEBUG Signed-off-by: David Hunt <david.hunt@intel.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-10-26examples/power: add JSON string handlingDavid Hunt
Add JSON string handling to vm_power_manager for JSON strings received through the fifo. The format of the JSON strings are detailed in the next patch, the vm_power_manager user guide documentation updates. This patch introduces a new dependency on Jansson, a C library for encoding, decoding and manipulating JSON data. To compile the sample app you now need to have installed libjansson4 and libjansson-dev (these may be named slightly differently depending on your Operating System) Signed-off-by: David Hunt <david.hunt@intel.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-10-26examples/power: increase allowed number of clientsDavid Hunt
Now that we're handling host policies, containers and virtual machines, we'll rename MAX_VMS to MAX_CLIENTS, and increase from 4 to 64 Signed-off-by: David Hunt <david.hunt@intel.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-10-26examples/power: add host channel to power managerDavid Hunt
This patch adds a fifo channel to the vm_power_manager app through which we can send commands and polices. Intended for sending JSON strings. The fifo is at /tmp/powermonitor/fifo Signed-off-by: David Hunt <david.hunt@intel.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-10-26examples/power: set core type in guest appDavid Hunt
The changes here are minimal, as the guest app functionality is not changing at all, but there is a new element in the channel_packet struct that needs to have a default set (channel_packet->core_type). Signed-off-by: David Hunt <david.hunt@intel.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-10-26examples/power: allow number of VMs to be zeroDavid Hunt
Previously the vm_power_manager app required to have some vms defined, so the call to get_all_vm() always set the noVms variable. Now we're accepting policies from the host OS (without any VMs defined), so it is now valid to have zero VMs. This patch initialises the relevant variables to zero just in case the call to get_all_vms() does not find any, so could return with the variables uninitialised. Signed-off-by: David Hunt <david.hunt@intel.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-10-26examples/power: add checks around hypervisorDavid Hunt
Allow vm_power_manager to run without requiring qemu to be present on the machine. This will be required for instances where the JSON interface is used for commands and polices, without any VMs present. A use case for this is a container enviromnent. Signed-off-by: David Hunt <david.hunt@intel.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-10-26examples/l3fwd-power: support traffic pattern aware controlLiang Ma
Add the support for new traffic pattern aware power control power management API. Example: ./l3fwd-power -l xxx -n 4 -w 0000:xx:00.0 -w 0000:xx:00.1 -- -p 0x3 -P --config="(0,0,xx),(1,0,xx)" --empty-poll="0,0,0" -l 14 -m 9 -h 1 Please Reference l3fwd-power document for full parameter usage The option "l", "m", "h" are used to set the power index for LOW, MED, HIGH power state. Only is useful after enable empty-poll --empty-poll="training_flag, med_threshold, high_threshold" The option training_flag is used to enable/disable training mode. The option med_threshold is used to indicate the empty poll threshold of modest state which is customized by user. The option high_threshold is used to indicate the empty poll threshold of busy state which is customized by user. Above three option default value is all 0. Once enable empty-poll. System will apply the default parameter if no other command line options are provided. If training mode is enabled, the user should ensure that no traffic is allowed to pass through the system. When training phase complete, the application transfer to normal operation System will start running with the modest power mode. If the traffic goes above 70%, then system will move to High power state. If the traffic drops below 30%, the system will fallback to the modest power state. Example code use master thread to monitoring worker thread busyness. The default timer resolution is 10ms. Signed-off-by: Liang Ma <liang.j.ma@intel.com> Reviewed-by: Lei Yao <lei.a.yao@intel.com> Acked-by: David Hunt <david.hunt@intel.com>
2018-10-22mk: build with _GNU_SOURCE defined by defaultAnatoly Burakov
We use _GNU_SOURCE all over the place, but often times we miss defining it, resulting in broken builds on musl. Rather than fixing every library's and driver's and application's makefile, fix it by simply defining _GNU_SOURCE by default for all builds. Remove all usages of _GNU_SOURCE in source files and makefiles, and also fixup a couple of instances of using __USE_GNU instead of _GNU_SOURCE. Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-10-17examples/multi_process: add hotplug sampleQi Zhang
The sample code demonstrates device (ethdev only) management at a multi-process environment. The user can attach/detach a device on primary process and see it is synced on secondary process automatically. How to start? ./hotplug_mp --proc-type=auto Command Line Example: >help >list /* attach a pci device */ > attach 0000:81:00.0 /* detach the pci device */ > detach 0000:81:00.0 /* attach a vdev af_packet device */ > attach net_af_packet,iface=eth0 /* detach the vdev af_packet device */ > detach net_af_packet Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2018-10-12examples/ip_pipeline: support packet decap actionCristian Dumitrescu
Add support for packet decap table action. Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2018-10-12examples/ip_pipeline: support packet tag actionCristian Dumitrescu
Add support for the packet tag table action. Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2018-10-12examples/ip_pipeline: fix IPv6 endiannessReshma Pattan
Fix IPv6 endianness from big endian to CPU order. Fixes: a3a95b7d58 ("examples/ip_pipeline: add table entry commands") Cc: stable@dpdk.org Signed-off-by: Reshma Pattan <reshma.pattan@intel.com> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2018-10-12examples/ip_pipeline: add symmetric crypto exampleFan Zhang
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2018-10-12examples/ip_pipeline: add CLI for symmetric cryptoFan Zhang
This patch updates the cli parsing of ip_pipeline application with extra symmetric crypto, port, session, and action support. Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2018-10-12examples/ip_pipeline: support symmetric crypto actionFan Zhang
This patch adds symmetric crypto action support to ip_pipeline application. Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>