* Re: [PATCH 01/22] ethdev: introduce generic flow API
From: Kevin Traynor @ 2016-11-30 17:47 UTC (permalink / raw)
To: Adrien Mazarguil, dev
Cc: Thomas Monjalon, Pablo de Lara, Olivier Matz, sugesh.chandra
In-Reply-To: <1c8a8e4fec73ed33836f1da9525b1b8b53048518.1479309720.git.adrien.mazarguil@6wind.com>
Hi Adrien,
On 11/16/2016 04:23 PM, Adrien Mazarguil wrote:
> This new API supersedes all the legacy filter types described in
> rte_eth_ctrl.h. It is slightly higher level and as a result relies more on
> PMDs to process and validate flow rules.
>
> Benefits:
>
> - A unified API is easier to program for, applications do not have to be
> written for a specific filter type which may or may not be supported by
> the underlying device.
>
> - The behavior of a flow rule is the same regardless of the underlying
> device, applications do not need to be aware of hardware quirks.
>
> - Extensible by design, API/ABI breakage should rarely occur if at all.
>
> - Documentation is self-standing, no need to look up elsewhere.
>
> Existing filter types will be deprecated and removed in the near future.
I'd suggest to add a deprecation notice to deprecation.rst, ideally with
a target release.
>
> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> ---
> MAINTAINERS | 4 +
> lib/librte_ether/Makefile | 3 +
> lib/librte_ether/rte_eth_ctrl.h | 1 +
> lib/librte_ether/rte_ether_version.map | 10 +
> lib/librte_ether/rte_flow.c | 159 +++++
> lib/librte_ether/rte_flow.h | 947 ++++++++++++++++++++++++++++
> lib/librte_ether/rte_flow_driver.h | 177 ++++++
> 7 files changed, 1301 insertions(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index d6bb8f8..3b46630 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -243,6 +243,10 @@ M: Thomas Monjalon <thomas.monjalon@6wind.com>
> F: lib/librte_ether/
> F: scripts/test-null.sh
>
> +Generic flow API
> +M: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> +F: lib/librte_ether/rte_flow*
> +
> Crypto API
> M: Declan Doherty <declan.doherty@intel.com>
> F: lib/librte_cryptodev/
> diff --git a/lib/librte_ether/Makefile b/lib/librte_ether/Makefile
> index efe1e5f..9335361 100644
> --- a/lib/librte_ether/Makefile
> +++ b/lib/librte_ether/Makefile
> @@ -44,6 +44,7 @@ EXPORT_MAP := rte_ether_version.map
> LIBABIVER := 5
>
> SRCS-y += rte_ethdev.c
> +SRCS-y += rte_flow.c
>
> #
> # Export include files
> @@ -51,6 +52,8 @@ SRCS-y += rte_ethdev.c
> SYMLINK-y-include += rte_ethdev.h
> SYMLINK-y-include += rte_eth_ctrl.h
> SYMLINK-y-include += rte_dev_info.h
> +SYMLINK-y-include += rte_flow.h
> +SYMLINK-y-include += rte_flow_driver.h
>
> # this lib depends upon:
> DEPDIRS-y += lib/librte_net lib/librte_eal lib/librte_mempool lib/librte_ring lib/librte_mbuf
> diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h
> index fe80eb0..8386904 100644
> --- a/lib/librte_ether/rte_eth_ctrl.h
> +++ b/lib/librte_ether/rte_eth_ctrl.h
> @@ -99,6 +99,7 @@ enum rte_filter_type {
> RTE_ETH_FILTER_FDIR,
> RTE_ETH_FILTER_HASH,
> RTE_ETH_FILTER_L2_TUNNEL,
> + RTE_ETH_FILTER_GENERIC,
> RTE_ETH_FILTER_MAX
> };
>
> diff --git a/lib/librte_ether/rte_ether_version.map b/lib/librte_ether/rte_ether_version.map
> index 72be66d..b5d2547 100644
> --- a/lib/librte_ether/rte_ether_version.map
> +++ b/lib/librte_ether/rte_ether_version.map
> @@ -147,3 +147,13 @@ DPDK_16.11 {
> rte_eth_dev_pci_remove;
>
> } DPDK_16.07;
> +
> +DPDK_17.02 {
> + global:
> +
> + rte_flow_validate;
> + rte_flow_create;
> + rte_flow_destroy;
> + rte_flow_query;
> +
> +} DPDK_16.11;
> diff --git a/lib/librte_ether/rte_flow.c b/lib/librte_ether/rte_flow.c
> new file mode 100644
> index 0000000..064963d
> --- /dev/null
> +++ b/lib/librte_ether/rte_flow.c
> @@ -0,0 +1,159 @@
> +/*-
> + * BSD LICENSE
> + *
> + * Copyright 2016 6WIND S.A.
> + * Copyright 2016 Mellanox.
There's Mellanox copyright but you are the only signed-off-by - is that
right?
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + *
> + * * Redistributions of source code must retain the above copyright
> + * notice, this list of conditions and the following disclaimer.
> + * * Redistributions in binary form must reproduce the above copyright
> + * notice, this list of conditions and the following disclaimer in
> + * the documentation and/or other materials provided with the
> + * distribution.
> + * * Neither the name of 6WIND S.A. nor the names of its
> + * contributors may be used to endorse or promote products derived
> + * from this software without specific prior written permission.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> + */
> +
> +#include <stdint.h>
> +
> +#include <rte_errno.h>
> +#include <rte_branch_prediction.h>
> +#include "rte_ethdev.h"
> +#include "rte_flow_driver.h"
> +#include "rte_flow.h"
> +
> +/* Get generic flow operations structure from a port. */
> +const struct rte_flow_ops *
> +rte_flow_ops_get(uint8_t port_id, struct rte_flow_error *error)
> +{
> + struct rte_eth_dev *dev = &rte_eth_devices[port_id];
> + const struct rte_flow_ops *ops;
> + int code;
> +
> + if (unlikely(!rte_eth_dev_is_valid_port(port_id)))
> + code = ENODEV;
> + else if (unlikely(!dev->dev_ops->filter_ctrl ||
> + dev->dev_ops->filter_ctrl(dev,
> + RTE_ETH_FILTER_GENERIC,
> + RTE_ETH_FILTER_GET,
> + &ops) ||
> + !ops))
> + code = ENOTSUP;
> + else
> + return ops;
> + rte_flow_error_set(error, code, RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
> + NULL, rte_strerror(code));
> + return NULL;
> +}
> +
Is it expected that the application or pmd will provide locking between
these functions if required? I think it's going to have to be the app.
> +/* Check whether a flow rule can be created on a given port. */
> +int
> +rte_flow_validate(uint8_t port_id,
> + const struct rte_flow_attr *attr,
> + const struct rte_flow_item pattern[],
> + const struct rte_flow_action actions[],
> + struct rte_flow_error *error)
> +{
> + const struct rte_flow_ops *ops = rte_flow_ops_get(port_id, error);
> + struct rte_eth_dev *dev = &rte_eth_devices[port_id];
> +
> + if (unlikely(!ops))
> + return -rte_errno;
> + if (likely(!!ops->validate))
> + return ops->validate(dev, attr, pattern, actions, error);
> + rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
> + NULL, rte_strerror(ENOTSUP));
> + return -rte_errno;
> +}
> +
> +/* Create a flow rule on a given port. */
> +struct rte_flow *
> +rte_flow_create(uint8_t port_id,
> + const struct rte_flow_attr *attr,
> + const struct rte_flow_item pattern[],
> + const struct rte_flow_action actions[],
> + struct rte_flow_error *error)
> +{
> + struct rte_eth_dev *dev = &rte_eth_devices[port_id];
> + const struct rte_flow_ops *ops = rte_flow_ops_get(port_id, error);
> +
> + if (unlikely(!ops))
> + return NULL;
> + if (likely(!!ops->create))
> + return ops->create(dev, attr, pattern, actions, error);
> + rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
> + NULL, rte_strerror(ENOTSUP));
> + return NULL;
> +}
> +
> +/* Destroy a flow rule on a given port. */
> +int
> +rte_flow_destroy(uint8_t port_id,
> + struct rte_flow *flow,
> + struct rte_flow_error *error)
> +{
> + struct rte_eth_dev *dev = &rte_eth_devices[port_id];
> + const struct rte_flow_ops *ops = rte_flow_ops_get(port_id, error);
> +
> + if (unlikely(!ops))
> + return -rte_errno;
> + if (likely(!!ops->destroy))
> + return ops->destroy(dev, flow, error);
> + rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
> + NULL, rte_strerror(ENOTSUP));
> + return -rte_errno;
> +}
> +
> +/* Destroy all flow rules associated with a port. */
> +int
> +rte_flow_flush(uint8_t port_id,
> + struct rte_flow_error *error)
> +{
> + struct rte_eth_dev *dev = &rte_eth_devices[port_id];
> + const struct rte_flow_ops *ops = rte_flow_ops_get(port_id, error);
> +
> + if (unlikely(!ops))
> + return -rte_errno;
> + if (likely(!!ops->flush))
> + return ops->flush(dev, error);
> + rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
> + NULL, rte_strerror(ENOTSUP));
> + return -rte_errno;
> +}
> +
> +/* Query an existing flow rule. */
> +int
> +rte_flow_query(uint8_t port_id,
> + struct rte_flow *flow,
> + enum rte_flow_action_type action,
> + void *data,
> + struct rte_flow_error *error)
> +{
> + struct rte_eth_dev *dev = &rte_eth_devices[port_id];
> + const struct rte_flow_ops *ops = rte_flow_ops_get(port_id, error);
> +
> + if (!ops)
> + return -rte_errno;
> + if (likely(!!ops->query))
> + return ops->query(dev, flow, action, data, error);
> + rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
> + NULL, rte_strerror(ENOTSUP));
> + return -rte_errno;
> +}
> diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h
> new file mode 100644
> index 0000000..211f307
> --- /dev/null
> +++ b/lib/librte_ether/rte_flow.h
> @@ -0,0 +1,947 @@
> +/*-
> + * BSD LICENSE
> + *
> + * Copyright 2016 6WIND S.A.
> + * Copyright 2016 Mellanox.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + *
> + * * Redistributions of source code must retain the above copyright
> + * notice, this list of conditions and the following disclaimer.
> + * * Redistributions in binary form must reproduce the above copyright
> + * notice, this list of conditions and the following disclaimer in
> + * the documentation and/or other materials provided with the
> + * distribution.
> + * * Neither the name of 6WIND S.A. nor the names of its
> + * contributors may be used to endorse or promote products derived
> + * from this software without specific prior written permission.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> + */
> +
> +#ifndef RTE_FLOW_H_
> +#define RTE_FLOW_H_
> +
> +/**
> + * @file
> + * RTE generic flow API
> + *
> + * This interface provides the ability to program packet matching and
> + * associated actions in hardware through flow rules.
> + */
> +
> +#include <rte_arp.h>
> +#include <rte_ether.h>
> +#include <rte_icmp.h>
> +#include <rte_ip.h>
> +#include <rte_sctp.h>
> +#include <rte_tcp.h>
> +#include <rte_udp.h>
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> +/**
> + * Flow rule attributes.
> + *
> + * Priorities are set on two levels: per group and per rule within groups.
> + *
> + * Lower values denote higher priority, the highest priority for both levels
> + * is 0, so that a rule with priority 0 in group 8 is always matched after a
> + * rule with priority 8 in group 0.
> + *
> + * Although optional, applications are encouraged to group similar rules as
> + * much as possible to fully take advantage of hardware capabilities
> + * (e.g. optimized matching) and work around limitations (e.g. a single
> + * pattern type possibly allowed in a given group).
> + *
> + * Group and priority levels are arbitrary and up to the application, they
> + * do not need to be contiguous nor start from 0, however the maximum number
> + * varies between devices and may be affected by existing flow rules.
> + *
> + * If a packet is matched by several rules of a given group for a given
> + * priority level, the outcome is undefined. It can take any path, may be
> + * duplicated or even cause unrecoverable errors.
I get what you are trying to do here wrt supporting multiple
pmds/hardware implementations and it's a good idea to keep it flexible.
Given that the outcome is undefined, it would be nice that the
application has a way of finding the specific effects for verification
and debugging.
> + *
> + * Note that support for more than a single group and priority level is not
> + * guaranteed.
> + *
> + * Flow rules can apply to inbound and/or outbound traffic (ingress/egress).
> + *
> + * Several pattern items and actions are valid and can be used in both
> + * directions. Those valid for only one direction are described as such.
> + *
> + * Specifying both directions at once is not recommended but may be valid in
> + * some cases, such as incrementing the same counter twice.
> + *
> + * Not specifying any direction is currently an error.
> + */
> +struct rte_flow_attr {
> + uint32_t group; /**< Priority group. */
> + uint32_t priority; /**< Priority level within group. */
> + uint32_t ingress:1; /**< Rule applies to ingress traffic. */
> + uint32_t egress:1; /**< Rule applies to egress traffic. */
> + uint32_t reserved:30; /**< Reserved, must be zero. */
> +};
> +
> +/**
> + * Matching pattern item types.
> + *
> + * Items are arranged in a list to form a matching pattern for packets.
> + * They fall in two categories:
> + *
> + * - Protocol matching (ANY, RAW, ETH, IPV4, IPV6, ICMP, UDP, TCP, SCTP,
> + * VXLAN and so on), usually associated with a specification
> + * structure. These must be stacked in the same order as the protocol
> + * layers to match, starting from L2.
> + *
> + * - Affecting how the pattern is processed (END, VOID, INVERT, PF, VF, PORT
> + * and so on), often without a specification structure. Since they are
> + * meta data that does not match packet contents, these can be specified
> + * anywhere within item lists without affecting the protocol matching
> + * items.
> + *
> + * See the description of individual types for more information. Those
> + * marked with [META] fall into the second category.
> + */
> +enum rte_flow_item_type {
> + /**
> + * [META]
> + *
> + * End marker for item lists. Prevents further processing of items,
> + * thereby ending the pattern.
> + *
> + * No associated specification structure.
> + */
> + RTE_FLOW_ITEM_TYPE_END,
> +
> + /**
> + * [META]
> + *
> + * Used as a placeholder for convenience. It is ignored and simply
> + * discarded by PMDs.
> + *
> + * No associated specification structure.
> + */
> + RTE_FLOW_ITEM_TYPE_VOID,
> +
> + /**
> + * [META]
> + *
> + * Inverted matching, i.e. process packets that do not match the
> + * pattern.
> + *
> + * No associated specification structure.
> + */
> + RTE_FLOW_ITEM_TYPE_INVERT,
> +
> + /**
> + * Matches any protocol in place of the current layer, a single ANY
> + * may also stand for several protocol layers.
> + *
> + * See struct rte_flow_item_any.
> + */
> + RTE_FLOW_ITEM_TYPE_ANY,
> +
> + /**
> + * [META]
> + *
> + * Matches packets addressed to the physical function of the device.
> + *
> + * If the underlying device function differs from the one that would
> + * normally receive the matched traffic, specifying this item
> + * prevents it from reaching that device unless the flow rule
> + * contains a PF action. Packets are not duplicated between device
> + * instances by default.
> + *
> + * No associated specification structure.
> + */
> + RTE_FLOW_ITEM_TYPE_PF,
> +
> + /**
> + * [META]
> + *
> + * Matches packets addressed to a virtual function ID of the device.
> + *
> + * If the underlying device function differs from the one that would
> + * normally receive the matched traffic, specifying this item
> + * prevents it from reaching that device unless the flow rule
> + * contains a VF action. Packets are not duplicated between device
> + * instances by default.
> + *
> + * See struct rte_flow_item_vf.
> + */
> + RTE_FLOW_ITEM_TYPE_VF,
> +
> + /**
> + * [META]
> + *
> + * Matches packets coming from the specified physical port of the
> + * underlying device.
> + *
> + * The first PORT item overrides the physical port normally
> + * associated with the specified DPDK input port (port_id). This
> + * item can be provided several times to match additional physical
> + * ports.
> + *
> + * See struct rte_flow_item_port.
> + */
> + RTE_FLOW_ITEM_TYPE_PORT,
> +
> + /**
> + * Matches a byte string of a given length at a given offset.
> + *
> + * See struct rte_flow_item_raw.
> + */
> + RTE_FLOW_ITEM_TYPE_RAW,
> +
> + /**
> + * Matches an Ethernet header.
> + *
> + * See struct rte_flow_item_eth.
> + */
> + RTE_FLOW_ITEM_TYPE_ETH,
> +
> + /**
> + * Matches an 802.1Q/ad VLAN tag.
> + *
> + * See struct rte_flow_item_vlan.
> + */
> + RTE_FLOW_ITEM_TYPE_VLAN,
> +
> + /**
> + * Matches an IPv4 header.
> + *
> + * See struct rte_flow_item_ipv4.
> + */
> + RTE_FLOW_ITEM_TYPE_IPV4,
> +
> + /**
> + * Matches an IPv6 header.
> + *
> + * See struct rte_flow_item_ipv6.
> + */
> + RTE_FLOW_ITEM_TYPE_IPV6,
> +
> + /**
> + * Matches an ICMP header.
> + *
> + * See struct rte_flow_item_icmp.
> + */
> + RTE_FLOW_ITEM_TYPE_ICMP,
> +
> + /**
> + * Matches a UDP header.
> + *
> + * See struct rte_flow_item_udp.
> + */
> + RTE_FLOW_ITEM_TYPE_UDP,
> +
> + /**
> + * Matches a TCP header.
> + *
> + * See struct rte_flow_item_tcp.
> + */
> + RTE_FLOW_ITEM_TYPE_TCP,
> +
> + /**
> + * Matches a SCTP header.
> + *
> + * See struct rte_flow_item_sctp.
> + */
> + RTE_FLOW_ITEM_TYPE_SCTP,
> +
> + /**
> + * Matches a VXLAN header.
> + *
> + * See struct rte_flow_item_vxlan.
> + */
> + RTE_FLOW_ITEM_TYPE_VXLAN,
> +};
> +
> +/**
> + * RTE_FLOW_ITEM_TYPE_ANY
> + *
> + * Matches any protocol in place of the current layer, a single ANY may also
> + * stand for several protocol layers.
> + *
> + * This is usually specified as the first pattern item when looking for a
> + * protocol anywhere in a packet.
> + *
> + * A maximum value of 0 requests matching any number of protocol layers
> + * above or equal to the minimum value, a maximum value lower than the
> + * minimum one is otherwise invalid.
> + *
> + * This type does not work with a range (struct rte_flow_item.last).
> + */
> +struct rte_flow_item_any {
> + uint16_t min; /**< Minimum number of layers covered. */
> + uint16_t max; /**< Maximum number of layers covered, 0 for infinity. */
> +};
> +
> +/**
> + * RTE_FLOW_ITEM_TYPE_VF
> + *
> + * Matches packets addressed to a virtual function ID of the device.
> + *
> + * If the underlying device function differs from the one that would
> + * normally receive the matched traffic, specifying this item prevents it
> + * from reaching that device unless the flow rule contains a VF
> + * action. Packets are not duplicated between device instances by default.
> + *
> + * - Likely to return an error or never match any traffic if this causes a
> + * VF device to match traffic addressed to a different VF.
> + * - Can be specified multiple times to match traffic addressed to several
> + * specific VFs.
> + * - Can be combined with a PF item to match both PF and VF traffic.
> + *
> + * A zeroed mask can be used to match any VF.
can you refer explicitly to id
> + */
> +struct rte_flow_item_vf {
> + uint32_t id; /**< Destination VF ID. */
> +};
> +
> +/**
> + * RTE_FLOW_ITEM_TYPE_PORT
> + *
> + * Matches packets coming from the specified physical port of the underlying
> + * device.
> + *
> + * The first PORT item overrides the physical port normally associated with
> + * the specified DPDK input port (port_id). This item can be provided
> + * several times to match additional physical ports.
> + *
> + * Note that physical ports are not necessarily tied to DPDK input ports
> + * (port_id) when those are not under DPDK control. Possible values are
> + * specific to each device, they are not necessarily indexed from zero and
> + * may not be contiguous.
> + *
> + * As a device property, the list of allowed values as well as the value
> + * associated with a port_id should be retrieved by other means.
> + *
> + * A zeroed mask can be used to match any port index.
> + */
> +struct rte_flow_item_port {
> + uint32_t index; /**< Physical port index. */
> +};
> +
> +/**
> + * RTE_FLOW_ITEM_TYPE_RAW
> + *
> + * Matches a byte string of a given length at a given offset.
> + *
> + * Offset is either absolute (using the start of the packet) or relative to
> + * the end of the previous matched item in the stack, in which case negative
> + * values are allowed.
> + *
> + * If search is enabled, offset is used as the starting point. The search
> + * area can be delimited by setting limit to a nonzero value, which is the
> + * maximum number of bytes after offset where the pattern may start.
> + *
> + * Matching a zero-length pattern is allowed, doing so resets the relative
> + * offset for subsequent items.
> + *
> + * This type does not work with a range (struct rte_flow_item.last).
> + */
> +struct rte_flow_item_raw {
> + uint32_t relative:1; /**< Look for pattern after the previous item. */
> + uint32_t search:1; /**< Search pattern from offset (see also limit). */
> + uint32_t reserved:30; /**< Reserved, must be set to zero. */
> + int32_t offset; /**< Absolute or relative offset for pattern. */
> + uint16_t limit; /**< Search area limit for start of pattern. */
> + uint16_t length; /**< Pattern length. */
> + uint8_t pattern[]; /**< Byte string to look for. */
> +};
> +
> +/**
> + * RTE_FLOW_ITEM_TYPE_ETH
> + *
> + * Matches an Ethernet header.
> + */
> +struct rte_flow_item_eth {
> + struct ether_addr dst; /**< Destination MAC. */
> + struct ether_addr src; /**< Source MAC. */
> + unsigned int type; /**< EtherType. */
> +};
> +
> +/**
> + * RTE_FLOW_ITEM_TYPE_VLAN
> + *
> + * Matches an 802.1Q/ad VLAN tag.
> + *
> + * This type normally follows either RTE_FLOW_ITEM_TYPE_ETH or
> + * RTE_FLOW_ITEM_TYPE_VLAN.
> + */
> +struct rte_flow_item_vlan {
> + uint16_t tpid; /**< Tag protocol identifier. */
> + uint16_t tci; /**< Tag control information. */
> +};
> +
> +/**
> + * RTE_FLOW_ITEM_TYPE_IPV4
> + *
> + * Matches an IPv4 header.
> + *
> + * Note: IPv4 options are handled by dedicated pattern items.
> + */
> +struct rte_flow_item_ipv4 {
> + struct ipv4_hdr hdr; /**< IPv4 header definition. */
> +};
> +
> +/**
> + * RTE_FLOW_ITEM_TYPE_IPV6.
> + *
> + * Matches an IPv6 header.
> + *
> + * Note: IPv6 options are handled by dedicated pattern items.
> + */
> +struct rte_flow_item_ipv6 {
> + struct ipv6_hdr hdr; /**< IPv6 header definition. */
> +};
> +
> +/**
> + * RTE_FLOW_ITEM_TYPE_ICMP.
> + *
> + * Matches an ICMP header.
> + */
> +struct rte_flow_item_icmp {
> + struct icmp_hdr hdr; /**< ICMP header definition. */
> +};
> +
> +/**
> + * RTE_FLOW_ITEM_TYPE_UDP.
> + *
> + * Matches a UDP header.
> + */
> +struct rte_flow_item_udp {
> + struct udp_hdr hdr; /**< UDP header definition. */
> +};
> +
> +/**
> + * RTE_FLOW_ITEM_TYPE_TCP.
> + *
> + * Matches a TCP header.
> + */
> +struct rte_flow_item_tcp {
> + struct tcp_hdr hdr; /**< TCP header definition. */
> +};
> +
> +/**
> + * RTE_FLOW_ITEM_TYPE_SCTP.
> + *
> + * Matches a SCTP header.
> + */
> +struct rte_flow_item_sctp {
> + struct sctp_hdr hdr; /**< SCTP header definition. */
> +};
> +
> +/**
> + * RTE_FLOW_ITEM_TYPE_VXLAN.
> + *
> + * Matches a VXLAN header (RFC 7348).
> + */
> +struct rte_flow_item_vxlan {
> + uint8_t flags; /**< Normally 0x08 (I flag). */
> + uint8_t rsvd0[3]; /**< Reserved, normally 0x000000. */
> + uint8_t vni[3]; /**< VXLAN identifier. */
> + uint8_t rsvd1; /**< Reserved, normally 0x00. */
> +};
> +
> +/**
> + * Matching pattern item definition.
> + *
> + * A pattern is formed by stacking items starting from the lowest protocol
> + * layer to match. This stacking restriction does not apply to meta items
> + * which can be placed anywhere in the stack with no effect on the meaning
> + * of the resulting pattern.
> + *
> + * A stack is terminated by a END item.
> + *
> + * The spec field should be a valid pointer to a structure of the related
> + * item type. It may be set to NULL in many cases to use default values.
> + *
> + * Optionally, last can point to a structure of the same type to define an
> + * inclusive range. This is mostly supported by integer and address fields,
> + * may cause errors otherwise. Fields that do not support ranges must be set
> + * to the same value as their spec counterparts.
> + *
> + * By default all fields present in spec are considered relevant.* This
typo "*"
> + * behavior can be altered by providing a mask structure of the same type
> + * with applicable bits set to one. It can also be used to partially filter
> + * out specific fields (e.g. as an alternate mean to match ranges of IP
> + * addresses).
> + *
> + * Note this is a simple bit-mask applied before interpreting the contents
> + * of spec and last, which may yield unexpected results if not used
> + * carefully. For example, if for an IPv4 address field, spec provides
> + * 10.1.2.3, last provides 10.3.4.5 and mask provides 255.255.0.0, the
> + * effective range is 10.1.0.0 to 10.3.255.255.
> + *
> + * * The defaults for data-matching items such as IPv4 when mask is not
> + * specified actually depend on the underlying implementation since only
> + * recognized fields can be taken into account.
> + */
> +struct rte_flow_item {
> + enum rte_flow_item_type type; /**< Item type. */
> + const void *spec; /**< Pointer to item specification structure. */
> + const void *last; /**< Defines an inclusive range (spec to last). */
> + const void *mask; /**< Bit-mask applied to spec and last. */
> +};
> +
> +/**
> + * Action types.
> + *
> + * Each possible action is represented by a type. Some have associated
> + * configuration structures. Several actions combined in a list can be
> + * affected to a flow rule. That list is not ordered.
> + *
> + * They fall in three categories:
> + *
> + * - Terminating actions (such as QUEUE, DROP, RSS, PF, VF) that prevent
> + * processing matched packets by subsequent flow rules, unless overridden
> + * with PASSTHRU.
> + *
> + * - Non terminating actions (PASSTHRU, DUP) that leave matched packets up
> + * for additional processing by subsequent flow rules.
> + *
> + * - Other non terminating meta actions that do not affect the fate of
> + * packets (END, VOID, MARK, FLAG, COUNT).
> + *
> + * When several actions are combined in a flow rule, they should all have
> + * different types (e.g. dropping a packet twice is not possible). The
> + * defined behavior is for PMDs to only take into account the last action of
> + * a given type found in the list. PMDs still perform error checking on the
> + * entire list.
why do you define that the pmd will interpret multiple same type rules
in this way...would it not make more sense for the pmd to just return
EINVAL for an invalid set of rules? It seems more transparent for the
application.
> + *
> + * Note that PASSTHRU is the only action able to override a terminating
> + * rule.
> + */
> +enum rte_flow_action_type {
> + /**
> + * [META]
> + *
> + * End marker for action lists. Prevents further processing of
> + * actions, thereby ending the list.
> + *
> + * No associated configuration structure.
> + */
> + RTE_FLOW_ACTION_TYPE_END,
> +
> + /**
> + * [META]
> + *
> + * Used as a placeholder for convenience. It is ignored and simply
> + * discarded by PMDs.
> + *
> + * No associated configuration structure.
> + */
> + RTE_FLOW_ACTION_TYPE_VOID,
> +
> + /**
> + * Leaves packets up for additional processing by subsequent flow
> + * rules. This is the default when a rule does not contain a
> + * terminating action, but can be specified to force a rule to
> + * become non-terminating.
> + *
> + * No associated configuration structure.
> + */
> + RTE_FLOW_ACTION_TYPE_PASSTHRU,
> +
> + /**
> + * [META]
> + *
> + * Attaches a 32 bit value to packets.
> + *
> + * See struct rte_flow_action_mark.
> + */
> + RTE_FLOW_ACTION_TYPE_MARK,
> +
> + /**
> + * [META]
> + *
> + * Flag packets. Similar to MARK but only affects ol_flags.
> + *
> + * Note: a distinctive flag must be defined for it.
> + *
> + * No associated configuration structure.
> + */
> + RTE_FLOW_ACTION_TYPE_FLAG,
> +
> + /**
> + * Assigns packets to a given queue index.
> + *
> + * See struct rte_flow_action_queue.
> + */
> + RTE_FLOW_ACTION_TYPE_QUEUE,
> +
> + /**
> + * Drops packets.
> + *
> + * PASSTHRU overrides this action if both are specified.
> + *
> + * No associated configuration structure.
> + */
> + RTE_FLOW_ACTION_TYPE_DROP,
> +
> + /**
> + * [META]
> + *
> + * Enables counters for this rule.
> + *
> + * These counters can be retrieved and reset through rte_flow_query(),
> + * see struct rte_flow_query_count.
> + *
> + * No associated configuration structure.
> + */
> + RTE_FLOW_ACTION_TYPE_COUNT,
> +
> + /**
> + * Duplicates packets to a given queue index.
> + *
> + * This is normally combined with QUEUE, however when used alone, it
> + * is actually similar to QUEUE + PASSTHRU.
> + *
> + * See struct rte_flow_action_dup.
> + */
> + RTE_FLOW_ACTION_TYPE_DUP,
> +
> + /**
> + * Similar to QUEUE, except RSS is additionally performed on packets
> + * to spread them among several queues according to the provided
> + * parameters.
> + *
> + * See struct rte_flow_action_rss.
> + */
> + RTE_FLOW_ACTION_TYPE_RSS,
> +
> + /**
> + * Redirects packets to the physical function (PF) of the current
> + * device.
> + *
> + * No associated configuration structure.
> + */
> + RTE_FLOW_ACTION_TYPE_PF,
> +
> + /**
> + * Redirects packets to the virtual function (VF) of the current
> + * device with the specified ID.
> + *
> + * See struct rte_flow_action_vf.
> + */
> + RTE_FLOW_ACTION_TYPE_VF,
> +};
> +
> +/**
> + * RTE_FLOW_ACTION_TYPE_MARK
> + *
> + * Attaches a 32 bit value to packets.
> + *
> + * This value is arbitrary and application-defined. For compatibility with
> + * FDIR it is returned in the hash.fdir.hi mbuf field. PKT_RX_FDIR_ID is
> + * also set in ol_flags.
> + */
> +struct rte_flow_action_mark {
> + uint32_t id; /**< 32 bit value to return with packets. */
> +};
One use case I thought we would be able to do for OVS is classification
in hardware and the unique flow id is sent with the packet to software.
But in OVS the ufid is 128 bits, so it means we can't and there is still
the miniflow extract overhead. I'm not sure if there is a practical way
around this.
Sugesh (cc'd) has looked at this before and may be able to comment or
correct me.
> +
> +/**
> + * RTE_FLOW_ACTION_TYPE_QUEUE
> + *
> + * Assign packets to a given queue index.
> + *
> + * Terminating by default.
> + */
> +struct rte_flow_action_queue {
> + uint16_t index; /**< Queue index to use. */
> +};
> +
> +/**
> + * RTE_FLOW_ACTION_TYPE_COUNT (query)
> + *
> + * Query structure to retrieve and reset flow rule counters.
> + */
> +struct rte_flow_query_count {
> + uint32_t reset:1; /**< Reset counters after query [in]. */
> + uint32_t hits_set:1; /**< hits field is set [out]. */
> + uint32_t bytes_set:1; /**< bytes field is set [out]. */
> + uint32_t reserved:29; /**< Reserved, must be zero [in, out]. */
> + uint64_t hits; /**< Number of hits for this rule [out]. */
> + uint64_t bytes; /**< Number of bytes through this rule [out]. */
> +};
> +
> +/**
> + * RTE_FLOW_ACTION_TYPE_DUP
> + *
> + * Duplicates packets to a given queue index.
> + *
> + * This is normally combined with QUEUE, however when used alone, it is
> + * actually similar to QUEUE + PASSTHRU.
> + *
> + * Non-terminating by default.
> + */
> +struct rte_flow_action_dup {
> + uint16_t index; /**< Queue index to duplicate packets to. */
> +};
> +
> +/**
> + * RTE_FLOW_ACTION_TYPE_RSS
> + *
> + * Similar to QUEUE, except RSS is additionally performed on packets to
> + * spread them among several queues according to the provided parameters.
> + *
> + * Note: RSS hash result is normally stored in the hash.rss mbuf field,
> + * however it conflicts with the MARK action as they share the same
> + * space. When both actions are specified, the RSS hash is discarded and
> + * PKT_RX_RSS_HASH is not set in ol_flags. MARK has priority. The mbuf
> + * structure should eventually evolve to store both.
> + *
> + * Terminating by default.
> + */
> +struct rte_flow_action_rss {
> + const struct rte_eth_rss_conf *rss_conf; /**< RSS parameters. */
> + uint16_t queues; /**< Number of entries in queue[]. */
> + uint16_t queue[]; /**< Queues indices to use. */
I'd try and avoid queue and queues - someone will say "huh?" when
reading code. s/queues/num ?
> +};
> +
> +/**
> + * RTE_FLOW_ACTION_TYPE_VF
> + *
> + * Redirects packets to a virtual function (VF) of the current device.
> + *
> + * Packets matched by a VF pattern item can be redirected to their original
> + * VF ID instead of the specified one. This parameter may not be available
> + * and is not guaranteed to work properly if the VF part is matched by a
> + * prior flow rule or if packets are not addressed to a VF in the first
> + * place.
Not clear what you mean by "not guaranteed to work if...". Please return
fail when this action is used if this is not going to work.
> + *
> + * Terminating by default.
> + */
> +struct rte_flow_action_vf {
> + uint32_t original:1; /**< Use original VF ID if possible. */
> + uint32_t reserved:31; /**< Reserved, must be zero. */
> + uint32_t id; /**< VF ID to redirect packets to. */
> +};
> +
> +/**
> + * Definition of a single action.
> + *
> + * A list of actions is terminated by a END action.
> + *
> + * For simple actions without a configuration structure, conf remains NULL.
> + */
> +struct rte_flow_action {
> + enum rte_flow_action_type type; /**< Action type. */
> + const void *conf; /**< Pointer to action configuration structure. */
> +};
> +
> +/**
> + * Opaque type returned after successfully creating a flow.
> + *
> + * This handle can be used to manage and query the related flow (e.g. to
> + * destroy it or retrieve counters).
> + */
> +struct rte_flow;
> +
> +/**
> + * Verbose error types.
> + *
> + * Most of them provide the type of the object referenced by struct
> + * rte_flow_error.cause.
> + */
> +enum rte_flow_error_type {
> + RTE_FLOW_ERROR_TYPE_NONE, /**< No error. */
> + RTE_FLOW_ERROR_TYPE_UNSPECIFIED, /**< Cause unspecified. */
> + RTE_FLOW_ERROR_TYPE_HANDLE, /**< Flow rule (handle). */
> + RTE_FLOW_ERROR_TYPE_ATTR_GROUP, /**< Group field. */
> + RTE_FLOW_ERROR_TYPE_ATTR_PRIORITY, /**< Priority field. */
> + RTE_FLOW_ERROR_TYPE_ATTR_INGRESS, /**< Ingress field. */
> + RTE_FLOW_ERROR_TYPE_ATTR_EGRESS, /**< Egress field. */
> + RTE_FLOW_ERROR_TYPE_ATTR, /**< Attributes structure. */
> + RTE_FLOW_ERROR_TYPE_ITEM_NUM, /**< Pattern length. */
> + RTE_FLOW_ERROR_TYPE_ITEM, /**< Specific pattern item. */
> + RTE_FLOW_ERROR_TYPE_ACTION_NUM, /**< Number of actions. */
> + RTE_FLOW_ERROR_TYPE_ACTION, /**< Specific action. */
> +};
> +
> +/**
> + * Verbose error structure definition.
> + *
> + * This object is normally allocated by applications and set by PMDs, the
> + * message points to a constant string which does not need to be freed by
> + * the application, however its pointer can be considered valid only as long
> + * as its associated DPDK port remains configured. Closing the underlying
> + * device or unloading the PMD invalidates it.
> + *
> + * Both cause and message may be NULL regardless of the error type.
> + */
> +struct rte_flow_error {
> + enum rte_flow_error_type type; /**< Cause field and error types. */
> + const void *cause; /**< Object responsible for the error. */
> + const char *message; /**< Human-readable error message. */
> +};
> +
> +/**
> + * Check whether a flow rule can be created on a given port.
> + *
> + * While this function has no effect on the target device, the flow rule is
> + * validated against its current configuration state and the returned value
> + * should be considered valid by the caller for that state only.
> + *
> + * The returned value is guaranteed to remain valid only as long as no
> + * successful calls to rte_flow_create() or rte_flow_destroy() are made in
> + * the meantime and no device parameter affecting flow rules in any way are
> + * modified, due to possible collisions or resource limitations (although in
> + * such cases EINVAL should not be returned).
> + *
> + * @param port_id
> + * Port identifier of Ethernet device.
> + * @param[in] attr
> + * Flow rule attributes.
> + * @param[in] pattern
> + * Pattern specification (list terminated by the END pattern item).
> + * @param[in] actions
> + * Associated actions (list terminated by the END action).
> + * @param[out] error
> + * Perform verbose error reporting if not NULL.
> + *
> + * @return
> + * 0 if flow rule is valid and can be created. A negative errno value
> + * otherwise (rte_errno is also set), the following errors are defined:
> + *
> + * -ENOSYS: underlying device does not support this functionality.
> + *
> + * -EINVAL: unknown or invalid rule specification.
> + *
> + * -ENOTSUP: valid but unsupported rule specification (e.g. partial
> + * bit-masks are unsupported).
> + *
> + * -EEXIST: collision with an existing rule.
> + *
> + * -ENOMEM: not enough resources.
> + *
> + * -EBUSY: action cannot be performed due to busy device resources, may
> + * succeed if the affected queues or even the entire port are in a stopped
> + * state (see rte_eth_dev_rx_queue_stop() and rte_eth_dev_stop()).
> + */
> +int
> +rte_flow_validate(uint8_t port_id,
> + const struct rte_flow_attr *attr,
> + const struct rte_flow_item pattern[],
> + const struct rte_flow_action actions[],
> + struct rte_flow_error *error);
Why not just use rte_flow_create() and get an error? Is it less
disruptive to do a validate and find the rule cannot be created, than
using a create directly?
> +
> +/**
> + * Create a flow rule on a given port.
> + *
> + * @param port_id
> + * Port identifier of Ethernet device.
> + * @param[in] attr
> + * Flow rule attributes.
> + * @param[in] pattern
> + * Pattern specification (list terminated by the END pattern item).
> + * @param[in] actions
> + * Associated actions (list terminated by the END action).
> + * @param[out] error
> + * Perform verbose error reporting if not NULL.
> + *
> + * @return
> + * A valid handle in case of success, NULL otherwise and rte_errno is set
> + * to the positive version of one of the error codes defined for
> + * rte_flow_validate().
> + */
> +struct rte_flow *
> +rte_flow_create(uint8_t port_id,
> + const struct rte_flow_attr *attr,
> + const struct rte_flow_item pattern[],
> + const struct rte_flow_action actions[],
> + struct rte_flow_error *error);
General question - are these functions threadsafe? In the OVS example
you could have several threads wanting to create flow rules at the same
time for same or different ports.
> +
> +/**
> + * Destroy a flow rule on a given port.
> + *
> + * Failure to destroy a flow rule handle may occur when other flow rules
> + * depend on it, and destroying it would result in an inconsistent state.
> + *
> + * This function is only guaranteed to succeed if handles are destroyed in
> + * reverse order of their creation.
How can the application find this information out on error?
> + *
> + * @param port_id
> + * Port identifier of Ethernet device.
> + * @param flow
> + * Flow rule handle to destroy.
> + * @param[out] error
> + * Perform verbose error reporting if not NULL.
> + *
> + * @return
> + * 0 on success, a negative errno value otherwise and rte_errno is set.
> + */
> +int
> +rte_flow_destroy(uint8_t port_id,
> + struct rte_flow *flow,
> + struct rte_flow_error *error);
> +
> +/**
> + * Destroy all flow rules associated with a port.
> + *
> + * In the unlikely event of failure, handles are still considered destroyed
> + * and no longer valid but the port must be assumed to be in an inconsistent
> + * state.
> + *
> + * @param port_id
> + * Port identifier of Ethernet device.
> + * @param[out] error
> + * Perform verbose error reporting if not NULL.
> + *
> + * @return
> + * 0 on success, a negative errno value otherwise and rte_errno is set.
> + */
> +int
> +rte_flow_flush(uint8_t port_id,
> + struct rte_flow_error *error);
rte_flow_destroy_all() would be more descriptive (but breaks your style)
> +
> +/**
> + * Query an existing flow rule.
> + *
> + * This function allows retrieving flow-specific data such as counters.
> + * Data is gathered by special actions which must be present in the flow
> + * rule definition.
re last sentence, it would be good if you can put a link to
RTE_FLOW_ACTION_TYPE_COUNT
> + *
> + * @param port_id
> + * Port identifier of Ethernet device.
> + * @param flow
> + * Flow rule handle to query.
> + * @param action
> + * Action type to query.
> + * @param[in, out] data
> + * Pointer to storage for the associated query data type.
can this be anything other than rte_flow_query_count?
> + * @param[out] error
> + * Perform verbose error reporting if not NULL.
> + *
> + * @return
> + * 0 on success, a negative errno value otherwise and rte_errno is set.
> + */
> +int
> +rte_flow_query(uint8_t port_id,
> + struct rte_flow *flow,
> + enum rte_flow_action_type action,
> + void *data,
> + struct rte_flow_error *error);
> +
> +#ifdef __cplusplus
> +}
> +#endif
I don't see a way to dump all the rules for a port out. I think this is
neccessary for degbugging. You could have a look through dpif.h in OVS
and see how dpif_flow_dump_next() is used, it might be a good reference.
Also, it would be nice if there were an api that would allow a test
packet to be injected and traced for debugging - although I'm not
exactly sure how well it could be traced. For reference:
http://developers.redhat.com/blog/2016/10/12/tracing-packets-inside-open-vswitch/
thanks,
Kevin.
> +
> +#endif /* RTE_FLOW_H_ */
> diff --git a/lib/librte_ether/rte_flow_driver.h b/lib/librte_ether/rte_flow_driver.h
> new file mode 100644
> index 0000000..a88c621
> --- /dev/null
> +++ b/lib/librte_ether/rte_flow_driver.h
> @@ -0,0 +1,177 @@
> +/*-
> + * BSD LICENSE
> + *
> + * Copyright 2016 6WIND S.A.
> + * Copyright 2016 Mellanox.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + *
> + * * Redistributions of source code must retain the above copyright
> + * notice, this list of conditions and the following disclaimer.
> + * * Redistributions in binary form must reproduce the above copyright
> + * notice, this list of conditions and the following disclaimer in
> + * the documentation and/or other materials provided with the
> + * distribution.
> + * * Neither the name of 6WIND S.A. nor the names of its
> + * contributors may be used to endorse or promote products derived
> + * from this software without specific prior written permission.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> + */
> +
> +#ifndef RTE_FLOW_DRIVER_H_
> +#define RTE_FLOW_DRIVER_H_
> +
> +/**
> + * @file
> + * RTE generic flow API (driver side)
> + *
> + * This file provides implementation helpers for internal use by PMDs, they
> + * are not intended to be exposed to applications and are not subject to ABI
> + * versioning.
> + */
> +
> +#include <stdint.h>
> +
> +#include <rte_errno.h>
> +#include "rte_flow.h"
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> +/**
> + * Generic flow operations structure implemented and returned by PMDs.
> + *
> + * To implement this API, PMDs must handle the RTE_ETH_FILTER_GENERIC filter
> + * type in their .filter_ctrl callback function (struct eth_dev_ops) as well
> + * as the RTE_ETH_FILTER_GET filter operation.
> + *
> + * If successful, this operation must result in a pointer to a PMD-specific
> + * struct rte_flow_ops written to the argument address as described below:
> + *
> + * // PMD filter_ctrl callback
> + *
> + * static const struct rte_flow_ops pmd_flow_ops = { ... };
> + *
> + * switch (filter_type) {
> + * case RTE_ETH_FILTER_GENERIC:
> + * if (filter_op != RTE_ETH_FILTER_GET)
> + * return -EINVAL;
> + * *(const void **)arg = &pmd_flow_ops;
> + * return 0;
> + * }
> + *
> + * See also rte_flow_ops_get().
> + *
> + * These callback functions are not supposed to be used by applications
> + * directly, which must rely on the API defined in rte_flow.h.
> + *
> + * Public-facing wrapper functions perform a few consistency checks so that
> + * unimplemented (i.e. NULL) callbacks simply return -ENOTSUP. These
> + * callbacks otherwise only differ by their first argument (with port ID
> + * already resolved to a pointer to struct rte_eth_dev).
> + */
> +struct rte_flow_ops {
> + /** See rte_flow_validate(). */
> + int (*validate)
> + (struct rte_eth_dev *,
> + const struct rte_flow_attr *,
> + const struct rte_flow_item [],
> + const struct rte_flow_action [],
> + struct rte_flow_error *);
> + /** See rte_flow_create(). */
> + struct rte_flow *(*create)
> + (struct rte_eth_dev *,
> + const struct rte_flow_attr *,
> + const struct rte_flow_item [],
> + const struct rte_flow_action [],
> + struct rte_flow_error *);
> + /** See rte_flow_destroy(). */
> + int (*destroy)
> + (struct rte_eth_dev *,
> + struct rte_flow *,
> + struct rte_flow_error *);
> + /** See rte_flow_flush(). */
> + int (*flush)
> + (struct rte_eth_dev *,
> + struct rte_flow_error *);
> + /** See rte_flow_query(). */
> + int (*query)
> + (struct rte_eth_dev *,
> + struct rte_flow *,
> + enum rte_flow_action_type,
> + void *,
> + struct rte_flow_error *);
> +};
> +
> +/**
> + * Initialize generic flow error structure.
> + *
> + * This function also sets rte_errno to a given value.
> + *
> + * @param[out] error
> + * Pointer to flow error structure (may be NULL).
> + * @param code
> + * Related error code (rte_errno).
> + * @param type
> + * Cause field and error types.
> + * @param cause
> + * Object responsible for the error.
> + * @param message
> + * Human-readable error message.
> + *
> + * @return
> + * Pointer to flow error structure.
> + */
> +static inline struct rte_flow_error *
> +rte_flow_error_set(struct rte_flow_error *error,
> + int code,
> + enum rte_flow_error_type type,
> + void *cause,
> + const char *message)
> +{
> + if (error) {
> + *error = (struct rte_flow_error){
> + .type = type,
> + .cause = cause,
> + .message = message,
> + };
> + }
> + rte_errno = code;
> + return error;
> +}
> +
> +/**
> + * Get generic flow operations structure from a port.
> + *
> + * @param port_id
> + * Port identifier to query.
> + * @param[out] error
> + * Pointer to flow error structure.
> + *
> + * @return
> + * The flow operations structure associated with port_id, NULL in case of
> + * error, in which case rte_errno is set and the error structure contains
> + * additional details.
> + */
> +const struct rte_flow_ops *
> +rte_flow_ops_get(uint8_t port_id, struct rte_flow_error *error);
> +
> +#ifdef __cplusplus
> +}
> +#endif
> +
> +#endif /* RTE_FLOW_DRIVER_H_ */
>
^ permalink raw reply
* Re: [PATCH v12 0/6] add Tx preparation
From: Ananyev, Konstantin @ 2016-11-30 17:42 UTC (permalink / raw)
To: Harish Patil, Thomas Monjalon, dev@dpdk.org, Rahul Lakkireddy,
Stephen Hurd, Jan Medala, Jakub Palider, John Daley,
Adrien Mazarguil, Alejandro Lucero, Rasesh Mody, Jacob, Jerin,
Yuanhan Liu, Yong Wang
Cc: Kulasek, TomaszX, olivier.matz@6wind.com
In-Reply-To: <D4643DF5.B8241%Harish.Patil@cavium.com>
Hi Harish,
>
>
> >We need attention of every PMD developers on this thread.
> >
> >Reminder of what Konstantin suggested:
> >"
> >- if the PMD supports TX offloads AND
> >- if to be able use any of these offloads the upper layer SW would have
> >to:
> > * modify the contents of the packet OR
> > * obey HW specific restrictions
> >then it is a PMD developer responsibility to provide tx_prep() that would
> >implement
> >expected modifications of the packet contents and restriction checks.
> >Otherwise, tx_prep() implementation is not required and can be safely set
> >to NULL.
> >"
> >
> >I copy/paste also my previous conclusion:
> >
> >Before txprep, there is only one API: the application must prepare the
> >packets checksum itself (get_psd_sum in testpmd).
> >With txprep, the application have 2 choices: keep doing the job itself
> >or call txprep which calls a PMD-specific function.
> >The question is: does non-Intel drivers need a checksum preparation for
> >TSO?
> >Will it behave well if txprep does nothing in these drivers?
> >
> >When looking at the code, most of drivers handle the TSO flags.
> >But it is hard to know whether they rely on the pseudo checksum or not.
> >
> >git grep -l 'PKT_TX_UDP_CKSUM\|PKT_TX_TCP_CKSUM\|PKT_TX_TCP_SEG'
> >drivers/net/
> >
> >drivers/net/bnxt/bnxt_txr.c
> >drivers/net/cxgbe/sge.c
> >drivers/net/e1000/em_rxtx.c
> >drivers/net/e1000/igb_rxtx.c
> >drivers/net/ena/ena_ethdev.c
> >drivers/net/enic/enic_rxtx.c
> >drivers/net/fm10k/fm10k_rxtx.c
> >drivers/net/i40e/i40e_rxtx.c
> >drivers/net/ixgbe/ixgbe_rxtx.c
> >drivers/net/mlx4/mlx4.c
> >drivers/net/mlx5/mlx5_rxtx.c
> >drivers/net/nfp/nfp_net.c
> >drivers/net/qede/qede_rxtx.c
> >drivers/net/thunderx/nicvf_rxtx.c
> >drivers/net/virtio/virtio_rxtx.c
> >drivers/net/vmxnet3/vmxnet3_rxtx.c
> >
> >Please, we need a comment for each driver saying
> >"it is OK, we do not need any checksum preparation for TSO"
> >or
> >"yes we have to implement tx_prepare or TSO will not work in this mode"
> >
>
> qede PMD doesn’t currently support TSO yet, it only supports Tx TCP/UDP/IP
> csum offloads.
> So Tx preparation isn’t applicable. So as of now -
> "it is OK, we do not need any checksum preparation for TSO"
Thanks for the answer.
Though please note that it not only for TSO.
This is for any TX offload for which the upper layer SW would have
to modify the contents of the packet.
Though as I can see for qede neither PKT_TX_IP_CKSUM or PKT_TX_TCP_CKSUM
exhibits any extra requirements for the user.
Is that correct?
Konstantin
>
>
> Thanks,
> Harish
^ permalink raw reply
* Re: [PATCH v12 0/6] add Tx preparation
From: Harish Patil @ 2016-11-30 16:34 UTC (permalink / raw)
To: Thomas Monjalon, dev@dpdk.org, Rahul Lakkireddy, Stephen Hurd,
Jan Medala, Jakub Palider, John Daley, Adrien Mazarguil,
Alejandro Lucero, Harish Patil, Rasesh Mody, Jacob, Jerin,
Yuanhan Liu, Yong Wang
Cc: Tomasz Kulasek, konstantin.ananyev@intel.com,
olivier.matz@6wind.com
In-Reply-To: <8317180.L80Qf11uiu@xps13>
>We need attention of every PMD developers on this thread.
>
>Reminder of what Konstantin suggested:
>"
>- if the PMD supports TX offloads AND
>- if to be able use any of these offloads the upper layer SW would have
>to:
> * modify the contents of the packet OR
> * obey HW specific restrictions
>then it is a PMD developer responsibility to provide tx_prep() that would
>implement
>expected modifications of the packet contents and restriction checks.
>Otherwise, tx_prep() implementation is not required and can be safely set
>to NULL.
>"
>
>I copy/paste also my previous conclusion:
>
>Before txprep, there is only one API: the application must prepare the
>packets checksum itself (get_psd_sum in testpmd).
>With txprep, the application have 2 choices: keep doing the job itself
>or call txprep which calls a PMD-specific function.
>The question is: does non-Intel drivers need a checksum preparation for
>TSO?
>Will it behave well if txprep does nothing in these drivers?
>
>When looking at the code, most of drivers handle the TSO flags.
>But it is hard to know whether they rely on the pseudo checksum or not.
>
>git grep -l 'PKT_TX_UDP_CKSUM\|PKT_TX_TCP_CKSUM\|PKT_TX_TCP_SEG'
>drivers/net/
>
>drivers/net/bnxt/bnxt_txr.c
>drivers/net/cxgbe/sge.c
>drivers/net/e1000/em_rxtx.c
>drivers/net/e1000/igb_rxtx.c
>drivers/net/ena/ena_ethdev.c
>drivers/net/enic/enic_rxtx.c
>drivers/net/fm10k/fm10k_rxtx.c
>drivers/net/i40e/i40e_rxtx.c
>drivers/net/ixgbe/ixgbe_rxtx.c
>drivers/net/mlx4/mlx4.c
>drivers/net/mlx5/mlx5_rxtx.c
>drivers/net/nfp/nfp_net.c
>drivers/net/qede/qede_rxtx.c
>drivers/net/thunderx/nicvf_rxtx.c
>drivers/net/virtio/virtio_rxtx.c
>drivers/net/vmxnet3/vmxnet3_rxtx.c
>
>Please, we need a comment for each driver saying
>"it is OK, we do not need any checksum preparation for TSO"
>or
>"yes we have to implement tx_prepare or TSO will not work in this mode"
>
qede PMD doesn’t currently support TSO yet, it only supports Tx TCP/UDP/IP
csum offloads.
So Tx preparation isn’t applicable. So as of now -
"it is OK, we do not need any checksum preparation for TSO"
Thanks,
Harish
^ permalink raw reply
* [PATCH 3/3] app/test: add SGL tests to cryptodev QAT suite
From: Arek Kusztal @ 2016-11-30 15:52 UTC (permalink / raw)
To: dev
Cc: fiona.trahe, pablo.de.lara.guarch, john.griffin, deepak.k.jain,
Arek Kusztal
In-Reply-To: <1480521135-14869-1-git-send-email-arkadiuszx.kusztal@intel.com>
This commit adds GCM tests to use within scatter-gather list.
Test use direct chained mbufs created based on the input parameter
for max size for in place operations and out of place operations.
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
app/test/test_cryptodev.c | 356 +++++++++++++
app/test/test_cryptodev_gcm_test_vectors.h | 823 ++++++++++++++++++++++++++++-
2 files changed, 1176 insertions(+), 3 deletions(-)
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 00dced5..f1f3542 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -5924,6 +5924,356 @@ test_authenticated_decryption_fail_when_corruption(
}
static int
+create_gcm_operation_SGL(enum rte_crypto_cipher_operation op,
+ const struct gcm_test_data *tdata,
+ void *digest_mem, uint64_t digest_phys)
+{
+ struct crypto_testsuite_params *ts_params = &testsuite_params;
+ struct crypto_unittest_params *ut_params = &unittest_params;
+
+ const unsigned int auth_tag_len = tdata->auth_tag.len;
+ const unsigned int iv_len = tdata->iv.len;
+ const unsigned int aad_len = tdata->aad.len;
+
+ unsigned int iv_pad_len = 0, aad_buffer_len = 0;
+
+ /* Generate Crypto op data structure */
+ ut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,
+ RTE_CRYPTO_OP_TYPE_SYMMETRIC);
+ TEST_ASSERT_NOT_NULL(ut_params->op,
+ "Failed to allocate symmetric crypto operation struct");
+
+ struct rte_crypto_sym_op *sym_op = ut_params->op->sym;
+
+ sym_op->auth.digest.data = digest_mem;
+
+ TEST_ASSERT_NOT_NULL(sym_op->auth.digest.data,
+ "no room to append digest");
+
+ sym_op->auth.digest.phys_addr = digest_phys;
+ sym_op->auth.digest.length = auth_tag_len;
+
+ if (op == RTE_CRYPTO_CIPHER_OP_DECRYPT) {
+ rte_memcpy(sym_op->auth.digest.data, tdata->auth_tag.data,
+ auth_tag_len);
+ TEST_HEXDUMP(stdout, "digest:",
+ sym_op->auth.digest.data,
+ sym_op->auth.digest.length);
+ }
+
+ iv_pad_len = RTE_ALIGN_CEIL(iv_len, 16);
+
+ sym_op->cipher.iv.data = (uint8_t *)rte_pktmbuf_prepend(
+ ut_params->ibuf, iv_pad_len);
+
+ TEST_ASSERT_NOT_NULL(sym_op->cipher.iv.data,
+ "no room to prepend iv");
+
+ memset(sym_op->cipher.iv.data, 0, iv_pad_len);
+ sym_op->cipher.iv.phys_addr = rte_pktmbuf_mtophys(ut_params->ibuf);
+ sym_op->cipher.iv.length = iv_len;
+
+ rte_memcpy(sym_op->cipher.iv.data, tdata->iv.data, iv_pad_len);
+
+ aad_buffer_len = ALIGN_POW2_ROUNDUP(aad_len, 16);
+
+ sym_op->auth.aad.data = (uint8_t *)rte_pktmbuf_prepend(
+ ut_params->ibuf, aad_buffer_len);
+ TEST_ASSERT_NOT_NULL(sym_op->auth.aad.data,
+ "no room to prepend aad");
+ sym_op->auth.aad.phys_addr = rte_pktmbuf_mtophys(
+ ut_params->ibuf);
+ sym_op->auth.aad.length = aad_len;
+
+ memset(sym_op->auth.aad.data, 0, aad_buffer_len);
+ rte_memcpy(sym_op->auth.aad.data, tdata->aad.data, aad_len);
+
+ TEST_HEXDUMP(stdout, "iv:", sym_op->cipher.iv.data, iv_pad_len);
+ TEST_HEXDUMP(stdout, "aad:",
+ sym_op->auth.aad.data, aad_len);
+
+ sym_op->cipher.data.length = tdata->plaintext.len;
+ sym_op->cipher.data.offset = aad_buffer_len + iv_pad_len;
+
+ sym_op->auth.data.offset = aad_buffer_len + iv_pad_len;
+ sym_op->auth.data.length = tdata->plaintext.len;
+
+ return 0;
+}
+
+#define SGL_MAX_NO 16
+
+static int
+test_AES_GCM_authenticated_encryption_SGL(const struct gcm_test_data *tdata,
+ const int oop, uint32_t fragsz, uint32_t fragsz_oop)
+{
+ struct crypto_testsuite_params *ts_params = &testsuite_params;
+ struct crypto_unittest_params *ut_params = &unittest_params;
+ struct rte_mbuf *buf, *buf_oop = NULL, *buf_last_oop = NULL;
+ int retval;
+ int to_trn = 0;
+ int to_trn_tbl[SGL_MAX_NO];
+ int segs = 1;
+ unsigned int trn_data = 0;
+ uint8_t *plaintext, *ciphertext, *auth_tag;
+
+ if (fragsz > tdata->plaintext.len)
+ fragsz = tdata->plaintext.len;
+
+ uint16_t plaintext_len = fragsz;
+ uint16_t frag_size_oop = fragsz_oop ? fragsz_oop : fragsz;
+
+ if (fragsz_oop > tdata->plaintext.len)
+ frag_size_oop = tdata->plaintext.len;
+
+ int ecx = 0;
+ void *digest_mem = NULL;
+
+ uint32_t prepend_len = ALIGN_POW2_ROUNDUP(tdata->iv.len, 16)
+ + tdata->aad.len;
+
+ if (tdata->plaintext.len % fragsz != 0) {
+ if (tdata->plaintext.len / fragsz + 1 > SGL_MAX_NO)
+ return 1;
+ } else {
+ if (tdata->plaintext.len / fragsz > SGL_MAX_NO)
+ return 1;
+ }
+
+ /*
+ * For out-op-place we need to alloc another mbuf
+ */
+ if (oop) {
+ ut_params->obuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
+ rte_pktmbuf_append(ut_params->obuf,
+ frag_size_oop + prepend_len);
+ buf_oop = ut_params->obuf;
+ }
+
+ /* Create GCM session */
+ retval = create_gcm_session(ts_params->valid_devs[0],
+ RTE_CRYPTO_CIPHER_OP_ENCRYPT,
+ tdata->key.data, tdata->key.len,
+ tdata->aad.len, tdata->auth_tag.len,
+ RTE_CRYPTO_AUTH_OP_GENERATE);
+ if (retval < 0)
+ return retval;
+
+ ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
+
+ /* clear mbuf payload */
+ memset(rte_pktmbuf_mtod(ut_params->ibuf, uint8_t *), 0,
+ rte_pktmbuf_tailroom(ut_params->ibuf));
+
+ plaintext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf,
+ plaintext_len);
+
+ memcpy(plaintext, tdata->plaintext.data, plaintext_len);
+
+ trn_data += plaintext_len;
+
+ buf = ut_params->ibuf;
+
+ /*
+ * Loop until no more fragments
+ */
+
+ while (trn_data < tdata->plaintext.len) {
+ ++segs;
+ to_trn = (tdata->plaintext.len - trn_data < fragsz) ?
+ (tdata->plaintext.len - trn_data) : fragsz;
+
+ to_trn_tbl[ecx++] = to_trn;
+
+ buf->next = rte_pktmbuf_alloc(ts_params->mbuf_pool);
+ buf = buf->next;
+
+ memset(rte_pktmbuf_mtod(buf, uint8_t *), 0,
+ rte_pktmbuf_tailroom(buf));
+
+ /* OOP */
+ if (oop && !fragsz_oop) {
+ buf_last_oop = buf_oop->next =
+ rte_pktmbuf_alloc(ts_params->mbuf_pool);
+ buf_oop = buf_oop->next;
+ memset(rte_pktmbuf_mtod(buf_oop, uint8_t *),
+ 0, rte_pktmbuf_tailroom(buf_oop));
+ rte_pktmbuf_append(buf_oop, to_trn);
+ }
+
+ plaintext = (uint8_t *)rte_pktmbuf_append(buf,
+ to_trn);
+
+ memcpy(plaintext, tdata->plaintext.data + trn_data,
+ to_trn);
+ trn_data += to_trn;
+ if (trn_data == tdata->plaintext.len) {
+ if (oop) {
+ if (!fragsz_oop)
+ digest_mem = rte_pktmbuf_append(buf_oop,
+ tdata->auth_tag.len);
+ } else
+ digest_mem = (uint8_t *)rte_pktmbuf_append(buf,
+ tdata->auth_tag.len);
+ }
+ }
+
+ uint64_t digest_phys = 0;
+
+ ut_params->ibuf->nb_segs = segs;
+
+ segs = 1;
+ if (fragsz_oop && oop) {
+ to_trn = 0;
+ ecx = 0;
+
+ if (frag_size_oop == tdata->plaintext.len) {
+ digest_mem = rte_pktmbuf_append(ut_params->obuf,
+ tdata->auth_tag.len);
+
+ digest_phys = rte_pktmbuf_mtophys_offset(
+ ut_params->obuf,
+ tdata->plaintext.len + prepend_len);
+ }
+
+ trn_data = frag_size_oop;
+ while (trn_data < tdata->plaintext.len) {
+ ++segs;
+ to_trn =
+ (tdata->plaintext.len - trn_data <
+ frag_size_oop) ?
+ (tdata->plaintext.len - trn_data) :
+ frag_size_oop;
+
+ to_trn_tbl[ecx++] = to_trn;
+
+ buf_last_oop = buf_oop->next =
+ rte_pktmbuf_alloc(ts_params->mbuf_pool);
+ buf_oop = buf_oop->next;
+ memset(rte_pktmbuf_mtod(buf_oop, uint8_t *),
+ 0, rte_pktmbuf_tailroom(buf_oop));
+ rte_pktmbuf_append(buf_oop, to_trn);
+
+ trn_data += to_trn;
+
+ if (trn_data == tdata->plaintext.len) {
+ digest_mem = rte_pktmbuf_append(buf_oop,
+ tdata->auth_tag.len);
+ }
+ }
+
+ ut_params->obuf->nb_segs = segs;
+ }
+
+ /*
+ * Place digest at the end of the last buffer
+ */
+ if (!digest_phys)
+ digest_phys = rte_pktmbuf_mtophys(buf) + to_trn;
+ if (oop && buf_last_oop)
+ digest_phys = rte_pktmbuf_mtophys(buf_last_oop) + to_trn;
+
+ if (!digest_mem && !oop) {
+ digest_mem = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf,
+ + tdata->auth_tag.len);
+ digest_phys = rte_pktmbuf_mtophys_offset(ut_params->ibuf,
+ tdata->plaintext.len);
+ }
+
+ /* Create GCM opertaion */
+ retval = create_gcm_operation_SGL(RTE_CRYPTO_CIPHER_OP_ENCRYPT,
+ tdata, digest_mem, digest_phys);
+
+ if (retval < 0)
+ return retval;
+
+ rte_crypto_op_attach_sym_session(ut_params->op, ut_params->sess);
+
+ ut_params->op->sym->m_src = ut_params->ibuf;
+ if (oop)
+ ut_params->op->sym->m_dst = ut_params->obuf;
+
+ /* Process crypto operation */
+ TEST_ASSERT_NOT_NULL(process_crypto_request(ts_params->valid_devs[0],
+ ut_params->op), "failed to process sym crypto op");
+
+ TEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS,
+ "crypto op processing failed");
+
+
+ ciphertext = rte_pktmbuf_mtod_offset(ut_params->op->sym->m_src,
+ uint8_t *, prepend_len);
+ if (oop) {
+ ciphertext = rte_pktmbuf_mtod_offset(ut_params->op->sym->m_dst,
+ uint8_t *, prepend_len);
+ }
+
+ if (fragsz_oop)
+ fragsz = fragsz_oop;
+
+ TEST_ASSERT_BUFFERS_ARE_EQUAL(
+ ciphertext,
+ tdata->ciphertext.data,
+ fragsz,
+ "GCM Ciphertext data not as expected");
+
+ buf = ut_params->op->sym->m_src->next;
+ if (oop)
+ buf = ut_params->op->sym->m_dst->next;
+
+ unsigned int off = fragsz;
+
+ ecx = 0;
+ while (buf) {
+ ciphertext = rte_pktmbuf_mtod(buf,
+ uint8_t *);
+
+ TEST_ASSERT_BUFFERS_ARE_EQUAL(
+ ciphertext,
+ tdata->ciphertext.data + off,
+ to_trn_tbl[ecx],
+ "GCM Ciphertext data not as expected");
+
+ off += to_trn_tbl[ecx++];
+ buf = buf->next;
+ }
+
+ auth_tag = digest_mem;
+ TEST_ASSERT_BUFFERS_ARE_EQUAL(
+ auth_tag,
+ tdata->auth_tag.data,
+ tdata->auth_tag.len,
+ "GCM Generated auth tag not as expected");
+
+ return 0;
+}
+
+#define IN_PLACE 0
+#define OUT_OF_PLACE 1
+
+static int
+test_AES_GCM_auth_encrypt_SGL_out_of_place_400B_400B(void)
+{
+ return test_AES_GCM_authenticated_encryption_SGL(
+ &gcm_test_case_SGL_1, OUT_OF_PLACE, 400, 400);
+}
+
+static int
+test_AES_GCM_auth_encrypt_SGL_out_of_place_1500B_2000B(void)
+{
+ return test_AES_GCM_authenticated_encryption_SGL(
+ &gcm_test_case_SGL_1, OUT_OF_PLACE, 1500, 2000);
+}
+
+static int
+test_AES_GCM_auth_encrypt_SGL_in_place_1500B(void)
+{
+
+ return test_AES_GCM_authenticated_encryption_SGL(
+ &gcm_test_case_SGL_1, IN_PLACE, 1500, 0);
+}
+
+static int
test_authentication_verify_fail_when_data_corrupted(
struct crypto_testsuite_params *ts_params,
struct crypto_unittest_params *ut_params,
@@ -6057,6 +6407,12 @@ static struct unit_test_suite cryptodev_qat_testsuite = {
/** AES GCM Authenticated Encryption */
TEST_CASE_ST(ut_setup, ut_teardown,
+ test_AES_GCM_auth_encrypt_SGL_in_place_1500B),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_AES_GCM_auth_encrypt_SGL_out_of_place_400B_400B),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_AES_GCM_auth_encrypt_SGL_out_of_place_1500B_2000B),
+ TEST_CASE_ST(ut_setup, ut_teardown,
test_mb_AES_GCM_authenticated_encryption_test_case_1),
TEST_CASE_ST(ut_setup, ut_teardown,
test_mb_AES_GCM_authenticated_encryption_test_case_2),
diff --git a/app/test/test_cryptodev_gcm_test_vectors.h b/app/test/test_cryptodev_gcm_test_vectors.h
index b404242..df984fc 100644
--- a/app/test/test_cryptodev_gcm_test_vectors.h
+++ b/app/test/test_cryptodev_gcm_test_vectors.h
@@ -35,6 +35,7 @@
#define GMAC_LARGE_PLAINTEXT_LENGTH 65376
+
struct gcm_test_data {
struct {
uint8_t data[64];
@@ -52,12 +53,12 @@ struct gcm_test_data {
} aad;
struct {
- uint8_t data[1024];
+ uint8_t data[8096];
unsigned len;
} plaintext;
struct {
- uint8_t data[1024];
+ uint8_t data[8096];
unsigned len;
} ciphertext;
@@ -65,7 +66,6 @@ struct gcm_test_data {
uint8_t data[16];
unsigned len;
} auth_tag;
-
};
struct gmac_test_data {
@@ -1235,4 +1235,821 @@ static const struct gmac_test_data gmac_test_case_4 = {
}
};
+static const struct gcm_test_data gcm_test_case_SGL_1 = {
+ .key = {
+ .data = {
+ 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
+ 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08 },
+ .len = 16
+ },
+ .iv = {
+ .data = {
+ 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad,
+ 0xde, 0xca, 0xf8, 0x88 },
+ .len = 12
+ },
+ .aad = {
+ .data = { 0 },
+ .len = 0
+ },
+ .plaintext = {
+ .data = {
+ 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5,
+ 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a,
+ 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda,
+ 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72,
+ 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53,
+ 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25,
+ 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57,
+ 0xba, 0x63, 0x7b, 0x39, 0x1a, 0xaf, 0xd2, 0x55,
+ 0xd8, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5,
+ 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9b,
+ 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda,
+ 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72,
+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
+ 0xED, 0x70, 0xFE, 0x90, 0xA8, 0xC8, 0x80, 0x2B,
+ 0x93, 0x08, 0xDB, 0x6A, 0x0F, 0x3D, 0xA1, 0xFA,
+ 0xB6, 0x63, 0x18, 0xF8, 0x43, 0x68, 0x00, 0xD0,
+ 0x7A, 0x97, 0xCD, 0x5B, 0xB2, 0x84, 0x90, 0x06,
+ 0xB9, 0x81, 0xC5, 0x81, 0x05, 0x55, 0x8C, 0xC4,
+ 0x03, 0x89, 0xF5, 0x63, 0x87, 0x39, 0xEC, 0xD6,
+ 0x89, 0x01, 0xE7, 0x1C, 0x4C, 0xDF, 0x5D, 0x65,
+ 0xFE, 0x4B, 0x91, 0x04, 0x5B, 0x0E, 0x03, 0x38,
+ 0x2F, 0x21, 0xA8, 0x36, 0x58, 0x93, 0xAD, 0x1F,
+ 0xEB, 0xC3, 0x91, 0x90, 0x9B, 0x95, 0xCD, 0x53,
+ 0x81, 0xAA, 0xA9, 0x48, 0x4D, 0x2B, 0x22, 0xC7,
+ 0xBE, 0x1B, 0x38, 0x21, 0xA1, 0xFE, 0x23, 0xB4,
+ 0xAC, 0x66, 0x92, 0x9E, 0xF2, 0x27, 0xDC, 0x23,
+ 0x70, 0x6E, 0xBA, 0xF9, 0xED, 0x3B, 0xCE, 0x63,
+ 0xAD, 0x68, 0xF2, 0x80, 0xFA, 0x1B, 0x14, 0xB5,
+ 0xB4, 0x07, 0xE3, 0x5A, 0x81, 0x74, 0xE1, 0xF2,
+ },
+ .len = 3120
+ },
+ .auth_tag = {
+ .data = {
+ 0xEA, 0xE9, 0x10, 0xB6, 0xB7, 0xAB, 0xEA, 0x90,
+ 0x8A, 0xD5, 0x63, 0x88, 0xDB, 0x2B, 0x8F, 0x23,
+ },
+ .len = 16
+ }
+};
+
#endif /* TEST_CRYPTODEV_GCM_TEST_VECTORS_H_ */
--
2.1.0
^ permalink raw reply related
* [PATCH 2/3] crypto/qat: add SGL capability to Intel QuickAssist driver
From: Arek Kusztal @ 2016-11-30 15:52 UTC (permalink / raw)
To: dev
Cc: fiona.trahe, pablo.de.lara.guarch, john.griffin, deepak.k.jain,
Arek Kusztal
In-Reply-To: <1480521135-14869-1-git-send-email-arkadiuszx.kusztal@intel.com>
This commit adds scatter-gather list capability to Intel QuickAssist
Technology driver.
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
doc/guides/rel_notes/release_17_02.rst | 5 ++
drivers/crypto/qat/qat_crypto.c | 145 ++++++++++++++++++++++++++++++---
drivers/crypto/qat/qat_crypto.h | 6 ++
drivers/crypto/qat/qat_qp.c | 28 +++++++
4 files changed, 173 insertions(+), 11 deletions(-)
diff --git a/doc/guides/rel_notes/release_17_02.rst b/doc/guides/rel_notes/release_17_02.rst
index 3b65038..873333b 100644
--- a/doc/guides/rel_notes/release_17_02.rst
+++ b/doc/guides/rel_notes/release_17_02.rst
@@ -38,6 +38,11 @@ New Features
Also, make sure to start the actual text at the margin.
=========================================================
+* **Updated the QAT PMD.**
+
+ The QAT PMD was updated with additional support for:
+
+ * Scatter-gather list (SGL) support.
Resolved Issues
---------------
diff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypto.c
index afce4ac..fa3c277 100644
--- a/drivers/crypto/qat/qat_crypto.c
+++ b/drivers/crypto/qat/qat_crypto.c
@@ -67,6 +67,13 @@
#define BYTE_LENGTH 8
+#define SGL_2ND_COOKIE_OFF (QAT_SGL_MAX_NUMBER \
+ * sizeof(struct qat_alg_buf) \
+ + sizeof(struct qat_alg_buf_list))
+
+#define SGL_SECOND_COOKIE_ADDR(arg, cast) ((cast)(arg) \
+ + SGL_2ND_COOKIE_OFF)
+
static const struct rte_cryptodev_capabilities qat_pmd_capabilities[] = {
{ /* SHA1 HMAC */
.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
@@ -503,7 +510,8 @@ static inline uint32_t
adf_modulo(uint32_t data, uint32_t shift);
static inline int
-qat_write_hw_desc_entry(struct rte_crypto_op *op, uint8_t *out_msg);
+qat_write_hw_desc_entry(struct rte_crypto_op *op,
+ uint8_t *out_msg, struct qat_qp *qp);
void qat_crypto_sym_clear_session(struct rte_cryptodev *dev,
void *session)
@@ -839,7 +847,6 @@ unsigned qat_crypto_sym_get_session_private_size(
return RTE_ALIGN_CEIL(sizeof(struct qat_session), 8);
}
-
uint16_t
qat_pmd_enqueue_op_burst(void *qp, struct rte_crypto_op **ops,
uint16_t nb_ops)
@@ -873,9 +880,16 @@ qat_pmd_enqueue_op_burst(void *qp, struct rte_crypto_op **ops,
}
while (nb_ops_sent != nb_ops_possible) {
- ret = qat_write_hw_desc_entry(*cur_op, base_addr + tail);
+ ret = qat_write_hw_desc_entry(*cur_op, base_addr + tail,
+ tmp_qp);
if (ret != 0) {
tmp_qp->stats.enqueue_err_count++;
+ /*
+ * This message cannot be enqueued,
+ * decrease number of ops that wasnt sent
+ */
+ rte_atomic16_sub(&tmp_qp->inflights16,
+ nb_ops_possible - nb_ops_sent);
if (nb_ops_sent == 0)
return 0;
goto kick_tail;
@@ -884,6 +898,7 @@ qat_pmd_enqueue_op_burst(void *qp, struct rte_crypto_op **ops,
tail = adf_modulo(tail + queue->msg_size, queue->modulo);
nb_ops_sent++;
cur_op++;
+
}
kick_tail:
WRITE_CSR_RING_TAIL(tmp_qp->mmap_bar_addr, queue->hw_bundle_number,
@@ -914,7 +929,7 @@ qat_pmd_dequeue_op_burst(void *qp, struct rte_crypto_op **ops,
#ifdef RTE_LIBRTE_PMD_QAT_DEBUG_RX
rte_hexdump(stdout, "qat_response:", (uint8_t *)resp_msg,
- sizeof(struct icp_qat_fw_comn_resp));
+ sizeof(struct icp_qat_fw_comn_resp));
#endif
if (ICP_QAT_FW_COMN_STATUS_FLAG_OK !=
ICP_QAT_FW_COMN_RESP_CRYPTO_STAT_GET(
@@ -923,6 +938,15 @@ qat_pmd_dequeue_op_burst(void *qp, struct rte_crypto_op **ops,
} else {
rx_op->status = RTE_CRYPTO_OP_STATUS_SUCCESS;
}
+ /*
+ * _priv set for symmetric means it is SGL
+ * free this address from qp mempool of SGL's
+ */
+ if (rx_op->_priv) {
+ rte_mempool_put(tmp_qp->sgl_pool, rx_op->_priv);
+ rx_op->_priv = NULL;
+ }
+
*(uint32_t *)resp_msg = ADF_RING_EMPTY_SIG;
queue->head = adf_modulo(queue->head +
queue->msg_size,
@@ -945,8 +969,51 @@ qat_pmd_dequeue_op_burst(void *qp, struct rte_crypto_op **ops,
}
static inline int
-qat_write_hw_desc_entry(struct rte_crypto_op *op, uint8_t *out_msg)
+qat_sgl_fill_array(struct rte_mbuf *buf, uint64_t buff_start,
+ void *sgl_cookie, int32_t total_pck_len)
{
+ int nr = 0;
+ struct qat_alg_buf_list *list = sgl_cookie;
+
+ int32_t total_len = rte_pktmbuf_mtophys(buf)
+ - buff_start;
+
+ uint32_t first_buf_len = rte_pktmbuf_mtophys(buf) -
+ buff_start + rte_pktmbuf_data_len(buf);
+
+ while (buf) {
+ if (unlikely(nr == QAT_SGL_MAX_NUMBER)) {
+ PMD_DRV_LOG(ERR, "QAT PMD exceeded size of QAT SGL"
+ " entry(%u)",
+ QAT_SGL_MAX_NUMBER);
+ return -EINVAL;
+ }
+
+ list->bufers[nr].len = rte_pktmbuf_data_len(buf);
+ list->bufers[nr].resrvd = 0;
+ list->bufers[nr].addr = rte_pktmbuf_mtophys(buf);
+
+ ++nr;
+ buf = buf->next;
+
+ total_len += list->bufers[nr].len;
+ if (total_len >= total_pck_len)
+ buf = NULL;
+ }
+
+ list->bufers[0].addr = buff_start;
+ list->bufers[0].len = first_buf_len;
+
+ list->num_bufs = nr;
+
+ return 0;
+}
+
+static inline int
+qat_write_hw_desc_entry(struct rte_crypto_op *op, uint8_t *out_msg,
+ struct qat_qp *qp)
+{
+ int ret = 0;
struct qat_session *ctx;
struct icp_qat_fw_la_cipher_req_params *cipher_param;
struct icp_qat_fw_la_auth_req_params *auth_param;
@@ -956,6 +1023,9 @@ qat_write_hw_desc_entry(struct rte_crypto_op *op, uint8_t *out_msg)
uint32_t auth_len = 0, auth_ofs = 0;
uint32_t min_ofs = 0;
uint64_t src_buf_start = 0, dst_buf_start = 0;
+ void *cookie_virt_addr = NULL;
+ phys_addr_t cookie_phys_addr = 0;
+ uint8_t do_sgl = 0;
#ifdef RTE_LIBRTE_PMD_QAT_DEBUG_TX
@@ -1073,10 +1143,25 @@ qat_write_hw_desc_entry(struct rte_crypto_op *op, uint8_t *out_msg)
}
+ if (op->sym->m_src->next || (op->sym->m_dst && op->sym->m_dst->next))
+ do_sgl = 1;
+
+ if (do_sgl) {
+ if (rte_mempool_get(qp->sgl_pool, &cookie_virt_addr)) {
+ PMD_DRV_LOG(ERR, "QAT PMD Cannot get sgl_cookie");
+ return -EFAULT;
+ }
+ cookie_phys_addr = rte_mempool_virt2phy(qp->sgl_pool,
+ cookie_virt_addr);
+ }
+
/* adjust for chain case */
if (do_cipher && do_auth)
min_ofs = cipher_ofs < auth_ofs ? cipher_ofs : auth_ofs;
+ if (unlikely(min_ofs >= rte_pktmbuf_data_len(op->sym->m_src) && do_sgl))
+ min_ofs = 0;
+
if (unlikely(op->sym->m_dst != NULL)) {
/* Out-of-place operation (OOP)
* Don't align DMA start. DMA the minimum data-set
@@ -1086,6 +1171,7 @@ qat_write_hw_desc_entry(struct rte_crypto_op *op, uint8_t *out_msg)
rte_pktmbuf_mtophys_offset(op->sym->m_src, min_ofs);
dst_buf_start =
rte_pktmbuf_mtophys_offset(op->sym->m_dst, min_ofs);
+
} else {
/* In-place operation
* Start DMA at nearest aligned address below min_ofs
@@ -1131,8 +1217,49 @@ qat_write_hw_desc_entry(struct rte_crypto_op *op, uint8_t *out_msg)
(cipher_param->cipher_offset + cipher_param->cipher_length)
: (auth_param->auth_off + auth_param->auth_len);
- qat_req->comn_mid.src_data_addr = src_buf_start;
- qat_req->comn_mid.dest_data_addr = dst_buf_start;
+ if (do_sgl) {
+
+ op->_priv = cookie_virt_addr;
+
+ ICP_QAT_FW_COMN_PTR_TYPE_SET(qat_req->comn_hdr.comn_req_flags,
+ QAT_COMN_PTR_TYPE_SGL);
+ ret = qat_sgl_fill_array(op->sym->m_src, src_buf_start,
+ cookie_virt_addr, qat_req->comn_mid.src_length);
+ if (ret) {
+ PMD_DRV_LOG(ERR, "QAT PMD Cannot fill sgl array");
+ rte_mempool_put(qp->sgl_pool, cookie_virt_addr);
+ return ret;
+ }
+
+ if (likely(op->sym->m_dst == NULL))
+ qat_req->comn_mid.dest_data_addr =
+ qat_req->comn_mid.src_data_addr =
+ cookie_phys_addr;
+ else {
+ ret = qat_sgl_fill_array(op->sym->m_dst,
+ dst_buf_start,
+ SGL_SECOND_COOKIE_ADDR(cookie_virt_addr,
+ uint8_t *),
+ qat_req->comn_mid.dst_length);
+
+ if (ret) {
+ PMD_DRV_LOG(ERR, "QAT PMD Cannot fill sgl array");
+ rte_mempool_put(qp->sgl_pool, cookie_virt_addr);
+ return ret;
+ }
+
+ qat_req->comn_mid.src_data_addr =
+ cookie_phys_addr;
+
+ qat_req->comn_mid.dest_data_addr =
+ SGL_SECOND_COOKIE_ADDR(cookie_phys_addr,
+ phys_addr_t);
+ }
+
+ } else {
+ qat_req->comn_mid.src_data_addr = src_buf_start;
+ qat_req->comn_mid.dest_data_addr = dst_buf_start;
+ }
if (ctx->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_GALOIS_128 ||
ctx->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_GALOIS_64) {
@@ -1164,13 +1291,9 @@ qat_write_hw_desc_entry(struct rte_crypto_op *op, uint8_t *out_msg)
}
}
-
#ifdef RTE_LIBRTE_PMD_QAT_DEBUG_TX
rte_hexdump(stdout, "qat_req:", qat_req,
sizeof(struct icp_qat_fw_la_bulk_req));
- rte_hexdump(stdout, "src_data:",
- rte_pktmbuf_mtod(op->sym->m_src, uint8_t*),
- rte_pktmbuf_data_len(op->sym->m_src));
rte_hexdump(stdout, "iv:", op->sym->cipher.iv.data,
op->sym->cipher.iv.length);
rte_hexdump(stdout, "digest:", op->sym->auth.digest.data,
diff --git a/drivers/crypto/qat/qat_crypto.h b/drivers/crypto/qat/qat_crypto.h
index 6b84488..8612706 100644
--- a/drivers/crypto/qat/qat_crypto.h
+++ b/drivers/crypto/qat/qat_crypto.h
@@ -45,6 +45,11 @@
(((num) + (align) - 1) & ~((align) - 1))
#define QAT_64_BTYE_ALIGN_MASK (~0x3f)
+/*
+ * Maximum number of SGL entries
+ */
+#define QAT_SGL_MAX_NUMBER 16
+
/**
* Structure associated with each queue.
*/
@@ -69,6 +74,7 @@ struct qat_qp {
struct qat_queue tx_q;
struct qat_queue rx_q;
struct rte_cryptodev_stats stats;
+ struct rte_mempool *sgl_pool;
} __rte_cache_aligned;
/** private data structure for each QAT device */
diff --git a/drivers/crypto/qat/qat_qp.c b/drivers/crypto/qat/qat_qp.c
index 2e7188b..27c5f9a 100644
--- a/drivers/crypto/qat/qat_qp.c
+++ b/drivers/crypto/qat/qat_qp.c
@@ -41,6 +41,7 @@
#include "qat_logs.h"
#include "qat_crypto.h"
+#include "qat_algs.h"
#include "adf_transport_access_macros.h"
#define ADF_MAX_SYM_DESC 4096
@@ -136,6 +137,7 @@ int qat_crypto_sym_qp_setup(struct rte_cryptodev *dev, uint16_t queue_pair_id,
{
struct qat_qp *qp;
int ret;
+ char sgl_pool_name[RTE_RING_NAMESIZE];
PMD_INIT_FUNC_TRACE();
@@ -191,9 +193,31 @@ int qat_crypto_sym_qp_setup(struct rte_cryptodev *dev, uint16_t queue_pair_id,
qat_queue_delete(&(qp->tx_q));
goto create_err;
}
+
adf_configure_queues(qp);
adf_queue_arb_enable(&qp->tx_q, qp->mmap_bar_addr);
+
+ snprintf(sgl_pool_name, RTE_RING_NAMESIZE, "%s_qp_sgl_%d_%hu",
+ dev->driver->pci_drv.driver.name, dev->data->dev_id,
+ queue_pair_id);
+
+ qp->sgl_pool = rte_mempool_lookup(sgl_pool_name);
+
+ if (qp->sgl_pool == NULL)
+ qp->sgl_pool = rte_mempool_create(sgl_pool_name,
+ qp->tx_q.max_inflights,
+ (sizeof(struct qat_alg_buf_list) +
+ sizeof(struct qat_alg_buf) *
+ QAT_SGL_MAX_NUMBER) * 2, 0, 0,
+ NULL, NULL, NULL, NULL, socket_id, 0);
+ if (qp->sgl_pool == NULL) {
+ PMD_DRV_LOG(ERR, "QAT PMD Cannot create"
+ " sgl mempool");
+ goto create_err;
+ }
+
dev->data->queue_pairs[queue_pair_id] = qp;
+
return 0;
create_err:
@@ -221,6 +245,10 @@ int qat_crypto_sym_qp_release(struct rte_cryptodev *dev, uint16_t queue_pair_id)
}
adf_queue_arb_disable(&(qp->tx_q), qp->mmap_bar_addr);
+
+ if (qp->sgl_pool)
+ rte_mempool_free(qp->sgl_pool);
+
rte_free(qp);
dev->data->queue_pairs[queue_pair_id] = NULL;
return 0;
--
2.1.0
^ permalink raw reply related
* [PATCH 1/3] lib/librte_cryptodev: add private member to crypto op struct
From: Arek Kusztal @ 2016-11-30 15:52 UTC (permalink / raw)
To: dev
Cc: fiona.trahe, pablo.de.lara.guarch, john.griffin, deepak.k.jain,
Arek Kusztal
In-Reply-To: <1480521135-14869-1-git-send-email-arkadiuszx.kusztal@intel.com>
This commit adds void * _priv member to rte_crypto_op struct to be used
by internal driver operations.
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
lib/librte_cryptodev/rte_crypto.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/librte_cryptodev/rte_crypto.h b/lib/librte_cryptodev/rte_crypto.h
index 9019518..9aa09ce 100644
--- a/lib/librte_cryptodev/rte_crypto.h
+++ b/lib/librte_cryptodev/rte_crypto.h
@@ -117,6 +117,9 @@ struct rte_crypto_op {
struct rte_crypto_sym_op *sym;
/**< Symmetric operation parameters */
}; /**< operation specific parameters */
+
+ void *_priv;
+ /**< Private pointer to be used by driver */
} __rte_cache_aligned;
/**
@@ -146,6 +149,7 @@ __rte_crypto_op_reset(struct rte_crypto_op *op, enum rte_crypto_op_type type)
}
op->opaque_data = NULL;
+ op->_priv = NULL;
}
/**
--
2.1.0
^ permalink raw reply related
* [PATCH 0/3] Add scatter-gather list capability to Intel QuickAssist Technology driver
From: Arek Kusztal @ 2016-11-30 15:52 UTC (permalink / raw)
To: dev
Cc: fiona.trahe, pablo.de.lara.guarch, john.griffin, deepak.k.jain,
Arek Kusztal
This patchset adds scatter-gather list (SGL) capability to Intel QuickAssist Technology driver
and corresponding tests to QAT cryptodev test suite.
This patchset depends on the following patches/patchsets:
"crypto/qat: fix to avoid buffer overwrite in OOP case"
(http://dpdk.org/dev/patchwork/patch/17241)
Arek Kusztal (3):
lib/librte_cryptodev: add private member to crypto op struct
crypto/qat: add SGL capability to Intel QuickAssist driver
app/test: add SGL tests to cryptodev QAT suite
app/test/test_cryptodev.c | 356 +++++++++++++
app/test/test_cryptodev_gcm_test_vectors.h | 823 ++++++++++++++++++++++++++++-
doc/guides/rel_notes/release_17_02.rst | 5 +
drivers/crypto/qat/qat_crypto.c | 145 ++++-
drivers/crypto/qat/qat_crypto.h | 6 +
drivers/crypto/qat/qat_qp.c | 28 +
lib/librte_cryptodev/rte_crypto.h | 4 +
7 files changed, 1353 insertions(+), 14 deletions(-)
--
2.1.0
^ permalink raw reply
* Re: [PATCH] scripts: check cc stable mailing list in commit
From: Bruce Richardson @ 2016-11-30 15:36 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Ferruh Yigit, dev
In-Reply-To: <6354876.YigQL2JU2Y@xps13>
On Wed, Nov 30, 2016 at 04:31:46PM +0100, Thomas Monjalon wrote:
> 2016-11-30 15:26, Bruce Richardson:
> > On Wed, Nov 30, 2016 at 04:09:47PM +0100, Thomas Monjalon wrote:
> > > 2016-11-30 14:54, Ferruh Yigit:
> > > > On 11/21/2016 10:43 PM, Thomas Monjalon wrote:
> > > > > +stablefixes=$($selfdir/git-log-fixes.sh $range | sed '/(N\/A)$/d' | cut -d' ' -f2)
> > > >
> > > > This breaks the "check-git-log.sh -N" usage, since "-N" is not a valid
> > > > range for git-log-fixes.sh.
> > > > Generates warning:
> > > > .../scripts/git-log-fixes.sh: illegal option -- 6
> > > > usage: git-log-fixes.sh [-h] <git_range>
> > >
> > > Yes, good catch.
> > > I'm trying to fix it by converting -N to HEAD~N..
> > >
> > > if printf -- $range | grep -q '^-[0-9]\+' ; then
> > > range="HEAD$(printf -- $range | sed 's,^-,~,').."
> > > fi
> > >
> > > > > +# check CC:stable for fixes
> > > > > +bad=$(for fix in $stablefixes ; do
> > > > > + git log --format='%b' -1 $fix | grep -qi '^CC: *stable@dpdk.org' ||
> > > > > + git log --format='\t%s' -1 $fix
> > > > > +done)
> > > > > +[ -z "$bad" ] || printf "Should CC: stable@dpdk.org\n$bad\n"
> > > >
> > > > This is good for developer, but since "CC: xx" tags removed when patch
> > > > applied, this will generate warnings when run against existing history.
> > >
> > > I do not think it is a problem.
> > > Who runs this tool against existing history?
> > >
> >
> > Me for one. I prefer to run the script against the commits in the repo
> > before I generate the patches, rather than manually hand-editing the
> > patches afterward - or having to fix the repo and then regenerate them.
> > Also, when I was maintaining the next-net tree, I used to use pwclient git-am
> > to apply a patch, and then check-got-log.sh -1 to sanity check it once
> > build checks had passed.
>
> I am not sure to understand.
> You explain that you run the script for the commits you are going to send
> or going to push. That's the normal usage.
> In your cases you should have the CC: stable or you will have the warning.
>
Ah, yes, good point.
Never mind.
/Bruce
^ permalink raw reply
* Re: [PATCH] scripts: check cc stable mailing list in commit
From: Thomas Monjalon @ 2016-11-30 15:31 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Ferruh Yigit, dev
In-Reply-To: <20161130152622.GA259108@bricha3-MOBL3.ger.corp.intel.com>
2016-11-30 15:26, Bruce Richardson:
> On Wed, Nov 30, 2016 at 04:09:47PM +0100, Thomas Monjalon wrote:
> > 2016-11-30 14:54, Ferruh Yigit:
> > > On 11/21/2016 10:43 PM, Thomas Monjalon wrote:
> > > > +stablefixes=$($selfdir/git-log-fixes.sh $range | sed '/(N\/A)$/d' | cut -d' ' -f2)
> > >
> > > This breaks the "check-git-log.sh -N" usage, since "-N" is not a valid
> > > range for git-log-fixes.sh.
> > > Generates warning:
> > > .../scripts/git-log-fixes.sh: illegal option -- 6
> > > usage: git-log-fixes.sh [-h] <git_range>
> >
> > Yes, good catch.
> > I'm trying to fix it by converting -N to HEAD~N..
> >
> > if printf -- $range | grep -q '^-[0-9]\+' ; then
> > range="HEAD$(printf -- $range | sed 's,^-,~,').."
> > fi
> >
> > > > +# check CC:stable for fixes
> > > > +bad=$(for fix in $stablefixes ; do
> > > > + git log --format='%b' -1 $fix | grep -qi '^CC: *stable@dpdk.org' ||
> > > > + git log --format='\t%s' -1 $fix
> > > > +done)
> > > > +[ -z "$bad" ] || printf "Should CC: stable@dpdk.org\n$bad\n"
> > >
> > > This is good for developer, but since "CC: xx" tags removed when patch
> > > applied, this will generate warnings when run against existing history.
> >
> > I do not think it is a problem.
> > Who runs this tool against existing history?
> >
>
> Me for one. I prefer to run the script against the commits in the repo
> before I generate the patches, rather than manually hand-editing the
> patches afterward - or having to fix the repo and then regenerate them.
> Also, when I was maintaining the next-net tree, I used to use pwclient git-am
> to apply a patch, and then check-got-log.sh -1 to sanity check it once
> build checks had passed.
I am not sure to understand.
You explain that you run the script for the commits you are going to send
or going to push. That's the normal usage.
In your cases you should have the CC: stable or you will have the warning.
^ permalink raw reply
* Re: [PATCH] scripts: check cc stable mailing list in commit
From: Bruce Richardson @ 2016-11-30 15:26 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Ferruh Yigit, dev
In-Reply-To: <3896815.T41b2RsLT8@xps13>
On Wed, Nov 30, 2016 at 04:09:47PM +0100, Thomas Monjalon wrote:
> 2016-11-30 14:54, Ferruh Yigit:
> > On 11/21/2016 10:43 PM, Thomas Monjalon wrote:
> > > +stablefixes=$($selfdir/git-log-fixes.sh $range | sed '/(N\/A)$/d' | cut -d' ' -f2)
> >
> > This breaks the "check-git-log.sh -N" usage, since "-N" is not a valid
> > range for git-log-fixes.sh.
> > Generates warning:
> > .../scripts/git-log-fixes.sh: illegal option -- 6
> > usage: git-log-fixes.sh [-h] <git_range>
>
> Yes, good catch.
> I'm trying to fix it by converting -N to HEAD~N..
>
> if printf -- $range | grep -q '^-[0-9]\+' ; then
> range="HEAD$(printf -- $range | sed 's,^-,~,').."
> fi
>
> > > +# check CC:stable for fixes
> > > +bad=$(for fix in $stablefixes ; do
> > > + git log --format='%b' -1 $fix | grep -qi '^CC: *stable@dpdk.org' ||
> > > + git log --format='\t%s' -1 $fix
> > > +done)
> > > +[ -z "$bad" ] || printf "Should CC: stable@dpdk.org\n$bad\n"
> >
> > This is good for developer, but since "CC: xx" tags removed when patch
> > applied, this will generate warnings when run against existing history.
>
> I do not think it is a problem.
> Who runs this tool against existing history?
>
Me for one. I prefer to run the script against the commits in the repo
before I generate the patches, rather than manually hand-editing the
patches afterward - or having to fix the repo and then regenerate them.
Also, when I was maintaining the next-net tree, I used to use pwclient git-am
to apply a patch, and then check-got-log.sh -1 to sanity check it once
build checks had passed.
/Bruce
^ permalink raw reply
* Re: [PATCH] crypto: remove unused digest-appended feature
From: De Lara Guarch, Pablo @ 2016-11-30 15:16 UTC (permalink / raw)
To: Griffin, John, Trahe, Fiona, dev@dpdk.org
Cc: Jastrzebski, MichalX K, Kusztal, ArkadiuszX
In-Reply-To: <582F455F.3030505@intel.com>
> -----Original Message-----
> From: Griffin, John
> Sent: Friday, November 18, 2016 6:16 PM
> To: Trahe, Fiona; dev@dpdk.org
> Cc: De Lara Guarch, Pablo; Jastrzebski, MichalX K; Kusztal, ArkadiuszX
> Subject: Re: [PATCH] crypto: remove unused digest-appended feature
>
> On 17/11/16 17:33, Fiona Trahe wrote:
> > The cryptodev API had specified that if the digest address field was
> > left empty on an authentication operation, then the PMD would assume
> > the digest was appended to the source or destination data.
> > This case was not handled at all by most PMDs and incorrectly handled
> > by the QAT PMD.
> > As no bugs were raised, it is assumed to be not needed, so this patch
> > removes it, rather than add handling for the case on all PMDs.
> > The digest can still be appended to the data, but its
> > address must now be provided in the op.
> >
> > Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
> > ---
> > drivers/crypto/qat/qat_adf/qat_algs_build_desc.c | 2 ++
> > drivers/crypto/qat/qat_crypto.c | 18 +-----------------
> > lib/librte_cryptodev/rte_crypto_sym.h | 10 +---------
> > 3 files changed, 4 insertions(+), 26 deletions(-)
> >
>
> Acked-by: John Griffin <john.griffin@intel.com>
Applied to dpdk-next-crypto.
Thanks,
Pablo
^ permalink raw reply
* Re: [PATCH] test: adding AES cipher-only tests on QAT PMD
From: De Lara Guarch, Pablo @ 2016-11-30 15:16 UTC (permalink / raw)
To: Kusztal, ArkadiuszX, Trahe, Fiona, dev@dpdk.org; +Cc: Griffin, John
In-Reply-To: <80307F746F1522479831AB1253B7024E70C403@IRSMSX102.ger.corp.intel.com>
> -----Original Message-----
> From: Kusztal, ArkadiuszX
> Sent: Friday, November 25, 2016 2:14 PM
> To: Trahe, Fiona; dev@dpdk.org
> Cc: De Lara Guarch, Pablo; Griffin, John
> Subject: RE: [PATCH] test: adding AES cipher-only tests on QAT PMD
>
>
>
> > -----Original Message-----
> > From: Trahe, Fiona
> > Sent: Thursday, November 24, 2016 6:29 PM
> > To: dev@dpdk.org
> > Cc: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Trahe, Fiona
> > <fiona.trahe@intel.com>; Griffin, John <john.griffin@intel.com>; Kusztal,
> > ArkadiuszX <arkadiuszx.kusztal@intel.com>
> > Subject: [PATCH] test: adding AES cipher-only tests on QAT PMD
> >
> > Extended functional AES-CBC and AES-CTR cipher-only tests to run on QAT
> > PMD.
> > Added AES_CBC cipher-only performance tests on QAT PMD.
> > No driver changes, but as now tested, QAT documentation is updated to
> > remove constraint.
> >
> > Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
> > ---
> > app/test/test_cryptodev.c | 18 ++++++
> > app/test/test_cryptodev_aes_test_vectors.h | 36 +++++++----
> > app/test/test_cryptodev_perf.c | 96 +++++++++++++++++++------
> ----
> > -
> > doc/guides/cryptodevs/qat.rst | 1 -
> > 4 files changed, 102 insertions(+), 49 deletions(-)
> >
> > --
> > 2.5.0
> Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Applied to dpdk-next-crypto.
Thanks,
Pablo
^ permalink raw reply
* Re: [PATCH] cryptodev: fix crash on null dereference
From: De Lara Guarch, Pablo @ 2016-11-30 15:10 UTC (permalink / raw)
To: Jerin Jacob, dev@dpdk.org; +Cc: Doherty, Declan
In-Reply-To: <1479237103-7166-1-git-send-email-jerin.jacob@caviumnetworks.com>
Hi Jerin,
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jerin Jacob
> Sent: Tuesday, November 15, 2016 7:12 PM
> To: dev@dpdk.org
> Cc: Doherty, Declan; Jerin Jacob
> Subject: [dpdk-dev] [PATCH] cryptodev: fix crash on null dereference
>
> crypodev->data->name will be null when
> rte_cryptodev_get_dev_id() invoked without a valid
> crypto device instance.
>
> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Could you add a "Fixes" line?
Thanks,
Pablo
^ permalink raw reply
* Re: [PATCH] scripts: check cc stable mailing list in commit
From: Thomas Monjalon @ 2016-11-30 15:09 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: dev
In-Reply-To: <1b249c77-5685-8492-6f6b-3478a2731267@intel.com>
2016-11-30 14:54, Ferruh Yigit:
> On 11/21/2016 10:43 PM, Thomas Monjalon wrote:
> > +stablefixes=$($selfdir/git-log-fixes.sh $range | sed '/(N\/A)$/d' | cut -d' ' -f2)
>
> This breaks the "check-git-log.sh -N" usage, since "-N" is not a valid
> range for git-log-fixes.sh.
> Generates warning:
> .../scripts/git-log-fixes.sh: illegal option -- 6
> usage: git-log-fixes.sh [-h] <git_range>
Yes, good catch.
I'm trying to fix it by converting -N to HEAD~N..
if printf -- $range | grep -q '^-[0-9]\+' ; then
range="HEAD$(printf -- $range | sed 's,^-,~,').."
fi
> > +# check CC:stable for fixes
> > +bad=$(for fix in $stablefixes ; do
> > + git log --format='%b' -1 $fix | grep -qi '^CC: *stable@dpdk.org' ||
> > + git log --format='\t%s' -1 $fix
> > +done)
> > +[ -z "$bad" ] || printf "Should CC: stable@dpdk.org\n$bad\n"
>
> This is good for developer, but since "CC: xx" tags removed when patch
> applied, this will generate warnings when run against existing history.
I do not think it is a problem.
Who runs this tool against existing history?
> I don't know what can be done for this.
>
> Or should we keep CC: tags in commit log perhaps?
I do not see the value of keeping the CC: in the git history.
^ permalink raw reply
* Re: [PATCH] scripts: check cc stable mailing list in commit
From: Ferruh Yigit @ 2016-11-30 14:54 UTC (permalink / raw)
To: Thomas Monjalon, dev
In-Reply-To: <1479768194-6255-1-git-send-email-thomas.monjalon@6wind.com>
On 11/21/2016 10:43 PM, Thomas Monjalon wrote:
> Add a check for commits fixing a released bug.
> Such commits are found thanks to scripts/git-log-fixes.sh.
> They must be sent CC: stable@dpdk.org.
> In order to avoid forgetting CC, this mail header can be written
> in the git commit message.
>
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
I think this is useful, thanks for the patch.
> ---
> scripts/check-git-log.sh | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/scripts/check-git-log.sh b/scripts/check-git-log.sh
> index 5f8a9fc..4f98a7a 100755
> --- a/scripts/check-git-log.sh
> +++ b/scripts/check-git-log.sh
> @@ -47,12 +47,14 @@ if [ "$1" = '-h' -o "$1" = '--help' ] ; then
> exit
> fi
>
> +selfdir=$(dirname $(readlink -e $0))
> range=${1:-origin/master..}
>
> commits=$(git log --format='%h' --reverse $range)
> headlines=$(git log --format='%s' --reverse $range)
> bodylines=$(git log --format='%b' --reverse $range)
> fixes=$(git log --format='%h %s' --reverse $range | grep -i ': *fix' | cut -d' ' -f1)
> +stablefixes=$($selfdir/git-log-fixes.sh $range | sed '/(N\/A)$/d' | cut -d' ' -f2)
This breaks the "check-git-log.sh -N" usage, since "-N" is not a valid
range for git-log-fixes.sh.
Generates warning:
.../scripts/git-log-fixes.sh: illegal option -- 6
usage: git-log-fixes.sh [-h] <git_range>
> tags=$(git log --format='%b' --reverse $range | grep -i -e 'by *:' -e 'fix.*:')
> bytag='\(Reported\|Suggested\|Signed-off\|Acked\|Reviewed\|Tested\)-by:'
>
> @@ -191,3 +193,10 @@ bad=$(for fixtag in $fixtags ; do
> printf "$fixtag" | grep -v "^$good$"
> done | sed 's,^,\t,')
> [ -z "$bad" ] || printf "Wrong 'Fixes' reference:\n$bad\n"
> +
> +# check CC:stable for fixes
> +bad=$(for fix in $stablefixes ; do
> + git log --format='%b' -1 $fix | grep -qi '^CC: *stable@dpdk.org' ||
> + git log --format='\t%s' -1 $fix
> +done)
> +[ -z "$bad" ] || printf "Should CC: stable@dpdk.org\n$bad\n"
This is good for developer, but since "CC: xx" tags removed when patch
applied, this will generate warnings when run against existing history.
I don't know what can be done for this.
Or should we keep CC: tags in commit log perhaps?
>
^ permalink raw reply
* Re: [PATCH] scripts: fix checkpatch from standard input
From: Thomas Monjalon @ 2016-11-30 14:32 UTC (permalink / raw)
To: Olivier Matz; +Cc: dev
In-Reply-To: <20161128162110.23127b42@platinum>
2016-11-28 16:21, Olivier Matz:
> On Mon, 21 Nov 2016 23:42:41 +0100, Thomas Monjalon
> <thomas.monjalon@6wind.com> wrote:
> > When checking a valid patch from standard input,
> > the footer lines of the report are not filtered out.
> >
> > The function check is called outside of any loop,
> > so the statement continue has no effect and the footer is printed.
> >
> > Fixes: 8005feef421d ("scripts: add standard input to checkpatch")
> >
> > Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
>
> The 'continue' statement is not always without effect. On my machine
> (but it looks it's not the same everywhere):
> - with dash, the 'continue' acts like a return in that case
> - with bash, it displays an error:
> "continue: only meaningful in a `for', `while', or `until' loop"
> - with bash --posix, the 'continue' is ignored...
>
> In my case, checkpatches.sh was displaying "0/1 valid" although there
> was no error. This patch solves the issue, thanks.
>
>
> Acked-by: Olivier Matz <olivier.matz@6wind.com>
I've amended with your explanations and applied, thanks
^ permalink raw reply
* Re: [PATCH v2] maintainers: update pcap pmd maintainers
From: Thomas Monjalon @ 2016-11-30 13:53 UTC (permalink / raw)
To: John McNamara; +Cc: dev, nicolas.pernas.maradei, ferruh.yigit
In-Reply-To: <1480430355-11444-1-git-send-email-john.mcnamara@intel.com>
2016-11-29 14:39, John McNamara:
> Remove Nico Pernas Maradei as a PCAP PMD maintainer.
>
> Signed-off-by: John McNamara <john.mcnamara@intel.com>
Yes he is not active anymore.
Note he is welcome to come back at any time.
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Applied, thanks
^ permalink raw reply
* Re: [PATCH v2] net/i40evf: fix casting between structs
From: Ferruh Yigit @ 2016-11-30 13:46 UTC (permalink / raw)
To: Jingjing Wu, dev; +Cc: helin.zhang
In-Reply-To: <1480471345-95458-1-git-send-email-jingjing.wu@intel.com>
On 11/30/2016 2:02 AM, Jingjing Wu wrote:
> Casting from structs which lay out data in typed members
> to structs which have flat memory buffers, will cause
> problems if the alignment of the former isn't as expected.
> This patch removes the casting between structs.
>
> Fixes: ae19955e7c86 ("i40evf: support reporting PF reset")
> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply
* Re: [PATCH] e1000/base: announce supported NICs
From: Ferruh Yigit @ 2016-11-30 13:07 UTC (permalink / raw)
To: Wenzhuo Lu, dev
In-Reply-To: <1480270304-10715-1-git-send-email-wenzhuo.lu@intel.com>
On 11/27/2016 6:11 PM, Wenzhuo Lu wrote:
> Announce the support of I219 NICs. Also add all the
> other supported NICs.
>
> Add Intel I219 NICs support in release note too.
>
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Commit log and release notes wording updated.
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply
* Re: [PATCH v2 1/1] net/i40e: enable auto link update for 25G
From: Ferruh Yigit @ 2016-11-30 12:57 UTC (permalink / raw)
To: Qi Zhang, jingjing.wu, helin.zhang; +Cc: dev
In-Reply-To: <1480451181-32566-1-git-send-email-qi.z.zhang@intel.com>
On 11/29/2016 8:26 PM, Qi Zhang wrote:
> In previous patch for 25G (XXV710) enable
> 75d133dd329: ("net/i40e: enable 25G device"),
> we intend to disable the auto linke update as a work around
> for the issue that link can't be turn on when auto link update
> is enabled. Now we know the root cause, there are interface
> changes of AQ command "set_phy_config" and "get_phy_capabilities"
> for 25G. So, this patch remove this limitation.
>
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Commit log updated a little.
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply
* [dpdk-announce] DPDK 16.07.2 released
From: Yuanhan Liu @ 2016-11-30 12:17 UTC (permalink / raw)
To: announce
Hi all,
Here is a new stable release for 16.07:
http://fast.dpdk.org/rel/dpdk-16.07.2.tar.xz
Thanks everyone for making it happen!
Please note that this will be the last stable release for 16.07, and
16.11 will be our first LTS, which would have longer maintenance (2
years).
--yliu
---
app/proc_info/main.c | 6 +-
app/test-pmd/cmdline.c | 70 +--
app/test-pmd/config.c | 61 ++-
app/test-pmd/testpmd.c | 50 +-
app/test-pmd/testpmd.h | 6 +
app/test/test_hash_multiwriter.c | 10 +-
doc/guides/nics/enic.rst | 53 ++-
doc/guides/nics/i40e.rst | 48 ++
doc/guides/nics/mlx5.rst | 3 +-
doc/guides/rel_notes/release_16_07.rst | 95 +++-
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 3 +-
drivers/net/bnx2x/bnx2x.c | 6 +-
drivers/net/bnx2x/elink.c | 2 +-
drivers/net/bnxt/bnxt.h | 1 +
drivers/net/bnxt/bnxt_ethdev.c | 30 +-
drivers/net/bnxt/bnxt_vnic.c | 2 +-
drivers/net/bonding/rte_eth_bond_api.c | 15 -
drivers/net/bonding/rte_eth_bond_pmd.c | 10 +
drivers/net/ena/ena_ethdev.c | 10 +-
drivers/net/enic/base/vnic_rq.c | 6 +-
drivers/net/enic/base/vnic_rq.h | 1 +
drivers/net/enic/enic.h | 8 +-
drivers/net/enic/enic_clsf.c | 5 +-
drivers/net/enic/enic_ethdev.c | 10 +-
drivers/net/enic/enic_main.c | 32 +-
drivers/net/fm10k/fm10k_ethdev.c | 5 +-
drivers/net/fm10k/fm10k_rxtx.c | 10 +
drivers/net/fm10k/fm10k_rxtx_vec.c | 3 +
drivers/net/i40e/i40e_ethdev.c | 214 ++++-----
drivers/net/i40e/i40e_ethdev.h | 4 +-
drivers/net/i40e/i40e_ethdev_vf.c | 81 +---
drivers/net/i40e/i40e_pf.c | 33 +-
drivers/net/i40e/i40e_pf.h | 3 +-
drivers/net/i40e/i40e_rxtx_vec.c | 4 +-
drivers/net/ixgbe/ixgbe_fdir.c | 10 +-
drivers/net/ixgbe/ixgbe_regs.h | 40 +-
drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 3 +
drivers/net/mlx5/Makefile | 20 +
drivers/net/mlx5/mlx5.c | 1 +
drivers/net/mlx5/mlx5.h | 4 +
drivers/net/mlx5/mlx5_ethdev.c | 162 ++++++-
drivers/net/mlx5/mlx5_fdir.c | 270 +++++++----
drivers/net/mlx5/mlx5_prm.h | 27 ++
drivers/net/mlx5/mlx5_rxq.c | 9 +-
drivers/net/mlx5/mlx5_rxtx.c | 521 +++++----------------
drivers/net/mlx5/mlx5_rxtx.h | 7 +-
drivers/net/mlx5/mlx5_txq.c | 9 +-
drivers/net/mlx5/mlx5_vlan.c | 3 +-
drivers/net/qede/Makefile | 4 +
drivers/net/ring/rte_eth_ring.c | 2 +-
drivers/net/thunderx/nicvf_rxtx.c | 11 +-
drivers/net/virtio/virtio_ethdev.c | 14 +-
drivers/net/vmxnet3/vmxnet3_rxtx.c | 34 +-
examples/ip_pipeline/init.c | 2 +-
examples/ipsec-secgw/ipsec-secgw.c | 4 +-
examples/l2fwd-crypto/main.c | 23 +-
examples/qos_sched/app_thread.c | 22 +-
examples/tep_termination/vxlan.c | 4 +-
lib/librte_eal/common/arch/arm/rte_cpuflags.c | 1 +
lib/librte_eal/common/arch/ppc_64/rte_cpuflags.c | 1 +
lib/librte_eal/common/eal_common_pci.c | 2 +-
lib/librte_eal/common/include/rte_version.h | 2 +-
lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 21 +-
lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 5 +
.../linuxapp/kni/ethtool/ixgbe/ixgbe_main.c | 2 +-
lib/librte_ether/rte_ethdev.c | 15 +-
lib/librte_hash/rte_cuckoo_hash.c | 6 +-
lib/librte_hash/rte_cuckoo_hash.h | 2 +
lib/librte_hash/rte_cuckoo_hash_x86.h | 3 +-
lib/librte_lpm/rte_lpm.c | 6 +-
lib/librte_mempool/rte_mempool.c | 6 +-
lib/librte_pdump/rte_pdump.c | 4 +-
lib/librte_vhost/vhost_rxtx.c | 17 +-
pkg/dpdk.spec | 2 +-
74 files changed, 1260 insertions(+), 941 deletions(-)
Adrien Mazarguil (1):
net/mlx5: fix Rx VLAN offload capability report
Ajit Khaparde (1):
net/bnxt: fix crash when closing
Beilei Xing (1):
net/i40e: fix floating VEB
Bernard Iremonger (1):
app/testpmd: fix DCB configuration
David Marchand (1):
ethdev: fix vendor id in debug message
E. Scott Daniels (1):
ethdev: prevent duplicate event callback
Eric Kinzie (1):
net/bonding: validate speed after link up
Ferruh Yigit (4):
net/ring: fix ring device creation via devargs
net/bnx2x: fix build with icc
kni: fix build with kernel 4.8
kni: fix build with kernel 4.9
Gowrishankar Muthukrishnan (1):
examples/ip_pipeline: fix plugin loading
Igor Ryzhov (1):
pci: fix probing error if no driver found
Jasvinder Singh (1):
examples/qos_sched: fix dequeue from ring
Jeff Guo (1):
net/i40e: fix hash filter on X722
Jianbo Liu (2):
eal/arm: fix file descriptor leak when getting CPU features
eal/ppc: fix file descriptor leak when getting CPU features
Jingjing Wu (2):
net/i40e: fix DCB configuration
doc: add limitations for i40e PMD
John Daley (5):
net/enic: fix flow director
net/enic: fix crash with removed flow director filters
net/enic: fix multi-queue Rx performance
net/enic: fix crash on MTU update or Rx queue reconfigure
net/enic: fix max packet length check
John W. Linville (4):
net/ena: improve safety of string handling
net/bnxt: ensure entry length is unsigned
net/i40e: do not use VSI before NULL check
net/bnxt: fix bit shift size
Kamil Rytarowski (1):
net/thunderx: fix Tx checksum handling
Michael Qiu (2):
examples/tep_term: fix L4 length
examples/tep_term: fix packet length with multi-segments
Mohammad Abdul Awal (1):
app/testpmd: fix RSS hash key size
Nelio Laranjeiro (1):
net/mlx5: fix Rx checksum macros
Nelson Escobar (3):
net/enic: revert truncated packets counter fix
net/enic: document how to configure vNIC parameters
net/enic: fix Rx queue index when not using Rx scatter
Nipun Gupta (1):
mempool: fix leak if populate fails
Nélio Laranjeiro (7):
net/mlx5: fix Rx function selection
net/mlx5: fix hash key size retrieval
net/mlx5: support Mellanox OFED 3.4
net/mlx5: re-factorize functions
net/mlx5: fix inline logic
net/mlx5: fix link speed capability information
net/mlx5: fix support for newer link speeds
Olga Shern (1):
net/mlx5: fix link status report
Olivier Gournet (1):
net/mlx5: fix initialization in secondary process
Pablo de Lara (3):
app/test: fix hash multiwriter sequence
hash: fix unlimited cuckoo path
hash: fix bucket size usage
Piotr Azarewicz (1):
examples/l2fwd-crypto: fix verify with decrypt in chain
Qi Zhang (4):
net/ixgbe: fix out of order Rx read
net/fm10k: fix out of order Rx read
net/i40e: fix Rx hang when disable LLDP
net/i40e: fix out of order Rx read
Qiming Yang (3):
net/i40e: fix link status change interrupt
net/i40e: fix VF bonded device link down
net/i40e: fixed build error with icc
Rasesh Mody (3):
net/bnx2x: fix maximum PF queues
net/bnx2x: fix socket id for slowpath memory
net/qede/base: fix 32-bit build
Raslan Darawsheh (2):
net/mlx5: fix removing VLAN filter
net/mlx5: fix handling of small mbuf sizes
Reshma Pattan (2):
pdump: fix created directory permissions
app/procinfo: free xstats memory upon failure
Sagi Grimberg (1):
net/mlx5: fix possible NULL dereference in Rx path
Sergio Gonzalez Monroy (1):
examples/ipsec-secgw: check SP only when setup
Wei Dai (3):
lpm: fix freeing unused sub-table on rule delete
mempool: fix search of maximum contiguous pages
lpm: fix freeing memory
Wenzhuo Lu (6):
app/testpmd: fix DCB configuration
app/testpmd: fix PF/VF check of flow director
net/ixgbe: fix flow director mask
app/testpmd: fix flow director mask
app/testpmd: fix flow director endianness
net/ixgbe: fix VF registers
Xiao Wang (2):
net/fm10k: fix Rx checksum flags
net/fm10k: fix VF Tx queue initialization
Yaacov Hazan (3):
net/mlx5: fix inconsistent return value in flow director
net/mlx5: refactor allocation of flow director queues
net/mlx5: fix flow director drop mode
Yong Wang (1):
net/vmxnet3: fix mbuf release on reset/stop
Yuanhan Liu (2):
net/virtio: revert fix restart
version: 16.07.2
Zhihong Wang (1):
vhost: fix Windows VM hang
^ permalink raw reply
* IXGBE VF server crash
From: Gregory Etelson @ 2016-11-30 11:57 UTC (permalink / raw)
To: dev
Hello,
I have a server with 8 VFs over Intel 82599 10Gb adapter
A test iterates DPDK process over each VF in turn for 10 sec:
while [ 1 ]; do
for vf in $VFS; do run_dpdk $vf; done
done
After several minutes server crashes.
The crash does not trigger kdump or leaves traces on console
The server power cycles
The crash reproduced on several different servers
Does anybody familiar with this fault ?
It there a way to stop it ?
Setup:
CentOS 6.8 x86_64
ixgbe-4.3.15
DPDK-16.11
Regards,
Gregory
^ permalink raw reply
* [PATCH] net/qede: fix resource leak
From: Yong Wang @ 2016-11-30 12:32 UTC (permalink / raw)
To: harish.patil; +Cc: dev, Yong Wang
Current code does not close 'fd' on function exit, leaking resources.
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
---
drivers/net/qede/qede_main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/qede/qede_main.c b/drivers/net/qede/qede_main.c
index ab22409..b666e1c 100644
--- a/drivers/net/qede/qede_main.c
+++ b/drivers/net/qede/qede_main.c
@@ -137,6 +137,7 @@ static int qed_load_firmware_data(struct ecore_dev *edev)
if (fstat(fd, &st) < 0) {
DP_NOTICE(edev, false, "Can't stat firmware file\n");
+ close(fd);
return -1;
}
@@ -158,9 +159,11 @@ static int qed_load_firmware_data(struct ecore_dev *edev)
if (edev->fw_len < 104) {
DP_NOTICE(edev, false, "Invalid fw size: %" PRIu64 "\n",
edev->fw_len);
+ close(fd);
return -EINVAL;
}
+ close(fd);
return 0;
}
#endif
--
1.8.3.1
^ permalink raw reply related
* Re: [PATCH v12 0/6] add Tx preparation
From: Ananyev, Konstantin @ 2016-11-30 10:59 UTC (permalink / raw)
To: John Daley (johndale), Thomas Monjalon, dev@dpdk.org,
Rahul Lakkireddy, Stephen Hurd, Jan Medala, Jakub Palider,
Adrien Mazarguil, Alejandro Lucero, Harish Patil, Rasesh Mody,
Jerin Jacob, Yuanhan Liu, Yong Wang
Cc: Kulasek, TomaszX, olivier.matz@6wind.com
In-Reply-To: <8cd623e5433d44cb89b9599f6a60d5cd@XCH-RCD-007.cisco.com>
Hi John,
>
> Hi,
> -john
>
> > -----Original Message-----
> > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> > Sent: Monday, November 28, 2016 3:03 AM
> > To: dev@dpdk.org; Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>;
> > Stephen Hurd <stephen.hurd@broadcom.com>; Jan Medala
> > <jan@semihalf.com>; Jakub Palider <jpa@semihalf.com>; John Daley
> > (johndale) <johndale@cisco.com>; Adrien Mazarguil
> > <adrien.mazarguil@6wind.com>; Alejandro Lucero
> > <alejandro.lucero@netronome.com>; Harish Patil
> > <harish.patil@qlogic.com>; Rasesh Mody <rasesh.mody@qlogic.com>; Jerin
> > Jacob <jerin.jacob@caviumnetworks.com>; Yuanhan Liu
> > <yuanhan.liu@linux.intel.com>; Yong Wang <yongwang@vmware.com>
> > Cc: Tomasz Kulasek <tomaszx.kulasek@intel.com>;
> > konstantin.ananyev@intel.com; olivier.matz@6wind.com
> > Subject: Re: [dpdk-dev] [PATCH v12 0/6] add Tx preparation
> >
> > We need attention of every PMD developers on this thread.
> >
> > Reminder of what Konstantin suggested:
> > "
> > - if the PMD supports TX offloads AND
> > - if to be able use any of these offloads the upper layer SW would have to:
> > * modify the contents of the packet OR
> > * obey HW specific restrictions
> > then it is a PMD developer responsibility to provide tx_prep() that would
> > implement expected modifications of the packet contents and restriction
> > checks.
> > Otherwise, tx_prep() implementation is not required and can be safely set to
> > NULL.
> > "
> >
> > I copy/paste also my previous conclusion:
> >
> > Before txprep, there is only one API: the application must prepare the
> > packets checksum itself (get_psd_sum in testpmd).
> > With txprep, the application have 2 choices: keep doing the job itself or call
> > txprep which calls a PMD-specific function.
> > The question is: does non-Intel drivers need a checksum preparation for
> > TSO?
> > Will it behave well if txprep does nothing in these drivers?
> >
> > When looking at the code, most of drivers handle the TSO flags.
> > But it is hard to know whether they rely on the pseudo checksum or not.
> >
> > git grep -l 'PKT_TX_UDP_CKSUM\|PKT_TX_TCP_CKSUM\|PKT_TX_TCP_SEG'
> > drivers/net/
> >
> > drivers/net/bnxt/bnxt_txr.c
> > drivers/net/cxgbe/sge.c
> > drivers/net/e1000/em_rxtx.c
> > drivers/net/e1000/igb_rxtx.c
> > drivers/net/ena/ena_ethdev.c
> > drivers/net/enic/enic_rxtx.c
> > drivers/net/fm10k/fm10k_rxtx.c
> > drivers/net/i40e/i40e_rxtx.c
> > drivers/net/ixgbe/ixgbe_rxtx.c
> > drivers/net/mlx4/mlx4.c
> > drivers/net/mlx5/mlx5_rxtx.c
> > drivers/net/nfp/nfp_net.c
> > drivers/net/qede/qede_rxtx.c
> > drivers/net/thunderx/nicvf_rxtx.c
> > drivers/net/virtio/virtio_rxtx.c
> > drivers/net/vmxnet3/vmxnet3_rxtx.c
> >
> > Please, we need a comment for each driver saying "it is OK, we do not need
> > any checksum preparation for TSO"
> > or
> > "yes we have to implement tx_prepare or TSO will not work in this mode"
>
> I like the idea of tx prep since it should make for cleaner apps.
>
> For enic, I believe the answer is " it is OK, we do not need any checksum preparation".
>
> Prior to now, it was necessary to set IP checksum to 0 and put in a TCP/UDP pseudo header. But there is a hardware overwrite of
> checksums option which makes preparation in software unnecessary and it is testing out well so far. I plan to enable it in 17.02. TSO is also
> being enabled for 17.02 and it does not look like any prep is required. So I'm going with " txprep NULL pointer is OK for enic", but may have
> to change my mind if something comes up in testing.
That's great thanks.
Other non-Intel PMD maintainers, please any feedback?
Konstantin
>
> -john
^ permalink raw reply
* Re: [PATCH v12 0/6] add Tx preparation
From: Ananyev, Konstantin @ 2016-11-30 10:54 UTC (permalink / raw)
To: Adrien Mazarguil, Thomas Monjalon
Cc: dev@dpdk.org, Rahul Lakkireddy, Stephen Hurd, Jan Medala,
Jakub Palider, John Daley, Alejandro Lucero, Harish Patil,
Rasesh Mody, Jerin Jacob, Yuanhan Liu, Yong Wang,
Kulasek, TomaszX, olivier.matz@6wind.com
In-Reply-To: <20161130074003.GD10340@6wind.com>
Hi Adrien,
>
> On Mon, Nov 28, 2016 at 12:03:06PM +0100, Thomas Monjalon wrote:
> > We need attention of every PMD developers on this thread.
>
> I've been following this thread from the beginning while working on rte_flow
> and wanted to see where it was headed before replying. (I know, v11 was
> submitted about 1 month ago but still.)
>
> > Reminder of what Konstantin suggested:
> > "
> > - if the PMD supports TX offloads AND
> > - if to be able use any of these offloads the upper layer SW would have to:
> > * modify the contents of the packet OR
> > * obey HW specific restrictions
> > then it is a PMD developer responsibility to provide tx_prep() that would implement
> > expected modifications of the packet contents and restriction checks.
> > Otherwise, tx_prep() implementation is not required and can be safely set to NULL.
> > "
> >
> > I copy/paste also my previous conclusion:
> >
> > Before txprep, there is only one API: the application must prepare the
> > packets checksum itself (get_psd_sum in testpmd).
> > With txprep, the application have 2 choices: keep doing the job itself
> > or call txprep which calls a PMD-specific function.
>
> Something is definitely needed here, and only PMDs can provide it. I think
> applications should not have to clear checksum fields or initialize them to
> some magic value, same goes for any other offload or hardware limitation
> that needs to be worked around.
>
> tx_prep() is one possible answer to this issue, however as mentioned in the
> original patch it can be very expensive if exposed by the PMD.
>
> Another issue I'm more concerned about is the way limitations are managed
> (struct rte_eth_desc_lim). While not officially tied to tx_prep(), this
> structure contains new fields that are only relevant to a few devices, and I
> fear it will keep growing with each new hardware quirk to manage, breaking
> ABIs in the process.
Well, if some new HW capability/limitation would arise and we'd like to support
it in DPDK, then yes we probably would need to think how to incorporate it here.
Do you have anything particular in mind here?
>
> What are applications supposed to do, check each of them regardless before
> attempting to send a burst?
>
> I understand tx_prep() automates this process, however I'm wondering why
> isn't the TX burst function doing that itself. Using nb_mtu_seg_max as an
> example, tx_prep() has an extra check in case of TSO that the TX burst
> function does not perform. This ends up being much more expensive to
> applications due to the additional loop doing redundant testing on each
> mbuf.
>
> If, say as a performance improvement, we decided to leave the validation
> part to the TX burst function; what remains in tx_prep() is basically heavy
> "preparation" requiring mbuf changes (i.e. erasing checksums, for now).
>
> Following the same logic, why can't such a thing be made part of the TX
> burst function as well (through a direct call to rte_phdr_cksum_fix()
> whenever necessary). From an application standpoint, what are the advantages
> of having to:
>
> if (tx_prep()) // iterate and update mbufs as needed
> tx_burst(); // iterate and send
>
> Compared to:
>
> tx_burst(); // iterate, update as needed and send
I think that was discussed extensively quite a lot previously here:
As Thomas already replied - main motivation is to allow user
to execute them on different stages of packet TX pipeline,
and probably on different cores.
I think that provides better flexibility to the user to when/where
do these preparations and hopefully would lead to better performance.
Though, if you or any other PMD developer/maintainer would prefer
for particular PMD to combine both functionalities into tx_burst() and
keep tx_prep() as NOP - this is still possible too.
>
> Note that PMDs could still provide different TX callbacks depending on the
> set of enabled offloads so performance is not unnecessarily impacted.
>
> In my opinion the second approach is both faster to applications and more
> friendly from a usability perspective, am I missing something obvious?
>
> > The question is: does non-Intel drivers need a checksum preparation for TSO?
> > Will it behave well if txprep does nothing in these drivers?
> >
> > When looking at the code, most of drivers handle the TSO flags.
> > But it is hard to know whether they rely on the pseudo checksum or not.
> >
> > git grep -l 'PKT_TX_UDP_CKSUM\|PKT_TX_TCP_CKSUM\|PKT_TX_TCP_SEG' drivers/net/
> >
> > drivers/net/bnxt/bnxt_txr.c
> > drivers/net/cxgbe/sge.c
> > drivers/net/e1000/em_rxtx.c
> > drivers/net/e1000/igb_rxtx.c
> > drivers/net/ena/ena_ethdev.c
> > drivers/net/enic/enic_rxtx.c
> > drivers/net/fm10k/fm10k_rxtx.c
> > drivers/net/i40e/i40e_rxtx.c
> > drivers/net/ixgbe/ixgbe_rxtx.c
> > drivers/net/mlx4/mlx4.c
> > drivers/net/mlx5/mlx5_rxtx.c
> > drivers/net/nfp/nfp_net.c
> > drivers/net/qede/qede_rxtx.c
> > drivers/net/thunderx/nicvf_rxtx.c
> > drivers/net/virtio/virtio_rxtx.c
> > drivers/net/vmxnet3/vmxnet3_rxtx.c
> >
> > Please, we need a comment for each driver saying
> > "it is OK, we do not need any checksum preparation for TSO"
> > or
> > "yes we have to implement tx_prepare or TSO will not work in this mode"
>
> For both mlx4 and mlx5 then,
> "it is OK, we do not need any checksum preparation for TSO".
>
> Actually I do not think we'll ever need tx_prep() unless we add our own
> quirks to struct rte_eth_desc_lim (and friends) which are currently quietly
> handled by TX burst functions.
Ok, so MLX PMD is not affected by these changes and tx_prep for MLX can be safely
set to NULL, correct?
Thanks
Konstantin
>
> --
> Adrien Mazarguil
> 6WIND
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox