Commit Graph

86 Commits

Author SHA1 Message Date
Fan Zhang
29fe4822f5 net/softnic: add cryptodev
This patch adds cryptodev abstraction to softnic. The DPDK
Cryptodevs are abstracted as crypto ports in the softnic.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2018-10-26 14:13:45 +02:00
Reshma Pattan
636e5af038 net/softnic: support flow API VXLAN encap action
Added support for ethdev flow API VXLAN encap action.

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2018-10-17 15:04:39 +02:00
Cristian Dumitrescu
0dac5d7ea0 net/softnic: support VXLAN encap
Add CLI support for VXLAN encap.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2018-10-17 15:04:08 +02:00
Anatoly Burakov
5d7b673d5f mk: build with _GNU_SOURCE defined by default
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-22 11:28:27 +02:00
Cristian Dumitrescu
abe92131c9 net/softnic: support VXLAN flow decap action
Add support for ethdev flow API VXLAN decap action.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2018-10-12 19:33:40 +02:00
Cristian Dumitrescu
b9bcbeeccb net/softnic: support packet decap action
Add support for packet decap table action.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2018-10-12 19:33:39 +02:00
Cristian Dumitrescu
974a48d42b net/softnic: support flow mark action
Add support for ethdev flow API mark action.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2018-10-12 19:33:33 +02:00
Cristian Dumitrescu
16d2d65325 net/softnic: support packet tag action
Add support for packet tag table action.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2018-10-12 19:33:31 +02:00
Reshma Pattan
b53258c14c net/softnic: support flow flush
Add rte flow flush api for flushing
all the flows of the port.

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2018-10-12 19:33:23 +02:00
Reshma Pattan
13b8c6802d net/softnic: fix IPv6 endianness
Fix IPv6 endianness from big endian to CPU order.

Fixes: ee19326a4b ("net/softnic: add command for pipeline table entries")
Cc: stable@dpdk.org

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2018-10-12 19:33:22 +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
Ferruh Yigit
323e7b667f ethdev: make default behavior CRC strip on Rx
Removed DEV_RX_OFFLOAD_CRC_STRIP offload flag.
Without any specific Rx offload flag, default behavior by PMDs is to
strip CRC.

PMDs that support keeping CRC should advertise DEV_RX_OFFLOAD_KEEP_CRC
Rx offload capability.

Applications that require keeping CRC should check PMD capability first
and if it is supported can enable this feature by setting
DEV_RX_OFFLOAD_KEEP_CRC in Rx offload flag in rte_eth_dev_configure()

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Jan Remes <remes@netcope.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hyong Youb Kim <hyonkim@cisco.com>
2018-09-14 20:08:41 +02:00
Cristian Dumitrescu
1af2dc5111 net/softnic: add command for default tmgr hierarchy
Add support for creating default Traffic Manager (TMGR) hierarchy through
firmware CLI script.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-07-25 19:29:15 +02:00
Cristian Dumitrescu
e1e31efcc9 net/softnic: add command for tmgr hierarchy commit
Add support for Traffic Manager (TMGR) hierarchy commit through
firmware CLI script.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-07-25 19:28:51 +02:00
Cristian Dumitrescu
f870fe036f net/softnic: add command for tmgr node addition
Add support for adding Traffic Manager (TMGR) hierarchy node through
firmware CLI script.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-07-25 19:28:26 +02:00
Cristian Dumitrescu
f137ae5c54 net/softnic: add command for tmgr shared shaper
Add support to create Traffic Manager (TMGR) shared shaper through
firmware CLI script.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-07-25 19:28:01 +02:00
Cristian Dumitrescu
552e3f72d4 net/softnic: add command for tmgr shaper profile
Add support to create Traffic Manager (TMGR) shaper profile
through firmware CLI script.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-07-25 19:27:34 +02:00
Cristian Dumitrescu
c73369e6d1 net/softnic: add command for tmgr create
Add support to create Traffic Manager (TMGR) object through firmware
CLI script.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-07-25 19:27:07 +02:00
Jasvinder Singh
3edc242d45 net/softnic: fix memory illegal access after free
While deleting the elements from the linked list, TAILQ_FOREACH causes
read from the freed pointer. Fixes the issue by using TAILQ_FOREACH_SAFE
instead.

Coverity issue: 302867
Fixes: bef50bcb1c ("net/softnic: implement start and stop")

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2018-07-23 23:55:26 +02:00
Jasvinder Singh
d16eaa369c net/softnic: add firmware script
Add default firmware script for softnic.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-07-12 13:55:42 +02:00
Jasvinder Singh
bef50bcb1c net/softnic: implement start and stop
Implements softnic start and stop function.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-07-12 13:55:21 +02:00
Jasvinder Singh
41575f6d5a net/softnic: setup Rx/Tx queues
Implements softnic receive and transmit queues setup using swq object.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-07-12 13:55:03 +02:00
Jasvinder Singh
2505030a83 net/softnic: add command for TTL action
Add cli commands for ttl action in softnic pipeline objects.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-07-12 13:54:42 +02:00
Jasvinder Singh
9bc0ce0ad1 net/softnic: add command for meter action
Add cli commands for meter action in softnic pipeline objects.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-07-12 13:54:22 +02:00
Jasvinder Singh
6d4d054025 net/softnic: add command to read stats
Add cli commands to read port and table stats of
softnic pipeline objects.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-07-12 13:54:01 +02:00