Commit Graph

15152 Commits

Author SHA1 Message Date
Fan Zhang
d46fe9448c examples/ip_pipeline: support symmetric crypto action
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>
2018-10-12 19:33:15 +02:00
Fan Zhang
e1884698f6 examples/ip_pipeline: configure crypto port
This patch adds symmetric crypto port configuration to ip_pipeline
sample application.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2018-10-12 19:33:11 +02:00
Fan Zhang
bd9b67a109 examples/ip_pipeline: add cryptodev
This patch adds symmetric crypto device abstraction to ip_pipeline
sameple application.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2018-10-12 19:33:09 +02:00
Fan Zhang
96303217a6 pipeline: add symmetric crypto table action
This patch adds the symmetric crypto action support to pipeline
library. The symmetric crypto action works as the shim layer
between pipeline and DPDK cryptodev and is able to interact with
cryptodev with the control path requests such as session
creation/deletion and data path work to assemble the crypto
operations for received packets.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2018-10-12 19:33:07 +02:00
Fan Zhang
cc85c0781f port: add symmetric crypto
This patch adds the symmetric crypto support to port library.
The crypto port acts as a shim layer to DPDK cryptodev library and
supports in-place crypto workload processing.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2018-10-12 19:33:02 +02:00
Jasvinder Singh
7e30e444c3 net/softnic: support flow meter action
Implement flow rules with meter action.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-10-12 17:59:16 +02:00
Jasvinder Singh
ccc599e9f4 net/softnic: read meter statistics
Implement meter object stats read function.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-10-12 17:59:15 +02:00
Jasvinder Singh
8a917ef88d net/softnic: update policer actions
Implement meter object policer actions function.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-10-12 17:59:14 +02:00
Jasvinder Singh
8602bcae02 net/softnic: update DSCP table
Implement meter object dscp table update.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-10-12 17:59:13 +02:00
Jasvinder Singh
b89f4a5791 net/softnic: update meter profile
Implement meter profile update function

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-10-12 17:59:13 +02:00
Jasvinder Singh
dcffaf060e net/softnic: destroy meter object
Implement meter object destroy function.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-10-12 17:59:12 +02:00
Jasvinder Singh
e00231030c net/softnic: create meter object
implement meter object create function.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-10-12 17:59:11 +02:00
Jasvinder Singh
fd338e0b50 net/softnic: delete meter profile
Implement meter profile delete function.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-10-12 17:59:10 +02:00
Jasvinder Singh
0d73ddf25f net/softnic: add meter profile
Implement meter profile add function.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-10-12 17:59:09 +02:00
Jasvinder Singh
9e800b9082 net/softnic: support metering and policing
Enable metering and policing support for softnic.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-10-12 17:59:09 +02:00
Reshma Pattan
193de77b60 net/softnic: parse raw flow item
Added support for parsing raw flow item.
flow_item_raw_preprocess() is added for the same.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
2018-10-12 17:59:08 +02:00
Reshma Pattan
a373200590 net/softnic: support flow query
Added pmd_flow_query() API, for flow query
support.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
2018-10-12 17:59:07 +02:00
Reshma Pattan
bd0447d2c5 net/softnic: support flow destroy
pmd_flow_destroy() API is added to destroy the
created flow.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
2018-10-12 17:59:06 +02:00
Reshma Pattan
11c5da41c7 net/softnic: support flow create
pmd_flow_create API is added to support
rte flow create.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
2018-10-12 17:59:05 +02:00
Reshma Pattan
daabf2fb94 net/softnic: map flow action to table action
Added validation and mapping of flow rule action
with table action profile.

Added flow_rule_action_get() to do the same.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
2018-10-12 17:59:05 +02:00
Reshma Pattan
061ee47cf5 net/softnic: map flow match to hash table
Support for validating and mapping flow rule with HASH
table match is added.

As part of this, below helper functions are added.
flow_rule_match_hash_get()
hash_key_mask_is_same()

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
2018-10-12 17:59:04 +02:00
Reshma Pattan
6655737d2f net/softnic: parse flow match for ACL table
Added flow protocol parsing for IPV4/IPV6 and
TCP/UDP/SCTP for ACL table rule match.

Added below helper functions for doing the same.
port_mask_to_range()
ipv6_mask_to_depth()
ipv4_mask_to_depth()
mask_to_depth()

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
2018-10-12 17:59:03 +02:00
Reshma Pattan
fd9f4290e5 net/softnic: map flow match to ACL table
Support for validating and mapping rte flow rule with
ACL table match is added.

As part of this support below utility functions
been added
flow_rule_match_get()
flow_rule_match_acl_get()
flow_item_skip_disabled_protos()
flow_item_proto_preprocess()
flow_item_is_proto()
flow_item_raw_preprocess()

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
2018-10-12 17:59:03 +02:00
Reshma Pattan
8364aa4734 net/softnic: support flow validate
Start adding flow api operations.

Started with flow validate api support by adding
below basic infrastructure.

flow_pipeline_table_get()
pmd_flow_validate()

Additional flow validate changes will be
added in next patches.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
2018-10-12 17:59:02 +02:00
Reshma Pattan
e12b177090 net/softnic: get eth device
Add utility function to get the rte_eth_dev from
a given softnic.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
2018-10-12 17:59:01 +02:00
Reshma Pattan
51442e0684 net/softnic: add table and port helper functions
Added utility function to freeup the
pipeline tables.

Added utility functions to find the pipeline
output port.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
2018-10-12 17:59:01 +02:00
Reshma Pattan
b767f8efc8 net/softnic: replace pointers with arrays
Change dev_name, action_profile_name and key_mask
from char* type to arary type of structures
softnic_port_in_params, softnic_port_out_params
and softnic_table_hash_params.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
2018-10-12 17:58:59 +02:00
Reshma Pattan
e44856f23f net/softnic: add flow attribute option
Added new cli by which user can specify to softnic
which rte flow group and direction has to mapped to
which pipeline and table.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
2018-10-12 17:58:58 +02:00
Reshma Pattan
c169b6a588 net/softnic: map flow attribute to pipeline table
Added mapping support from rte_flow attributes
to softnic pipeline and table.

So added flow attribute map set and get functions
definition to new file rte_eth_sofnic_flow.c.

Added pmd flow internals with ingress and egress
flow attribute maps.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
2018-10-12 17:58:57 +02:00
Reshma Pattan
90ec92a06d net/softnic: add flow API
Add rte_flow infra structure for flow api support.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
2018-10-12 17:58:55 +02:00
Kevin Laatz
e976ffaa57 net/softnic: use table library headers
This commit modifies SoftNIC to make use of the new header files in
librte_table.

As we are now using the new header files in librte_table in SoftNIC, we no
longer need the old header files so they can be removed.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-12 17:58:55 +02:00
Kevin Laatz
a5bd3a14ab examples/ip_pipeline: use table library headers
This commit modifies the IP Pipeline application to use the new header
files in librte_table.

As we are now using the new header files, we can remove the old ones from
the application directory.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-12 17:58:54 +02:00
Kevin Laatz
ea7be0a038 lib/librte_table: add hash function headers
This commit adds rte_table_hash_func.h and rte_table_hash_func_arm64.h to
librte_table. This reduces code duplication by removing duplicate header
files within two folders and consolidating them into a single one. This
also adds a scalar implementation of the x86_64 intrinsic for crc32 as a
generic fallback.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-12 17:58:53 +02:00
Cristian Dumitrescu
44cad685ee examples/ip_pipeline: support VXLAN encap
Add CLI support for VXLAN encap.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2018-10-12 17:58:21 +02:00
Cristian Dumitrescu
b594cf43c3 pipeline: add VXLAN encap table action
Add support for VXLAN as part of the encap table action.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2018-10-12 17:57:44 +02:00
Krzysztof Kanas
6673fe0ce2 app/testpmd: add TM commands to mark packets
Add following testpmd run-time commands to support test of TM packet
marking:

set port tm mark ip_ecn   <port_id> <green> <yellow> <red>
set port tm mark ip_dscp  <port_id> <green> <yellow> <red>
set port tm mark vlan_dei <port_id> <green> <yellow> <red>

Signed-off-by: Krzysztof Kanas <krzysztof.kanas@caviumnetworks.com>
2018-10-08 17:53:03 +02:00
Jasvinder Singh
a0f367eb06 app/testpmd: fix metering and policing commands
Fixes bad arguments error for cli commands related to adding meter
profile for srtcm_rfc2697, trtcm_rfc2698 and trtcm_rfc4115.

error log:
testpmd> add port meter profile trtcm_rfc2698 2 0 3125000000
3125000000 2500000 2500000
Bad arguments

Fixes: 30ffb4e67e ("app/testpmd: add commands traffic metering and policing")
Cc: stable@dpdk.org

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2018-10-08 17:52:48 +02:00
Jasvinder Singh
923010592a sched: allocate memory on the given socket id
Replace rte_zmalloc() with rte_zmalloc_socket() to allocate
memory on the socket id provided by the application.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2018-10-08 17:52:29 +02:00
Rosen Xu
9378d24bef ethdev: expand queue threshold size of RED parameters
There's very commonly that more than 4G DDR memory in NIC for HQoS,
so right now the queue threshold size of RED needs to expand to
uint64_t. This patch fixes it.

Signed-off-by: Rosen Xu <rosen.xu@intel.com>
2018-10-08 17:51:54 +02:00
Vivek Sharma
bed70e5deb eal: use correct data type for bitmap slab operations
Currently, slab operations use unsigned long data type for 64-bit slab
related operations. On target 'i686-native-linuxapp-gcc', unsigned long
is 32-bit and thus, slab operations breaks on this target. Changing slab
operations to use unsigned long long for correct functioning on
all targets.

Fixes: de3cfa2c98 ("sched: initial import")
Fixes: 693f715da4 ("remove extra parentheses in return statement")
Cc: stable@dpdk.org

Signed-off-by: Vivek Sharma <vivek.sharma@caviumnetworks.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2018-10-08 17:51:24 +02:00
Ivan Malov
662e382244 net/sfc: allow to query RSS key and HF when RSS is disabled
If global RSS is not enabled in the multiqueue mode setting,
it will not be possible to change RSS configuration. However,
querying default RSS settings should be possible in any case since
it may be needed by RTE flow API users to find out what RSS settings
will be used by default for a flow rule with RSS action if custom
RSS key and hash function choice are not specified.

Fixes: 63ab5e0c8f ("net/sfc: use zero RSS channels as disabled RSS indicator")
Cc: stable@dpdk.org

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-10-11 20:35:29 +02:00
Ivan Malov
453e1d4baa net/sfc: allow to query RSS key and HF in isolated mode
Isolated mode prevents global RSS from being enabled and configured.
However, an application may need to query default RSS key and hash
functions when a flow rule with RSS action is added which does not
contain custom RSS key or hash function choice. In this case
global RSS key and hash functions will be used to handle the rule,
and there should be some way for the application to query these
global default settings to clarify expectations on the traffic
distribution.

Fixes: 84a9b48128 ("net/sfc: support flow API isolated mode")
Cc: stable@dpdk.org

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-10-11 20:35:29 +02:00
Ivan Malov
5205c436a3 net/sfc: do not skip RSS configuration step on reconfigure
Earlier a patch was made to support change of Rx queue
number. That patch added goto label in wrong place
because reconfiguration with the same number of queues
results in skipping not only queue init but also RSS
settings. If a user configures device with RSS multiqueue
mode and then wants to stop it and reconfigure without RSS,
this change will be ignored and RSS will continue working.

Move the label in the right place and rename it to describe it.

Fixes: 55a539003f ("net/sfc: support changing the number of receive queues")
Cc: stable@dpdk.org

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-10-11 19:34:29 +02:00
Xiaolong Ye
45e4cf1939 net/ifc: invoke ifcvf HW init function in probe
As ifcvf_init_hw is independent with ifcvf_vfio_setup, it's better to
invoke it directly in probe func.

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
2018-10-11 18:56:02 +02:00
Xiao Wang
3e2923cffa net/ifc: fix address translation function name
The address translation from user virtual address to guest physical
address should not be named as qva_to_gpa.

Fixes: a3f8150eac ("net/ifcvf: add ifcvf vDPA driver")
Cc: stable@dpdk.org

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
2018-10-11 18:56:02 +02:00
Luca Boccassi
362488e631 net/e1000: enable MSI-x for linkup and other events in 82574
Linux supports 82574 MSI-x interrupt for linkup and other link
conditions. Enable the same feature in the e1000 PMD in order to
allow this card to work properly, as it requires interrupt
handling for link negotiations among other things.

Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
2018-10-11 18:56:02 +02:00
Luca Boccassi
d7812ffd83 net/e1000: do not error out if Rx drop enable is set
rx_drop_en is an optimization that does nothing on single-queue
devices like e1000. Do not force applications that do not care to
select per-devices optimizations flags by returning an error, just
log it and carry on.

Fixes: 805803445a ("e1000: support EM devices (also known as e1000/e1000e)")
Cc: stable@dpdk.org

Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
2018-10-11 18:56:02 +02:00
Xiaoyu Min
2ed2fe5f0a net/mlx5: rewrite IP address UDP/TCP port by E-Switch
Offload the following rte_flow actions by inserting accordingly
E-Switch rules via TC Flower driver

 - RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC
 - RTE_FLOW_ACTION_TYPE_SET_IPV4_DST
 - RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC
 - RTE_FLOW_ACTION_TYPE_SET_IPV6_DST
 - RTE_FLOW_ACTION_TYPE_SET_TP_SRC
 - RTE_FLOW_ACTION_TYPE_SET_TP_DST

The example testpmd command is:

    flow create 0 transfer ingress
         pattern eth / ipv4 / udp dst is 7000 / end
	 actions set_ipv4_src ipv4_addr 172.168.0.1 /
	 set_ipv4_dst ipv4_addr 172.168.10.1 /
	 set_tp_dst port 9000 /
	 set_tp_src port 700 /
	 port_id id 1 / end

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-10-11 18:56:02 +02:00
Moti Haimovsky
92378c2b7f net/mlx5: support e-switch TCP-flags flow filter
This patch adds support for offloading flow rules with TCP-flags
filter to mlx5 eswitch Hardwrae.

With mlx5 it is possible to offload a limited set of flow rules to
the mlxsw (or e-switch) using the DPDK flow commands using the
"transfer" attribute. This set of flow rules also supports filtering
according to the values found in the TCP flags.
This patch implements this offload capability in the mlx5 PMD under
transfer attribute.

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
2018-10-11 18:56:02 +02:00
Dekel Peled
3e9fa07908 net/mlx5: allow flow rule with attribute egress
This patch complements [1], adding to MLX5 PMD the option to set
flow rule for egress traffic.

[1] "net/mlx5: support metadata as flow rule criteria"
    http://mails.dpdk.org/archives/dev/2018-September/113275.html

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-10-11 18:56:02 +02:00