* [dpdk-stable] patch 'net/mlx5: validate tunnel inner items on E-Switch' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'net/mlx5: support " Kevin Traynor
` (65 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Shahaf Shuler, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 5eacf640d6a34968cba05a5bca003452d4b48d1d Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Thu, 27 Dec 2018 15:34:42 +0000
Subject: [PATCH] net/mlx5: validate tunnel inner items on E-Switch
[ upstream commit 9f4eb98f8267e344f7c9b590045863a998ea069a ]
This patch updates the validation routine for the E-Switch Flows.
The inner/outer item flags are added and set correctly, the
validation routine will accept and check the inner items
which follow the tunnel item (like VNI).
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_tcf.c | 48 ++++++++++++++++++++------------
1 file changed, 30 insertions(+), 18 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_tcf.c b/drivers/net/mlx5/mlx5_flow_tcf.c
index e59e63836..5fc50c2b5 100644
--- a/drivers/net/mlx5/mlx5_flow_tcf.c
+++ b/drivers/net/mlx5/mlx5_flow_tcf.c
@@ -1880,15 +1880,14 @@ flow_tcf_validate(struct rte_eth_dev *dev,
unsigned int i;
- if ((item_flags & MLX5_FLOW_LAYER_TUNNEL) &&
- items->type != RTE_FLOW_ITEM_TYPE_ETH)
- return rte_flow_error_set(error, ENOTSUP,
- RTE_FLOW_ERROR_TYPE_ITEM,
- items,
- "only L2 inner item"
- " is supported");
switch (items->type) {
case RTE_FLOW_ITEM_TYPE_VOID:
break;
case RTE_FLOW_ITEM_TYPE_PORT_ID:
+ if (item_flags & MLX5_FLOW_LAYER_TUNNEL)
+ return rte_flow_error_set
+ (error, ENOTSUP,
+ RTE_FLOW_ERROR_TYPE_ITEM, items,
+ "inner tunnel port id"
+ " item is not supported");
mask.port_id = flow_tcf_item_mask
(items, &rte_flow_item_port_id_mask,
@@ -1941,6 +1940,6 @@ flow_tcf_validate(struct rte_eth_dev *dev,
return ret;
item_flags |= (item_flags & MLX5_FLOW_LAYER_TUNNEL) ?
- MLX5_FLOW_LAYER_INNER_L2 :
- MLX5_FLOW_LAYER_OUTER_L2;
+ MLX5_FLOW_LAYER_INNER_L2 :
+ MLX5_FLOW_LAYER_OUTER_L2;
/* TODO:
* Redundant check due to different supported mask.
@@ -1965,4 +1964,10 @@ flow_tcf_validate(struct rte_eth_dev *dev,
break;
case RTE_FLOW_ITEM_TYPE_VLAN:
+ if (item_flags & MLX5_FLOW_LAYER_TUNNEL)
+ return rte_flow_error_set
+ (error, ENOTSUP,
+ RTE_FLOW_ERROR_TYPE_ITEM, items,
+ "inner tunnel VLAN"
+ " is not supported");
ret = mlx5_flow_validate_item_vlan(items, item_flags,
error);
@@ -1999,5 +2004,7 @@ flow_tcf_validate(struct rte_eth_dev *dev,
if (ret < 0)
return ret;
- item_flags |= MLX5_FLOW_LAYER_OUTER_L3_IPV4;
+ item_flags |= (item_flags & MLX5_FLOW_LAYER_TUNNEL) ?
+ MLX5_FLOW_LAYER_INNER_L3_IPV4 :
+ MLX5_FLOW_LAYER_OUTER_L3_IPV4;
mask.ipv4 = flow_tcf_item_mask
(items, &rte_flow_item_ipv4_mask,
@@ -2026,5 +2033,7 @@ flow_tcf_validate(struct rte_eth_dev *dev,
if (ret < 0)
return ret;
- item_flags |= MLX5_FLOW_LAYER_OUTER_L3_IPV6;
+ item_flags |= (item_flags & MLX5_FLOW_LAYER_TUNNEL) ?
+ MLX5_FLOW_LAYER_INNER_L3_IPV6 :
+ MLX5_FLOW_LAYER_OUTER_L3_IPV6;
mask.ipv6 = flow_tcf_item_mask
(items, &rte_flow_item_ipv6_mask,
@@ -2053,5 +2062,7 @@ flow_tcf_validate(struct rte_eth_dev *dev,
if (ret < 0)
return ret;
- item_flags |= MLX5_FLOW_LAYER_OUTER_L4_UDP;
+ item_flags |= (item_flags & MLX5_FLOW_LAYER_TUNNEL) ?
+ MLX5_FLOW_LAYER_INNER_L4_UDP :
+ MLX5_FLOW_LAYER_OUTER_L4_UDP;
mask.udp = flow_tcf_item_mask
(items, &rte_flow_item_udp_mask,
@@ -2077,5 +2088,7 @@ flow_tcf_validate(struct rte_eth_dev *dev,
if (ret < 0)
return ret;
- item_flags |= MLX5_FLOW_LAYER_OUTER_L4_TCP;
+ item_flags |= (item_flags & MLX5_FLOW_LAYER_TUNNEL) ?
+ MLX5_FLOW_LAYER_INNER_L4_TCP :
+ MLX5_FLOW_LAYER_OUTER_L4_TCP;
mask.tcp = flow_tcf_item_mask
(items, &rte_flow_item_tcp_mask,
@@ -2088,11 +2101,10 @@ flow_tcf_validate(struct rte_eth_dev *dev,
break;
case RTE_FLOW_ITEM_TYPE_VXLAN:
- if (!(action_flags & MLX5_FLOW_ACTION_VXLAN_DECAP))
+ if (item_flags & MLX5_FLOW_LAYER_OUTER_VLAN)
return rte_flow_error_set
(error, ENOTSUP,
- RTE_FLOW_ERROR_TYPE_ITEM,
- items,
- "vni pattern should be followed by"
- " vxlan decapsulation action");
+ RTE_FLOW_ERROR_TYPE_ITEM, items,
+ "vxlan tunnel over vlan"
+ " is not supported");
ret = mlx5_flow_validate_item_vxlan(items,
item_flags, error);
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:55.530891640 +0000
+++ 0002-net-mlx5-validate-tunnel-inner-items-on-E-Switch.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,15 +1,15 @@
-From 9f4eb98f8267e344f7c9b590045863a998ea069a Mon Sep 17 00:00:00 2001
+From 5eacf640d6a34968cba05a5bca003452d4b48d1d Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Thu, 27 Dec 2018 15:34:42 +0000
Subject: [PATCH] net/mlx5: validate tunnel inner items on E-Switch
+[ upstream commit 9f4eb98f8267e344f7c9b590045863a998ea069a ]
+
This patch updates the validation routine for the E-Switch Flows.
The inner/outer item flags are added and set correctly, the
validation routine will accept and check the inner items
which follow the tunnel item (like VNI).
-Cc: stable@dpdk.org
-
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
---
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/mlx5: support tunnel inner items on E-Switch' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'net/mlx5: validate tunnel inner " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'net/mlx5: validate ethernet type " Kevin Traynor
` (64 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Shahaf Shuler, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 12e14a863374ed6b22eec4da32e127146dabfea3 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Thu, 27 Dec 2018 15:34:43 +0000
Subject: [PATCH] net/mlx5: support tunnel inner items on E-Switch
[ upstream commit 78f5341d71cdb8a2a157081214a214d00586fb37 ]
This patch updates the translation routine for the E-Switch Flows.
Inner tunnel pattern items are translated into Netlink message,
support for tunnel inner IP addresses (v4 or v6), IP protocol,
and TCP and UDP ports is added.
We are going to support Flows matching with outer tunnel items
and not containing the explicit tunnel decap action (this one
might be drop, redirect or table jump, for exapmle).
So we can not rely on presence of tunnel decap action in the
list to decide whether the Flow is for tunnel, instead we will
use the presence of tunnel item. Item translation is rebound
to presence of tunnel items, instead of relying on decap action.
There is no way to tell kernel driver the outer address type
(IPv4 or IPv6) but specify the address flower key. The outer
address key is put on Netlink with zero mask if there is no
RTE item is specified in the list.
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_tcf.c | 174 ++++++++++++++++++++++---------
1 file changed, 125 insertions(+), 49 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_tcf.c b/drivers/net/mlx5/mlx5_flow_tcf.c
index 5fc50c2b5..688422da6 100644
--- a/drivers/net/mlx5/mlx5_flow_tcf.c
+++ b/drivers/net/mlx5/mlx5_flow_tcf.c
@@ -464,5 +464,7 @@ static const union {
struct rte_flow_item_udp udp;
struct rte_flow_item_vxlan vxlan;
-} flow_tcf_mask_empty;
+} flow_tcf_mask_empty = {
+ {0},
+};
/** Supported masks for known item types. */
@@ -2293,4 +2295,6 @@ flow_tcf_validate(struct rte_eth_dev *dev,
* @param[in] items
* Pointer to the list of items.
+ * @param[out] action_flags
+ * Pointer to the detected actions.
*
* @return
@@ -2299,5 +2303,6 @@ flow_tcf_validate(struct rte_eth_dev *dev,
static int
flow_tcf_get_items_size(const struct rte_flow_attr *attr,
- const struct rte_flow_item items[])
+ const struct rte_flow_item items[],
+ uint64_t *action_flags)
{
int size = 0;
@@ -2350,4 +2355,14 @@ flow_tcf_get_items_size(const struct rte_flow_attr *attr,
case RTE_FLOW_ITEM_TYPE_VXLAN:
size += SZ_NLATTR_TYPE_OF(uint32_t);
+ /*
+ * There might be no VXLAN decap action in the action
+ * list, nonetheless the VXLAN tunnel flow requires
+ * the decap structure to be correctly applied to
+ * VXLAN device, set the flag to create the structure.
+ * Translation routine will not put the decap action
+ * in tne Netlink message if there is no actual action
+ * in the list.
+ */
+ *action_flags |= MLX5_FLOW_ACTION_VXLAN_DECAP;
break;
default:
@@ -2598,5 +2613,5 @@ flow_tcf_prepare(const struct rte_flow_attr *attr,
uint8_t *sp, *tun = NULL;
- size += flow_tcf_get_items_size(attr, items);
+ size += flow_tcf_get_items_size(attr, items, &action_flags);
size += flow_tcf_get_actions_and_size(actions, &action_flags);
dev_flow = rte_zmalloc(__func__, size, MNL_ALIGNTO);
@@ -3002,4 +3017,5 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
bool vlan_eth_type_set = 0;
bool ip_proto_set = 0;
+ bool tunnel_outer = 0;
struct nlattr *na_flower;
struct nlattr *na_flower_act;
@@ -3015,4 +3031,5 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
case FLOW_TCF_TUNACT_VXLAN_DECAP:
decap.vxlan = dev_flow->tcf.vxlan_decap;
+ tunnel_outer = 1;
break;
case FLOW_TCF_TUNACT_VXLAN_ENCAP:
@@ -3069,5 +3086,5 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
break;
case RTE_FLOW_ITEM_TYPE_ETH:
- item_flags |= (item_flags & MLX5_FLOW_LAYER_VXLAN) ?
+ item_flags |= (item_flags & MLX5_FLOW_LAYER_TUNNEL) ?
MLX5_FLOW_LAYER_INNER_L2 :
MLX5_FLOW_LAYER_OUTER_L2;
@@ -3082,10 +3099,9 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
break;
spec.eth = items->spec;
- if (decap.vxlan &&
- !(item_flags & MLX5_FLOW_LAYER_VXLAN)) {
+ if (tunnel_outer) {
DRV_LOG(WARNING,
- "outer L2 addresses cannot be forced"
- " for vxlan decapsulation, parameter"
- " ignored");
+ "outer L2 addresses cannot be"
+ " forced is outer ones for tunnel,"
+ " parameter is ignored");
break;
}
@@ -3116,4 +3132,5 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
assert(!encap.hdr);
assert(!decap.hdr);
+ assert(!tunnel_outer);
item_flags |= MLX5_FLOW_LAYER_OUTER_VLAN;
mask.vlan = flow_tcf_item_mask
@@ -3150,5 +3167,7 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
break;
case RTE_FLOW_ITEM_TYPE_IPV4:
- item_flags |= MLX5_FLOW_LAYER_OUTER_L3_IPV4;
+ item_flags |= (item_flags & MLX5_FLOW_LAYER_TUNNEL) ?
+ MLX5_FLOW_LAYER_INNER_L3_IPV4 :
+ MLX5_FLOW_LAYER_OUTER_L3_IPV4;
mask.ipv4 = flow_tcf_item_mask
(items, &rte_flow_item_ipv4_mask,
@@ -3159,5 +3178,5 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
assert(mask.ipv4);
spec.ipv4 = items->spec;
- if (!decap.vxlan) {
+ if (!tunnel_outer) {
if (!eth_type_set ||
(!vlan_eth_type_set && vlan_present))
@@ -3170,23 +3189,44 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
eth_type_set = 1;
vlan_eth_type_set = 1;
- if (mask.ipv4 == &flow_tcf_mask_empty.ipv4)
+ }
+ if (!tunnel_outer && mask.ipv4->hdr.next_proto_id) {
+ /*
+ * No way to set IP protocol for outer tunnel
+ * layers. Usually it is fixed, for example,
+ * to UDP for VXLAN/GPE.
+ */
+ assert(spec.ipv4); /* Mask is not empty. */
+ mnl_attr_put_u8(nlh, TCA_FLOWER_KEY_IP_PROTO,
+ spec.ipv4->hdr.next_proto_id);
+ ip_proto_set = 1;
+ }
+ if (mask.ipv4 == &flow_tcf_mask_empty.ipv4 ||
+ (!mask.ipv4->hdr.src_addr &&
+ !mask.ipv4->hdr.dst_addr)) {
+ if (!tunnel_outer)
break;
- if (mask.ipv4->hdr.next_proto_id) {
- mnl_attr_put_u8
- (nlh, TCA_FLOWER_KEY_IP_PROTO,
- spec.ipv4->hdr.next_proto_id);
- ip_proto_set = 1;
- }
- } else {
- assert(mask.ipv4 != &flow_tcf_mask_empty.ipv4);
+ /*
+ * For tunnel outer we must set outer IP key
+ * anyway, even if the specification/mask is
+ * empty. There is no another way to tell
+ * kernel about he outer layer protocol.
+ */
+ mnl_attr_put_u32
+ (nlh, TCA_FLOWER_KEY_ENC_IPV4_SRC,
+ mask.ipv4->hdr.src_addr);
+ mnl_attr_put_u32
+ (nlh, TCA_FLOWER_KEY_ENC_IPV4_SRC_MASK,
+ mask.ipv4->hdr.src_addr);
+ assert(dev_flow->tcf.nlsize >= nlh->nlmsg_len);
+ break;
}
if (mask.ipv4->hdr.src_addr) {
mnl_attr_put_u32
- (nlh, decap.vxlan ?
+ (nlh, tunnel_outer ?
TCA_FLOWER_KEY_ENC_IPV4_SRC :
TCA_FLOWER_KEY_IPV4_SRC,
spec.ipv4->hdr.src_addr);
mnl_attr_put_u32
- (nlh, decap.vxlan ?
+ (nlh, tunnel_outer ?
TCA_FLOWER_KEY_ENC_IPV4_SRC_MASK :
TCA_FLOWER_KEY_IPV4_SRC_MASK,
@@ -3195,10 +3235,10 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
if (mask.ipv4->hdr.dst_addr) {
mnl_attr_put_u32
- (nlh, decap.vxlan ?
+ (nlh, tunnel_outer ?
TCA_FLOWER_KEY_ENC_IPV4_DST :
TCA_FLOWER_KEY_IPV4_DST,
spec.ipv4->hdr.dst_addr);
mnl_attr_put_u32
- (nlh, decap.vxlan ?
+ (nlh, tunnel_outer ?
TCA_FLOWER_KEY_ENC_IPV4_DST_MASK :
TCA_FLOWER_KEY_IPV4_DST_MASK,
@@ -3207,6 +3247,10 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
assert(dev_flow->tcf.nlsize >= nlh->nlmsg_len);
break;
- case RTE_FLOW_ITEM_TYPE_IPV6:
- item_flags |= MLX5_FLOW_LAYER_OUTER_L3_IPV6;
+ case RTE_FLOW_ITEM_TYPE_IPV6: {
+ bool ipv6_src, ipv6_dst;
+
+ item_flags |= (item_flags & MLX5_FLOW_LAYER_TUNNEL) ?
+ MLX5_FLOW_LAYER_INNER_L3_IPV6 :
+ MLX5_FLOW_LAYER_OUTER_L3_IPV6;
mask.ipv6 = flow_tcf_item_mask
(items, &rte_flow_item_ipv6_mask,
@@ -3217,5 +3261,5 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
assert(mask.ipv6);
spec.ipv6 = items->spec;
- if (!decap.vxlan) {
+ if (!tunnel_outer) {
if (!eth_type_set ||
(!vlan_eth_type_set && vlan_present))
@@ -3228,22 +3272,48 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
eth_type_set = 1;
vlan_eth_type_set = 1;
- if (mask.ipv6 == &flow_tcf_mask_empty.ipv6)
+ }
+ if (!tunnel_outer && mask.ipv6->hdr.proto) {
+ /*
+ * No way to set IP protocol for outer tunnel
+ * layers. Usually it is fixed, for example,
+ * to UDP for VXLAN/GPE.
+ */
+ assert(spec.ipv6); /* Mask is not empty. */
+ mnl_attr_put_u8(nlh, TCA_FLOWER_KEY_IP_PROTO,
+ spec.ipv6->hdr.proto);
+ ip_proto_set = 1;
+ }
+ ipv6_dst = !IN6_IS_ADDR_UNSPECIFIED
+ (mask.ipv6->hdr.dst_addr);
+ ipv6_src = !IN6_IS_ADDR_UNSPECIFIED
+ (mask.ipv6->hdr.src_addr);
+ if (mask.ipv6 == &flow_tcf_mask_empty.ipv6 ||
+ (!ipv6_dst && !ipv6_src)) {
+ if (!tunnel_outer)
break;
- if (mask.ipv6->hdr.proto) {
- mnl_attr_put_u8
- (nlh, TCA_FLOWER_KEY_IP_PROTO,
- spec.ipv6->hdr.proto);
- ip_proto_set = 1;
- }
- } else {
- assert(mask.ipv6 != &flow_tcf_mask_empty.ipv6);
+ /*
+ * For tunnel outer we must set outer IP key
+ * anyway, even if the specification/mask is
+ * empty. There is no another way to tell
+ * kernel about he outer layer protocol.
+ */
+ mnl_attr_put(nlh,
+ TCA_FLOWER_KEY_ENC_IPV6_SRC,
+ IPV6_ADDR_LEN,
+ mask.ipv6->hdr.src_addr);
+ mnl_attr_put(nlh,
+ TCA_FLOWER_KEY_ENC_IPV6_SRC_MASK,
+ IPV6_ADDR_LEN,
+ mask.ipv6->hdr.src_addr);
+ assert(dev_flow->tcf.nlsize >= nlh->nlmsg_len);
+ break;
}
- if (!IN6_IS_ADDR_UNSPECIFIED(mask.ipv6->hdr.src_addr)) {
- mnl_attr_put(nlh, decap.vxlan ?
+ if (ipv6_src) {
+ mnl_attr_put(nlh, tunnel_outer ?
TCA_FLOWER_KEY_ENC_IPV6_SRC :
TCA_FLOWER_KEY_IPV6_SRC,
IPV6_ADDR_LEN,
spec.ipv6->hdr.src_addr);
- mnl_attr_put(nlh, decap.vxlan ?
+ mnl_attr_put(nlh, tunnel_outer ?
TCA_FLOWER_KEY_ENC_IPV6_SRC_MASK :
TCA_FLOWER_KEY_IPV6_SRC_MASK,
@@ -3251,11 +3321,11 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
mask.ipv6->hdr.src_addr);
}
- if (!IN6_IS_ADDR_UNSPECIFIED(mask.ipv6->hdr.dst_addr)) {
- mnl_attr_put(nlh, decap.vxlan ?
+ if (ipv6_dst) {
+ mnl_attr_put(nlh, tunnel_outer ?
TCA_FLOWER_KEY_ENC_IPV6_DST :
TCA_FLOWER_KEY_IPV6_DST,
IPV6_ADDR_LEN,
spec.ipv6->hdr.dst_addr);
- mnl_attr_put(nlh, decap.vxlan ?
+ mnl_attr_put(nlh, tunnel_outer ?
TCA_FLOWER_KEY_ENC_IPV6_DST_MASK :
TCA_FLOWER_KEY_IPV6_DST_MASK,
@@ -3265,6 +3335,9 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
assert(dev_flow->tcf.nlsize >= nlh->nlmsg_len);
break;
+ }
case RTE_FLOW_ITEM_TYPE_UDP:
- item_flags |= MLX5_FLOW_LAYER_OUTER_L4_UDP;
+ item_flags |= (item_flags & MLX5_FLOW_LAYER_TUNNEL) ?
+ MLX5_FLOW_LAYER_INNER_L4_UDP :
+ MLX5_FLOW_LAYER_OUTER_L4_UDP;
mask.udp = flow_tcf_item_mask
(items, &rte_flow_item_udp_mask,
@@ -3275,5 +3348,5 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
assert(mask.udp);
spec.udp = items->spec;
- if (!decap.vxlan) {
+ if (!tunnel_outer) {
if (!ip_proto_set)
mnl_attr_put_u8
@@ -3290,10 +3363,10 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
if (mask.udp->hdr.src_port) {
mnl_attr_put_u16
- (nlh, decap.vxlan ?
+ (nlh, tunnel_outer ?
TCA_FLOWER_KEY_ENC_UDP_SRC_PORT :
TCA_FLOWER_KEY_UDP_SRC,
spec.udp->hdr.src_port);
mnl_attr_put_u16
- (nlh, decap.vxlan ?
+ (nlh, tunnel_outer ?
TCA_FLOWER_KEY_ENC_UDP_SRC_PORT_MASK :
TCA_FLOWER_KEY_UDP_SRC_MASK,
@@ -3302,10 +3375,10 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
if (mask.udp->hdr.dst_port) {
mnl_attr_put_u16
- (nlh, decap.vxlan ?
+ (nlh, tunnel_outer ?
TCA_FLOWER_KEY_ENC_UDP_DST_PORT :
TCA_FLOWER_KEY_UDP_DST,
spec.udp->hdr.dst_port);
mnl_attr_put_u16
- (nlh, decap.vxlan ?
+ (nlh, tunnel_outer ?
TCA_FLOWER_KEY_ENC_UDP_DST_PORT_MASK :
TCA_FLOWER_KEY_UDP_DST_MASK,
@@ -3315,5 +3388,7 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
break;
case RTE_FLOW_ITEM_TYPE_TCP:
- item_flags |= MLX5_FLOW_LAYER_OUTER_L4_TCP;
+ item_flags |= (item_flags & MLX5_FLOW_LAYER_TUNNEL) ?
+ MLX5_FLOW_LAYER_INNER_L4_TCP :
+ MLX5_FLOW_LAYER_OUTER_L4_TCP;
mask.tcp = flow_tcf_item_mask
(items, &rte_flow_item_tcp_mask,
@@ -3359,4 +3434,5 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
case RTE_FLOW_ITEM_TYPE_VXLAN:
assert(decap.vxlan);
+ tunnel_outer = 0;
item_flags |= MLX5_FLOW_LAYER_VXLAN;
spec.vxlan = items->spec;
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:55.559309596 +0000
+++ 0003-net-mlx5-support-tunnel-inner-items-on-E-Switch.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From 78f5341d71cdb8a2a157081214a214d00586fb37 Mon Sep 17 00:00:00 2001
+From 12e14a863374ed6b22eec4da32e127146dabfea3 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Thu, 27 Dec 2018 15:34:43 +0000
Subject: [PATCH] net/mlx5: support tunnel inner items on E-Switch
+[ upstream commit 78f5341d71cdb8a2a157081214a214d00586fb37 ]
+
This patch updates the translation routine for the E-Switch Flows.
Inner tunnel pattern items are translated into Netlink message,
support for tunnel inner IP addresses (v4 or v6), IP protocol,
@@ -21,8 +23,6 @@
address key is put on Netlink with zero mask if there is no
RTE item is specified in the list.
-Cc: stable@dpdk.org
-
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
---
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/mlx5: validate ethernet type on E-Switch' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'net/mlx5: validate tunnel inner " Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'net/mlx5: support " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'net/mlx5: support ethernet type for tunnels " Kevin Traynor
` (63 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Shahaf Shuler, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 918bc026e0c668baae333bc6bcbccbbf1ab34c00 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Thu, 27 Dec 2018 15:34:44 +0000
Subject: [PATCH] net/mlx5: validate ethernet type on E-Switch
[ upstream commit ea952e0273c32de003e344ba7a63a5e92b3e0808 ]
This patch updates the validation routine for the E-Switch Flows.
The ethernet type field can be specified within inner and outer
tunnel ethernet items, by vlan item or implicitly deduced from
IP address items. The validation routine checks all these items
and their combinations for mutual compatibility issues and possible
conflicts.
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_tcf.c | 114 ++++++++++++++++++++++++++++++-
1 file changed, 113 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow_tcf.c b/drivers/net/mlx5/mlx5_flow_tcf.c
index 688422da6..e70c377c6 100644
--- a/drivers/net/mlx5/mlx5_flow_tcf.c
+++ b/drivers/net/mlx5/mlx5_flow_tcf.c
@@ -1696,7 +1696,10 @@ flow_tcf_validate(struct rte_eth_dev *dev,
} conf;
const struct rte_flow_item *outer_udp = NULL;
+ rte_be16_t inner_etype = RTE_BE16(ETH_P_ALL);
+ rte_be16_t outer_etype = RTE_BE16(ETH_P_ALL);
+ rte_be16_t vlan_etype = RTE_BE16(ETH_P_ALL);
uint64_t item_flags = 0;
uint64_t action_flags = 0;
- uint8_t next_protocol = -1;
+ uint8_t next_protocol = 0xff;
unsigned int tcm_ifindex = 0;
uint8_t pedit_validated = 0;
@@ -1964,4 +1967,30 @@ flow_tcf_validate(struct rte_eth_dev *dev,
"no support for partial mask on"
" \"type\" field");
+ assert(items->spec);
+ spec.eth = items->spec;
+ if (mask.eth->type &&
+ (item_flags & MLX5_FLOW_LAYER_TUNNEL) &&
+ inner_etype != RTE_BE16(ETH_P_ALL) &&
+ inner_etype != spec.eth->type)
+ return rte_flow_error_set
+ (error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ITEM,
+ items,
+ "inner eth_type conflict");
+ if (mask.eth->type &&
+ !(item_flags & MLX5_FLOW_LAYER_TUNNEL) &&
+ outer_etype != RTE_BE16(ETH_P_ALL) &&
+ outer_etype != spec.eth->type)
+ return rte_flow_error_set
+ (error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ITEM,
+ items,
+ "outer eth_type conflict");
+ if (mask.eth->type) {
+ if (item_flags & MLX5_FLOW_LAYER_TUNNEL)
+ inner_etype = spec.eth->type;
+ else
+ outer_etype = spec.eth->type;
+ }
break;
case RTE_FLOW_ITEM_TYPE_VLAN:
@@ -2000,4 +2029,25 @@ flow_tcf_validate(struct rte_eth_dev *dev,
" \"tci\" (PCP and VID parts) and"
" \"inner_type\" fields");
+ if (outer_etype != RTE_BE16(ETH_P_ALL) &&
+ outer_etype != RTE_BE16(ETH_P_8021Q))
+ return rte_flow_error_set
+ (error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ITEM,
+ items,
+ "outer eth_type conflict,"
+ " must be 802.1Q");
+ outer_etype = RTE_BE16(ETH_P_8021Q);
+ assert(items->spec);
+ spec.vlan = items->spec;
+ if (mask.vlan->inner_type &&
+ vlan_etype != RTE_BE16(ETH_P_ALL) &&
+ vlan_etype != spec.vlan->inner_type)
+ return rte_flow_error_set
+ (error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ITEM,
+ items,
+ "vlan eth_type conflict");
+ if (mask.vlan->inner_type)
+ vlan_etype = spec.vlan->inner_type;
break;
case RTE_FLOW_ITEM_TYPE_IPV4:
@@ -2029,4 +2079,35 @@ flow_tcf_validate(struct rte_eth_dev *dev,
((const struct rte_flow_item_ipv4 *)
(items->spec))->hdr.next_proto_id;
+ if (item_flags & MLX5_FLOW_LAYER_TUNNEL) {
+ if (inner_etype != RTE_BE16(ETH_P_ALL) &&
+ inner_etype != RTE_BE16(ETH_P_IP))
+ return rte_flow_error_set
+ (error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ITEM,
+ items,
+ "inner eth_type conflict,"
+ " IPv4 is required");
+ inner_etype = RTE_BE16(ETH_P_IP);
+ } else if (item_flags & MLX5_FLOW_LAYER_OUTER_VLAN) {
+ if (vlan_etype != RTE_BE16(ETH_P_ALL) &&
+ vlan_etype != RTE_BE16(ETH_P_IP))
+ return rte_flow_error_set
+ (error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ITEM,
+ items,
+ "vlan eth_type conflict,"
+ " IPv4 is required");
+ vlan_etype = RTE_BE16(ETH_P_IP);
+ } else {
+ if (outer_etype != RTE_BE16(ETH_P_ALL) &&
+ outer_etype != RTE_BE16(ETH_P_IP))
+ return rte_flow_error_set
+ (error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ITEM,
+ items,
+ "eth_type conflict,"
+ " IPv4 is required");
+ outer_etype = RTE_BE16(ETH_P_IP);
+ }
break;
case RTE_FLOW_ITEM_TYPE_IPV6:
@@ -2058,4 +2139,35 @@ flow_tcf_validate(struct rte_eth_dev *dev,
((const struct rte_flow_item_ipv6 *)
(items->spec))->hdr.proto;
+ if (item_flags & MLX5_FLOW_LAYER_TUNNEL) {
+ if (inner_etype != RTE_BE16(ETH_P_ALL) &&
+ inner_etype != RTE_BE16(ETH_P_IPV6))
+ return rte_flow_error_set
+ (error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ITEM,
+ items,
+ "inner eth_type conflict,"
+ " IPv6 is required");
+ inner_etype = RTE_BE16(ETH_P_IPV6);
+ } else if (item_flags & MLX5_FLOW_LAYER_OUTER_VLAN) {
+ if (vlan_etype != RTE_BE16(ETH_P_ALL) &&
+ vlan_etype != RTE_BE16(ETH_P_IPV6))
+ return rte_flow_error_set
+ (error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ITEM,
+ items,
+ "vlan eth_type conflict,"
+ " IPv6 is required");
+ vlan_etype = RTE_BE16(ETH_P_IPV6);
+ } else {
+ if (outer_etype != RTE_BE16(ETH_P_ALL) &&
+ outer_etype != RTE_BE16(ETH_P_IPV6))
+ return rte_flow_error_set
+ (error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ITEM,
+ items,
+ "eth_type conflict,"
+ " IPv6 is required");
+ outer_etype = RTE_BE16(ETH_P_IPV6);
+ }
break;
case RTE_FLOW_ITEM_TYPE_UDP:
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:55.589371029 +0000
+++ 0004-net-mlx5-validate-ethernet-type-on-E-Switch.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From ea952e0273c32de003e344ba7a63a5e92b3e0808 Mon Sep 17 00:00:00 2001
+From 918bc026e0c668baae333bc6bcbccbbf1ab34c00 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Thu, 27 Dec 2018 15:34:44 +0000
Subject: [PATCH] net/mlx5: validate ethernet type on E-Switch
+[ upstream commit ea952e0273c32de003e344ba7a63a5e92b3e0808 ]
+
This patch updates the validation routine for the E-Switch Flows.
The ethernet type field can be specified within inner and outer
tunnel ethernet items, by vlan item or implicitly deduced from
@@ -10,8 +12,6 @@
and their combinations for mutual compatibility issues and possible
conflicts.
-Cc: stable@dpdk.org
-
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
---
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/mlx5: support ethernet type for tunnels on E-Switch' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (2 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'net/mlx5: validate ethernet type " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'net/mlx5: fix typos and code style' " Kevin Traynor
` (62 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Shahaf Shuler, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 38689ea8b76a0554109c8f645766c5110f1329a4 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Thu, 27 Dec 2018 15:34:45 +0000
Subject: [PATCH] net/mlx5: support ethernet type for tunnels on E-Switch
[ upstream commit 3d14ad9be30ee32b51b63604189574a207495c8e ]
This patch add support for inner and outer ethernet types for the
E-Switch Flows with tunnels. Inner and outer ethernet type match
can be specified with ethernet items, vlan items, or implicitly
deduced from IP address items. The tcm_info field in Netlink message
tcm structure is filled always with outer protocol.
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_tcf.c | 127 ++++++++++++++++++-------------
1 file changed, 74 insertions(+), 53 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_tcf.c b/drivers/net/mlx5/mlx5_flow_tcf.c
index e70c377c6..9e5d94741 100644
--- a/drivers/net/mlx5/mlx5_flow_tcf.c
+++ b/drivers/net/mlx5/mlx5_flow_tcf.c
@@ -2421,4 +2421,5 @@ flow_tcf_get_items_size(const struct rte_flow_attr *attr,
size += SZ_NLATTR_STRZ_OF("flower") +
+ SZ_NLATTR_TYPE_OF(uint16_t) + /* Outer ether type. */
SZ_NLATTR_NEST + /* TCA_OPTIONS. */
SZ_NLATTR_TYPE_OF(uint32_t); /* TCA_CLS_FLAGS_SKIP_SW. */
@@ -2432,11 +2433,9 @@ flow_tcf_get_items_size(const struct rte_flow_attr *attr,
break;
case RTE_FLOW_ITEM_TYPE_ETH:
- size += SZ_NLATTR_TYPE_OF(uint16_t) + /* Ether type. */
- SZ_NLATTR_DATA_OF(ETHER_ADDR_LEN) * 4;
+ size += SZ_NLATTR_DATA_OF(ETHER_ADDR_LEN) * 4;
/* dst/src MAC addr and mask. */
break;
case RTE_FLOW_ITEM_TYPE_VLAN:
- size += SZ_NLATTR_TYPE_OF(uint16_t) + /* Ether type. */
- SZ_NLATTR_TYPE_OF(uint16_t) +
+ size += SZ_NLATTR_TYPE_OF(uint16_t) +
/* VLAN Ether type. */
SZ_NLATTR_TYPE_OF(uint8_t) + /* VLAN prio. */
@@ -2444,12 +2443,10 @@ flow_tcf_get_items_size(const struct rte_flow_attr *attr,
break;
case RTE_FLOW_ITEM_TYPE_IPV4:
- size += SZ_NLATTR_TYPE_OF(uint16_t) + /* Ether type. */
- SZ_NLATTR_TYPE_OF(uint8_t) + /* IP proto. */
+ size += SZ_NLATTR_TYPE_OF(uint8_t) + /* IP proto. */
SZ_NLATTR_TYPE_OF(uint32_t) * 4;
/* dst/src IP addr and mask. */
break;
case RTE_FLOW_ITEM_TYPE_IPV6:
- size += SZ_NLATTR_TYPE_OF(uint16_t) + /* Ether type. */
- SZ_NLATTR_TYPE_OF(uint8_t) + /* IP proto. */
+ size += SZ_NLATTR_TYPE_OF(uint8_t) + /* IP proto. */
SZ_NLATTR_DATA_OF(IPV6_ADDR_LEN) * 4;
/* dst/src IP addr and mask. */
@@ -3125,7 +3122,7 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
struct tcmsg *tcm = dev_flow->tcf.tcm;
uint32_t na_act_index_cur;
- bool eth_type_set = 0;
- bool vlan_present = 0;
- bool vlan_eth_type_set = 0;
+ rte_be16_t inner_etype = RTE_BE16(ETH_P_ALL);
+ rte_be16_t outer_etype = RTE_BE16(ETH_P_ALL);
+ rte_be16_t vlan_etype = RTE_BE16(ETH_P_ALL);
bool ip_proto_set = 0;
bool tunnel_outer = 0;
@@ -3165,6 +3162,5 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
* automatically.
*/
- tcm->tcm_info = TC_H_MAKE((attr->priority + 1) << 16,
- RTE_BE16(ETH_P_ALL));
+ tcm->tcm_info = TC_H_MAKE((attr->priority + 1) << 16, outer_etype);
if (attr->group > 0)
mnl_attr_put_u32(nlh, TCA_CHAIN, attr->group);
@@ -3211,4 +3207,10 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
break;
spec.eth = items->spec;
+ if (mask.eth->type) {
+ if (item_flags & MLX5_FLOW_LAYER_TUNNEL)
+ inner_etype = spec.eth->type;
+ else
+ outer_etype = spec.eth->type;
+ }
if (tunnel_outer) {
DRV_LOG(WARNING,
@@ -3218,9 +3220,4 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
break;
}
- if (mask.eth->type) {
- mnl_attr_put_u16(nlh, TCA_FLOWER_KEY_ETH_TYPE,
- spec.eth->type);
- eth_type_set = 1;
- }
if (!is_zero_ether_addr(&mask.eth->dst)) {
mnl_attr_put(nlh, TCA_FLOWER_KEY_ETH_DST,
@@ -3253,18 +3250,12 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
error);
assert(mask.vlan);
- if (!eth_type_set)
- mnl_attr_put_u16(nlh, TCA_FLOWER_KEY_ETH_TYPE,
- RTE_BE16(ETH_P_8021Q));
- eth_type_set = 1;
- vlan_present = 1;
if (mask.vlan == &flow_tcf_mask_empty.vlan)
break;
spec.vlan = items->spec;
- if (mask.vlan->inner_type) {
- mnl_attr_put_u16(nlh,
- TCA_FLOWER_KEY_VLAN_ETH_TYPE,
- spec.vlan->inner_type);
- vlan_eth_type_set = 1;
- }
+ assert(outer_etype == RTE_BE16(ETH_P_ALL) ||
+ outer_etype == RTE_BE16(ETH_P_8021Q));
+ outer_etype = RTE_BE16(ETH_P_8021Q);
+ if (mask.vlan->inner_type)
+ vlan_etype = spec.vlan->inner_type;
if (mask.vlan->tci & RTE_BE16(0xe000))
mnl_attr_put_u8(nlh, TCA_FLOWER_KEY_VLAN_PRIO,
@@ -3289,17 +3280,18 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
error);
assert(mask.ipv4);
- spec.ipv4 = items->spec;
- if (!tunnel_outer) {
- if (!eth_type_set ||
- (!vlan_eth_type_set && vlan_present))
- mnl_attr_put_u16
- (nlh,
- vlan_present ?
- TCA_FLOWER_KEY_VLAN_ETH_TYPE :
- TCA_FLOWER_KEY_ETH_TYPE,
- RTE_BE16(ETH_P_IP));
- eth_type_set = 1;
- vlan_eth_type_set = 1;
+ if (item_flags & MLX5_FLOW_LAYER_TUNNEL) {
+ assert(inner_etype == RTE_BE16(ETH_P_ALL) ||
+ inner_etype == RTE_BE16(ETH_P_IP));
+ inner_etype = RTE_BE16(ETH_P_IP);
+ } else if (outer_etype == RTE_BE16(ETH_P_8021Q)) {
+ assert(vlan_etype == RTE_BE16(ETH_P_ALL) ||
+ vlan_etype == RTE_BE16(ETH_P_IP));
+ vlan_etype = RTE_BE16(ETH_P_IP);
+ } else {
+ assert(outer_etype == RTE_BE16(ETH_P_ALL) ||
+ outer_etype == RTE_BE16(ETH_P_IP));
+ outer_etype = RTE_BE16(ETH_P_IP);
}
+ spec.ipv4 = items->spec;
if (!tunnel_outer && mask.ipv4->hdr.next_proto_id) {
/*
@@ -3372,17 +3364,18 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
error);
assert(mask.ipv6);
- spec.ipv6 = items->spec;
- if (!tunnel_outer) {
- if (!eth_type_set ||
- (!vlan_eth_type_set && vlan_present))
- mnl_attr_put_u16
- (nlh,
- vlan_present ?
- TCA_FLOWER_KEY_VLAN_ETH_TYPE :
- TCA_FLOWER_KEY_ETH_TYPE,
- RTE_BE16(ETH_P_IPV6));
- eth_type_set = 1;
- vlan_eth_type_set = 1;
+ if (item_flags & MLX5_FLOW_LAYER_TUNNEL) {
+ assert(inner_etype == RTE_BE16(ETH_P_ALL) ||
+ inner_etype == RTE_BE16(ETH_P_IPV6));
+ inner_etype = RTE_BE16(ETH_P_IPV6);
+ } else if (outer_etype == RTE_BE16(ETH_P_8021Q)) {
+ assert(vlan_etype == RTE_BE16(ETH_P_ALL) ||
+ vlan_etype == RTE_BE16(ETH_P_IPV6));
+ vlan_etype = RTE_BE16(ETH_P_IPV6);
+ } else {
+ assert(outer_etype == RTE_BE16(ETH_P_ALL) ||
+ outer_etype == RTE_BE16(ETH_P_IPV6));
+ outer_etype = RTE_BE16(ETH_P_IPV6);
}
+ spec.ipv6 = items->spec;
if (!tunnel_outer && mask.ipv6->hdr.proto) {
/*
@@ -3560,4 +3553,32 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
}
}
+ /*
+ * Set the ether_type flower key and tc rule protocol:
+ * - if there is nor VLAN neither VXLAN the key is taken from
+ * eth item directly or deduced from L3 items.
+ * - if there is vlan item then key is fixed to 802.1q.
+ * - if there is vxlan item then key is set to inner tunnel type.
+ * - simultaneous vlan and vxlan items are prohibited.
+ */
+ if (outer_etype != RTE_BE16(ETH_P_ALL)) {
+ tcm->tcm_info = TC_H_MAKE((attr->priority + 1) << 16,
+ outer_etype);
+ if (item_flags & MLX5_FLOW_LAYER_TUNNEL) {
+ if (inner_etype != RTE_BE16(ETH_P_ALL))
+ mnl_attr_put_u16(nlh,
+ TCA_FLOWER_KEY_ETH_TYPE,
+ inner_etype);
+ } else {
+ mnl_attr_put_u16(nlh,
+ TCA_FLOWER_KEY_ETH_TYPE,
+ outer_etype);
+ if (outer_etype == RTE_BE16(ETH_P_8021Q) &&
+ vlan_etype != RTE_BE16(ETH_P_ALL))
+ mnl_attr_put_u16(nlh,
+ TCA_FLOWER_KEY_VLAN_ETH_TYPE,
+ vlan_etype);
+ }
+ assert(dev_flow->tcf.nlsize >= nlh->nlmsg_len);
+ }
na_flower_act = mnl_attr_nest_start(nlh, TCA_FLOWER_ACT);
na_act_index_cur = 1;
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:55.618090437 +0000
+++ 0005-net-mlx5-support-ethernet-type-for-tunnels-on-E-Swit.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,16 +1,16 @@
-From 3d14ad9be30ee32b51b63604189574a207495c8e Mon Sep 17 00:00:00 2001
+From 38689ea8b76a0554109c8f645766c5110f1329a4 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Thu, 27 Dec 2018 15:34:45 +0000
Subject: [PATCH] net/mlx5: support ethernet type for tunnels on E-Switch
+[ upstream commit 3d14ad9be30ee32b51b63604189574a207495c8e ]
+
This patch add support for inner and outer ethernet types for the
E-Switch Flows with tunnels. Inner and outer ethernet type match
can be specified with ethernet items, vlan items, or implicitly
deduced from IP address items. The tcm_info field in Netlink message
tcm structure is filled always with outer protocol.
-Cc: stable@dpdk.org
-
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
---
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix typos and code style' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (3 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'net/mlx5: support ethernet type for tunnels " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'net/enic: remove useless include' " Kevin Traynor
` (61 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Shahaf Shuler, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From e294ab42a60e8a385a46c595dcd885778f6ab5c7 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Sat, 29 Dec 2018 19:45:12 +0000
Subject: [PATCH] net/mlx5: fix typos and code style
[ upstream commit 239810607333f7e68979781b0c7be2a14c242f6a ]
This patch fixes typos and codestyle issues in mlx5_flow_tcf.c file
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_tcf.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_tcf.c b/drivers/net/mlx5/mlx5_flow_tcf.c
index 9e5d94741..14896e64d 100644
--- a/drivers/net/mlx5/mlx5_flow_tcf.c
+++ b/drivers/net/mlx5/mlx5_flow_tcf.c
@@ -437,5 +437,5 @@ struct flow_tcf_vxlan_encap {
} ipv6;
};
-struct {
+ struct {
rte_be16_t src;
rte_be16_t dst;
@@ -1282,5 +1282,5 @@ flow_tcf_validate_vxlan_encap_ipv4(const struct rte_flow_item *item,
*
* @return
- * 0 on success, a negative errno value otherwise and rte_ernno is set.
+ * 0 on success, a negative errno value otherwise and rte_errno is set.
**/
static int
@@ -1368,5 +1368,5 @@ flow_tcf_validate_vxlan_encap_ipv6(const struct rte_flow_item *item,
*
* @return
- * 0 on success, a negative errno value otherwise and rte_ernno is set.
+ * 0 on success, a negative errno value otherwise and rte_errno is set.
**/
static int
@@ -1436,5 +1436,5 @@ flow_tcf_validate_vxlan_encap_udp(const struct rte_flow_item *item,
*
* @return
- * 0 on success, a negative errno value otherwise and rte_ernno is set.
+ * 0 on success, a negative errno value otherwise and rte_errno is set.
**/
static int
@@ -1484,5 +1484,5 @@ flow_tcf_validate_vxlan_encap_vni(const struct rte_flow_item *item,
*
* @return
- * 0 on success, a negative errno value otherwise and rte_ernno is set.
+ * 0 on success, a negative errno value otherwise and rte_errno is set.
**/
static int
@@ -1664,5 +1664,5 @@ flow_tcf_validate_vxlan_decap_udp(const struct rte_flow_item *udp,
*
* @return
- * 0 on success, a negative errno value otherwise and rte_ernno is set.
+ * 0 on success, a negative errno value otherwise and rte_errno is set.
*/
static int
@@ -2703,5 +2703,5 @@ flow_tcf_nl_brand(struct nlmsghdr *nlh, uint32_t handle)
* @return
* Pointer to mlx5_flow object on success,
- * otherwise NULL and rte_ernno is set.
+ * otherwise NULL and rte_errno is set.
*/
static struct mlx5_flow *
@@ -3078,5 +3078,5 @@ flow_tcf_vxlan_encap_parse(const struct rte_flow_action *action,
*
* @return
- * 0 on success, a negative errno value otherwise and rte_ernno is set.
+ * 0 on success, a negative errno value otherwise and rte_errno is set.
*/
static int
@@ -4375,6 +4375,6 @@ flow_tcf_collect_vxlan_cb(const struct nlmsghdr *nlh, void *arg)
/**
* Cleanup the outer interface. Removes all found vxlan devices
- * attached to specified index, flushes the meigh and local IP
- * datavase.
+ * attached to specified index, flushes the neigh and local IP
+ * database.
*
* @param[in] tcf
@@ -5384,5 +5384,5 @@ flow_tcf_remove(struct rte_eth_dev *dev, struct rte_flow *flow)
*
* @return
- * 0 on success, a negative errno value otherwise and rte_ernno is set.
+ * 0 on success, a negative errno value otherwise and rte_errno is set.
*/
static int
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:55.645660798 +0000
+++ 0006-net-mlx5-fix-typos-and-code-style.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From 239810607333f7e68979781b0c7be2a14c242f6a Mon Sep 17 00:00:00 2001
+From e294ab42a60e8a385a46c595dcd885778f6ab5c7 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Sat, 29 Dec 2018 19:45:12 +0000
Subject: [PATCH] net/mlx5: fix typos and code style
+[ upstream commit 239810607333f7e68979781b0c7be2a14c242f6a ]
+
This patch fixes typos and codestyle issues in mlx5_flow_tcf.c file
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/enic: remove useless include' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (4 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'net/mlx5: fix typos and code style' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'drivers: fix sprintf with snprintf' " Kevin Traynor
` (60 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Hyong Youb Kim; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From a643961a42aab273a28639bcab1a4e33e2250c2d Mon Sep 17 00:00:00 2001
From: Hyong Youb Kim <hyonkim@cisco.com>
Date: Mon, 14 Jan 2019 07:01:21 -0800
Subject: [PATCH] net/enic: remove useless include
[ upstream commit a1c40a3a3bcb45f70006c037a2baded192e5bdb9 ]
libgen.h is not used, so do not include it.
Fixes: fefed3d1e62c ("enic: new driver")
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
---
drivers/net/enic/enic_clsf.c | 2 --
drivers/net/enic/enic_main.c | 1 -
2 files changed, 3 deletions(-)
diff --git a/drivers/net/enic/enic_clsf.c b/drivers/net/enic/enic_clsf.c
index 9d95201ec..9e9e548c2 100644
--- a/drivers/net/enic/enic_clsf.c
+++ b/drivers/net/enic/enic_clsf.c
@@ -4,6 +4,4 @@
*/
-#include <libgen.h>
-
#include <rte_ethdev_driver.h>
#include <rte_malloc.h>
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index c3869de36..406f92a80 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -9,5 +9,4 @@
#include <sys/mman.h>
#include <fcntl.h>
-#include <libgen.h>
#include <rte_pci.h>
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:55.675100938 +0000
+++ 0007-net-enic-remove-useless-include.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,12 +1,13 @@
-From a1c40a3a3bcb45f70006c037a2baded192e5bdb9 Mon Sep 17 00:00:00 2001
+From a643961a42aab273a28639bcab1a4e33e2250c2d Mon Sep 17 00:00:00 2001
From: Hyong Youb Kim <hyonkim@cisco.com>
Date: Mon, 14 Jan 2019 07:01:21 -0800
Subject: [PATCH] net/enic: remove useless include
+[ upstream commit a1c40a3a3bcb45f70006c037a2baded192e5bdb9 ]
+
libgen.h is not used, so do not include it.
Fixes: fefed3d1e62c ("enic: new driver")
-Cc: stable@dpdk.org
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
---
@@ -26,7 +27,7 @@
#include <rte_ethdev_driver.h>
#include <rte_malloc.h>
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
-index 621a984a0..2652949a2 100644
+index c3869de36..406f92a80 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -9,5 +9,4 @@
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'drivers: fix sprintf with snprintf' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (5 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'net/enic: remove useless include' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'eal: fix log level of error in option register' " Kevin Traynor
` (59 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Pallantla Poornima; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From c2b777d67fd6fde5433cc8ffca1f8c6b2dd7ea9f Mon Sep 17 00:00:00 2001
From: Pallantla Poornima <pallantlax.poornima@intel.com>
Date: Mon, 7 Jan 2019 10:46:23 +0000
Subject: [PATCH] drivers: fix sprintf with snprintf
[ upstream commit a1e8241a919f7239d16e63fbc41549b2c951e1ae ]
sprintf function is not secure as it doesn't check the length of string.
More secure function snprintf is used
Fixes: 828d51d8fc ("bus/fslmc: refactor scan and probe functions")
Fixes: c22fab9a6c ("raw/dpaa2_qdma: support configuration APIs")
Fixes: e5cbdfc537 ("crypto/dpaa2_sec: add basic operations")
Fixes: b23d4e898a ("crypto/dpaa2_sec: add per dev mempool to store FLE")
Fixes: 623326dded ("crypto/dpaa2_sec: introduce poll mode driver")
Fixes: e7a45f3cc2 ("crypto/caam_jr: add UIO specific operations")
Fixes: f44bccadd8 ("crypto/caam_jr: add device basic operations")
Fixes: 7e3e2954e0 ("crypto/dpaa_sec: move mempool allocation to config")
Fixes: c3e85bdcc6 ("crypto/dpaa_sec: add crypto driver for NXP DPAA platform")
Signed-off-by: Pallantla Poornima <pallantlax.poornima@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
drivers/bus/fslmc/fslmc_bus.c | 4 ++--
drivers/crypto/caam_jr/caam_jr.c | 2 +-
drivers/crypto/caam_jr/caam_jr_uio.c | 13 ++++++-------
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 8 +++++---
drivers/crypto/dpaa_sec/dpaa_sec.c | 5 +++--
drivers/raw/dpaa2_qdma/dpaa2_qdma.c | 2 +-
6 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index 565e0148f..2dcdca01f 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -295,6 +295,6 @@ rte_fslmc_scan(void)
/* Scan devices on the group */
- sprintf(fslmc_dirpath, "%s/%d/devices", VFIO_IOMMU_GROUP_PATH,
- groupid);
+ snprintf(fslmc_dirpath, sizeof(fslmc_dirpath), "%s/%d/devices",
+ VFIO_IOMMU_GROUP_PATH, groupid);
dir = opendir(fslmc_dirpath);
if (!dir) {
diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c
index f505adf6b..190053ee6 100644
--- a/drivers/crypto/caam_jr/caam_jr.c
+++ b/drivers/crypto/caam_jr/caam_jr.c
@@ -2013,5 +2013,5 @@ caam_jr_dev_configure(struct rte_cryptodev *dev,
internals = dev->data->dev_private;
- sprintf(str, "ctx_pool_%d", dev->data->dev_id);
+ snprintf(str, sizeof(str), "ctx_pool_%d", dev->data->dev_id);
if (!internals->ctx_pool) {
internals->ctx_pool = rte_mempool_create((const char *)str,
diff --git a/drivers/crypto/caam_jr/caam_jr_uio.c b/drivers/crypto/caam_jr/caam_jr_uio.c
index d94101c2f..bf872a220 100644
--- a/drivers/crypto/caam_jr/caam_jr_uio.c
+++ b/drivers/crypto/caam_jr/caam_jr_uio.c
@@ -285,9 +285,9 @@ uio_map_registers(int uio_device_fd, int uio_device_id,
/* Compose string: /sys/class/uio/uioX */
- sprintf(uio_sys_root, "%s/%s%d", SEC_UIO_DEVICE_SYS_ATTR_PATH,
- "uio", uio_device_id);
+ snprintf(uio_sys_root, sizeof(uio_sys_root), "%s/%s%d",
+ SEC_UIO_DEVICE_SYS_ATTR_PATH, "uio", uio_device_id);
/* Compose string: maps/mapY */
- sprintf(uio_sys_map_subdir, "%s%d", SEC_UIO_DEVICE_SYS_MAP_ATTR,
- uio_map_id);
+ snprintf(uio_sys_map_subdir, sizeof(uio_sys_map_subdir), "%s%d",
+ SEC_UIO_DEVICE_SYS_MAP_ATTR, uio_map_id);
/* Read first (and only) line from file
@@ -390,7 +390,6 @@ uio_job_ring *config_job_ring(void)
/* Find UIO device created by SEC kernel driver for this job ring. */
memset(uio_device_file_name, 0, sizeof(uio_device_file_name));
-
- sprintf(uio_device_file_name, "%s%d", SEC_UIO_DEVICE_FILE_NAME,
- job_ring->uio_minor_number);
+ snprintf(uio_device_file_name, sizeof(uio_device_file_name), "%s%d",
+ SEC_UIO_DEVICE_FILE_NAME, job_ring->uio_minor_number);
/* Open device file */
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index c24562b80..34c14f776 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -3373,5 +3373,6 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
goto init_error;
}
- sprintf(cryptodev->data->name, "dpsec-%u", hw_id);
+ snprintf(cryptodev->data->name, sizeof(cryptodev->data->name),
+ "dpsec-%u", hw_id);
internals->max_nb_queue_pairs = attr.num_tx_queues;
@@ -3380,5 +3381,5 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
internals->token = token;
- sprintf(str, "fle_pool_%d", cryptodev->data->dev_id);
+ snprintf(str, sizeof(str), "fle_pool_%d", cryptodev->data->dev_id);
internals->fle_pool = rte_mempool_create((const char *)str,
FLE_POOL_NUM_BUFS,
@@ -3411,5 +3412,6 @@ cryptodev_dpaa2_sec_probe(struct rte_dpaa2_driver *dpaa2_drv __rte_unused,
int retval;
- sprintf(cryptodev_name, "dpsec-%d", dpaa2_dev->object_id);
+ snprintf(cryptodev_name, sizeof(cryptodev_name), "dpsec-%d",
+ dpaa2_dev->object_id);
cryptodev = rte_cryptodev_pmd_allocate(cryptodev_name, rte_socket_id());
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index d83e74541..8958fd06a 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -2186,5 +2186,5 @@ dpaa_sec_dev_configure(struct rte_cryptodev *dev,
internals = dev->data->dev_private;
- sprintf(str, "ctx_pool_%d", dev->data->dev_id);
+ snprintf(str, sizeof(str), "ctx_pool_%d", dev->data->dev_id);
if (!internals->ctx_pool) {
internals->ctx_pool = rte_mempool_create((const char *)str,
@@ -2392,5 +2392,6 @@ cryptodev_dpaa_sec_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused,
int retval;
- sprintf(cryptodev_name, "dpaa_sec-%d", dpaa_dev->id.dev_id);
+ snprintf(cryptodev_name, sizeof(cryptodev_name), "dpaa_sec-%d",
+ dpaa_dev->id.dev_id);
cryptodev = rte_cryptodev_pmd_allocate(cryptodev_name, rte_socket_id());
diff --git a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c
index f474442d4..60621eb85 100644
--- a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c
+++ b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c
@@ -314,5 +314,5 @@ rte_qdma_vq_create(uint32_t lcore_id, uint32_t flags)
} else {
/* Allocate a Ring for Virutal Queue in VQ mode */
- sprintf(ring_name, "status ring %d", i);
+ snprintf(ring_name, sizeof(ring_name), "status ring %d", i);
qdma_vqs[i].status_ring = rte_ring_create(ring_name,
qdma_dev.fle_pool_count, rte_socket_id(), 0);
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:55.700974004 +0000
+++ 0008-drivers-fix-sprintf-with-snprintf.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From a1e8241a919f7239d16e63fbc41549b2c951e1ae Mon Sep 17 00:00:00 2001
+From c2b777d67fd6fde5433cc8ffca1f8c6b2dd7ea9f Mon Sep 17 00:00:00 2001
From: Pallantla Poornima <pallantlax.poornima@intel.com>
Date: Mon, 7 Jan 2019 10:46:23 +0000
Subject: [PATCH] drivers: fix sprintf with snprintf
+[ upstream commit a1e8241a919f7239d16e63fbc41549b2c951e1ae ]
+
sprintf function is not secure as it doesn't check the length of string.
More secure function snprintf is used
@@ -15,7 +17,6 @@
Fixes: f44bccadd8 ("crypto/caam_jr: add device basic operations")
Fixes: 7e3e2954e0 ("crypto/dpaa_sec: move mempool allocation to config")
Fixes: c3e85bdcc6 ("crypto/dpaa_sec: add crypto driver for NXP DPAA platform")
-Cc: stable@dpdk.org
Signed-off-by: Pallantla Poornima <pallantlax.poornima@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
@@ -29,10 +30,10 @@
6 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
-index fa1505377..44c0827ce 100644
+index 565e0148f..2dcdca01f 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
-@@ -298,6 +298,6 @@ rte_fslmc_scan(void)
+@@ -295,6 +295,6 @@ rte_fslmc_scan(void)
/* Scan devices on the group */
- sprintf(fslmc_dirpath, "%s/%d/devices", VFIO_IOMMU_GROUP_PATH,
@@ -42,10 +43,10 @@
dir = opendir(fslmc_dirpath);
if (!dir) {
diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c
-index 45b281331..0263170fd 100644
+index f505adf6b..190053ee6 100644
--- a/drivers/crypto/caam_jr/caam_jr.c
+++ b/drivers/crypto/caam_jr/caam_jr.c
-@@ -2012,5 +2012,5 @@ caam_jr_dev_configure(struct rte_cryptodev *dev,
+@@ -2013,5 +2013,5 @@ caam_jr_dev_configure(struct rte_cryptodev *dev,
internals = dev->data->dev_private;
- sprintf(str, "ctx_pool_%d", dev->data->dev_id);
@@ -81,10 +82,10 @@
/* Open device file */
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
-index ef6e9c151..c2c22515d 100644
+index c24562b80..34c14f776 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
-@@ -3372,5 +3372,6 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
+@@ -3373,5 +3373,6 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
goto init_error;
}
- sprintf(cryptodev->data->name, "dpsec-%u", hw_id);
@@ -92,14 +93,14 @@
+ "dpsec-%u", hw_id);
internals->max_nb_queue_pairs = attr.num_tx_queues;
-@@ -3379,5 +3380,5 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
+@@ -3380,5 +3381,5 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
internals->token = token;
- sprintf(str, "fle_pool_%d", cryptodev->data->dev_id);
+ snprintf(str, sizeof(str), "fle_pool_%d", cryptodev->data->dev_id);
internals->fle_pool = rte_mempool_create((const char *)str,
FLE_POOL_NUM_BUFS,
-@@ -3410,5 +3411,6 @@ cryptodev_dpaa2_sec_probe(struct rte_dpaa2_driver *dpaa2_drv __rte_unused,
+@@ -3411,5 +3412,6 @@ cryptodev_dpaa2_sec_probe(struct rte_dpaa2_driver *dpaa2_drv __rte_unused,
int retval;
- sprintf(cryptodev_name, "dpsec-%d", dpaa2_dev->object_id);
@@ -108,17 +109,17 @@
cryptodev = rte_cryptodev_pmd_allocate(cryptodev_name, rte_socket_id());
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
-index 5caceef3f..39533a9cc 100644
+index d83e74541..8958fd06a 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
-@@ -2470,5 +2470,5 @@ dpaa_sec_dev_configure(struct rte_cryptodev *dev,
+@@ -2186,5 +2186,5 @@ dpaa_sec_dev_configure(struct rte_cryptodev *dev,
internals = dev->data->dev_private;
- sprintf(str, "ctx_pool_%d", dev->data->dev_id);
+ snprintf(str, sizeof(str), "ctx_pool_%d", dev->data->dev_id);
if (!internals->ctx_pool) {
internals->ctx_pool = rte_mempool_create((const char *)str,
-@@ -2676,5 +2676,6 @@ cryptodev_dpaa_sec_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused,
+@@ -2392,5 +2392,6 @@ cryptodev_dpaa_sec_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused,
int retval;
- sprintf(cryptodev_name, "dpaa_sec-%d", dpaa_dev->id.dev_id);
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'eal: fix log level of error in option register' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (6 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'drivers: fix sprintf with snprintf' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'doc: fix a typo in power management guide' " Kevin Traynor
` (58 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Gaetan Rivet; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 02985c04b6538002c1702626c3f9fd08ddc0a0c3 Mon Sep 17 00:00:00 2001
From: Gaetan Rivet <gaetan.rivet@6wind.com>
Date: Thu, 20 Dec 2018 18:06:45 +0100
Subject: [PATCH] eal: fix log level of error in option register
[ upstream commit d3bdefef22b8f653eb9a26093e9a498f2da792d8 ]
INFO is not correct when logging an error.
Fixes: 2395332798d0 ("eal: add option register infrastructure")
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
lib/librte_eal/common/rte_option.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_eal/common/rte_option.c b/lib/librte_eal/common/rte_option.c
index 088e0fd23..198de6d2e 100644
--- a/lib/librte_eal/common/rte_option.c
+++ b/lib/librte_eal/common/rte_option.c
@@ -37,5 +37,5 @@ rte_option_register(struct rte_option *opt)
TAILQ_FOREACH(option, &rte_option_list, next) {
if (strcmp(opt->opt_str, option->opt_str) == 0) {
- RTE_LOG(INFO, EAL, "Option %s has already been registered.\n",
+ RTE_LOG(ERR, EAL, "Option %s has already been registered.\n",
opt->opt_str);
return;
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:55.733210879 +0000
+++ 0009-eal-fix-log-level-of-error-in-option-register.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,12 +1,13 @@
-From d3bdefef22b8f653eb9a26093e9a498f2da792d8 Mon Sep 17 00:00:00 2001
+From 02985c04b6538002c1702626c3f9fd08ddc0a0c3 Mon Sep 17 00:00:00 2001
From: Gaetan Rivet <gaetan.rivet@6wind.com>
Date: Thu, 20 Dec 2018 18:06:45 +0100
Subject: [PATCH] eal: fix log level of error in option register
+[ upstream commit d3bdefef22b8f653eb9a26093e9a498f2da792d8 ]
+
INFO is not correct when logging an error.
Fixes: 2395332798d0 ("eal: add option register infrastructure")
-Cc: stable@dpdk.org
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
@@ -14,15 +15,15 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_eal/common/rte_option.c b/lib/librte_eal/common/rte_option.c
-index ae8a0e2ca..b2c93b220 100644
+index 088e0fd23..198de6d2e 100644
--- a/lib/librte_eal/common/rte_option.c
+++ b/lib/librte_eal/common/rte_option.c
-@@ -57,5 +57,5 @@ rte_option_register(struct rte_option *opt)
+@@ -37,5 +37,5 @@ rte_option_register(struct rte_option *opt)
TAILQ_FOREACH(option, &rte_option_list, next) {
- if (strcmp(opt->name, option->name) == 0) {
+ if (strcmp(opt->opt_str, option->opt_str) == 0) {
- RTE_LOG(INFO, EAL, "Option %s has already been registered.\n",
+ RTE_LOG(ERR, EAL, "Option %s has already been registered.\n",
- opt->name);
+ opt->opt_str);
return;
--
2.19.0
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'doc: fix a typo in power management guide' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (7 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'eal: fix log level of error in option register' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'test/hash: fix perf result' " Kevin Traynor
` (57 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Yong Wang; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 3a90add2b2adfa44b8d7f611ed8a9e38df96c6b2 Mon Sep 17 00:00:00 2001
From: Yong Wang <wang.yong19@zte.com.cn>
Date: Mon, 7 Jan 2019 04:10:47 -0500
Subject: [PATCH] doc: fix a typo in power management guide
[ upstream commit 50360349245c7eafaac4aef94be1c85948fe5690 ]
This patch fixes a typo in programmer's guide. It should be Frequency,
not Fequence.
Fixes: 450f0791312c ("power: add traffic pattern aware power control")
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
---
doc/guides/prog_guide/power_man.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/guides/prog_guide/power_man.rst b/doc/guides/prog_guide/power_man.rst
index 68b7e8b64..f55436bc9 100644
--- a/doc/guides/prog_guide/power_man.rst
+++ b/doc/guides/prog_guide/power_man.rst
@@ -185,5 +185,5 @@ API Overview for Empty Poll Power Management
* **Update Valid Poll Counter**: update the valid poll counter.
-* **Set the Fequence Index**: update the power state/frequency mapping.
+* **Set the Frequency Index**: update the power state/frequency mapping.
* **Detect empty poll state change**: empty poll state change detection algorithm then take action.
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:55.758184623 +0000
+++ 0010-doc-fix-a-typo-in-power-management-guide.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,13 +1,14 @@
-From 50360349245c7eafaac4aef94be1c85948fe5690 Mon Sep 17 00:00:00 2001
+From 3a90add2b2adfa44b8d7f611ed8a9e38df96c6b2 Mon Sep 17 00:00:00 2001
From: Yong Wang <wang.yong19@zte.com.cn>
Date: Mon, 7 Jan 2019 04:10:47 -0500
Subject: [PATCH] doc: fix a typo in power management guide
+[ upstream commit 50360349245c7eafaac4aef94be1c85948fe5690 ]
+
This patch fixes a typo in programmer's guide. It should be Frequency,
not Fequence.
Fixes: 450f0791312c ("power: add traffic pattern aware power control")
-Cc: stable@dpdk.org
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
---
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'test/hash: fix perf result' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (8 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'doc: fix a typo in power management guide' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'examples/tep_term: remove unused constant' " Kevin Traynor
` (56 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Dharmik Thakkar; +Cc: Ferruh Yigit, Yipeng Wang, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 31d86c501d08d78ebc020b62d26e5fa5efa3d074 Mon Sep 17 00:00:00 2001
From: Dharmik Thakkar <dharmik.thakkar@arm.com>
Date: Mon, 14 Jan 2019 03:23:04 -0600
Subject: [PATCH] test/hash: fix perf result
[ upstream commit 7dbbdd3efa6777ac2a3b7cb30d1e8ebec9e5e2fd ]
Reset 'iter' and 'tbl_rw_test_param.found' on each iteration
to give correct result for lost and duplicated keys.
This patch also changes the default return value of the test to -1
when not enough resources are provided.
Fixes: 0eb3726ebcf14 ("test/hash: add test for read/write concurrency")
Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Yipeng Wang <yipeng1.wang@intel.com>
---
test/test/test_hash_readwrite.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/test/test/test_hash_readwrite.c b/test/test/test_hash_readwrite.c
index 6b695ce6e..480ae97d8 100644
--- a/test/test/test_hash_readwrite.c
+++ b/test/test/test_hash_readwrite.c
@@ -40,5 +40,5 @@ static struct perf htm_results, non_htm_results;
struct {
uint32_t *keys;
- uint32_t *found;
+ uint8_t *found;
uint32_t num_insert;
uint32_t rounded_tot_insert;
@@ -127,5 +127,5 @@ init_params(int use_ext, int use_htm, int use_jhash)
uint32_t *keys = NULL;
- uint32_t *found = NULL;
+ uint8_t *found = NULL;
struct rte_hash *handle;
@@ -174,5 +174,5 @@ init_params(int use_ext, int use_htm, int use_jhash)
}
- found = rte_zmalloc(NULL, sizeof(uint32_t) * TOTAL_ENTRY, 0);
+ found = rte_zmalloc(NULL, sizeof(uint8_t) * TOTAL_ENTRY, 0);
if (found == NULL) {
printf("RTE_ZMALLOC failed\n");
@@ -362,5 +362,5 @@ test_hash_readwrite_perf(struct perf *perf_results, int use_htm,
const void *next_key;
void *next_data;
- uint32_t iter = 0;
+ uint32_t iter;
int use_jhash = 0;
@@ -537,4 +537,6 @@ test_hash_readwrite_perf(struct perf *perf_results, int use_htm,
rte_eal_mp_wait_lcore();
+ iter = 0;
+ memset(tbl_rw_test_param.found, 0, TOTAL_ENTRY);
while (rte_hash_iterate(tbl_rw_test_param.h,
&next_key, &next_data, &iter) >= 0) {
@@ -620,5 +622,5 @@ test_hash_readwrite_main(void)
printf("More than two lcores are required "
"to do read write test\n");
- return 0;
+ return -1;
}
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:55.778307558 +0000
+++ 0011-test-hash-fix-perf-result.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From 7dbbdd3efa6777ac2a3b7cb30d1e8ebec9e5e2fd Mon Sep 17 00:00:00 2001
+From 31d86c501d08d78ebc020b62d26e5fa5efa3d074 Mon Sep 17 00:00:00 2001
From: Dharmik Thakkar <dharmik.thakkar@arm.com>
Date: Mon, 14 Jan 2019 03:23:04 -0600
Subject: [PATCH] test/hash: fix perf result
+[ upstream commit 7dbbdd3efa6777ac2a3b7cb30d1e8ebec9e5e2fd ]
+
Reset 'iter' and 'tbl_rw_test_param.found' on each iteration
to give correct result for lost and duplicated keys.
@@ -10,7 +12,6 @@
when not enough resources are provided.
Fixes: 0eb3726ebcf14 ("test/hash: add test for read/write concurrency")
-Cc: stable@dpdk.org
Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'examples/tep_term: remove unused constant' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (9 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'test/hash: fix perf result' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'examples/vhost: fix a typo' " Kevin Traynor
` (55 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Rami Rosen; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 8b1abe7c8091a8572281b40771fcb9fdf2c7cc37 Mon Sep 17 00:00:00 2001
From: Rami Rosen <ramirose@gmail.com>
Date: Sun, 13 Jan 2019 17:02:12 +0200
Subject: [PATCH] examples/tep_term: remove unused constant
[ upstream commit c8516e3caa711ef42132d5b08b7c755b86c6e0c3 ]
The definition of MAX_PRINT_BUFF in examples/tep_termination/main.c
is not necessary as it is not used. This cleanup patch removes it.
Fixes: a50245ede72a ("examples/tep_term: initialize VXLAN sample")
Signed-off-by: Rami Rosen <ramirose@gmail.com>
---
examples/tep_termination/main.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/examples/tep_termination/main.c b/examples/tep_termination/main.c
index 7795d0894..d6379e31e 100644
--- a/examples/tep_termination/main.c
+++ b/examples/tep_termination/main.c
@@ -72,7 +72,4 @@
#define INVALID_PORT_ID 0xFFFF
-/* Size of buffers used for snprintfs. */
-#define MAX_PRINT_BUFF 6072
-
/* Maximum character device basename size. */
#define MAX_BASENAME_SZ 20
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:55.802347582 +0000
+++ 0012-examples-tep_term-remove-unused-constant.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,13 +1,14 @@
-From c8516e3caa711ef42132d5b08b7c755b86c6e0c3 Mon Sep 17 00:00:00 2001
+From 8b1abe7c8091a8572281b40771fcb9fdf2c7cc37 Mon Sep 17 00:00:00 2001
From: Rami Rosen <ramirose@gmail.com>
Date: Sun, 13 Jan 2019 17:02:12 +0200
Subject: [PATCH] examples/tep_term: remove unused constant
+[ upstream commit c8516e3caa711ef42132d5b08b7c755b86c6e0c3 ]
+
The definition of MAX_PRINT_BUFF in examples/tep_termination/main.c
is not necessary as it is not used. This cleanup patch removes it.
Fixes: a50245ede72a ("examples/tep_term: initialize VXLAN sample")
-Cc: stable@dpdk.org
Signed-off-by: Rami Rosen <ramirose@gmail.com>
---
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'examples/vhost: fix a typo' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (10 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'examples/tep_term: remove unused constant' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'eal: fix core number validation' " Kevin Traynor
` (54 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Rami Rosen; +Cc: Gavin Hu, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From ef7a4a6a8b96703e90753431934c8f41fd093bf1 Mon Sep 17 00:00:00 2001
From: Rami Rosen <ramirose@gmail.com>
Date: Mon, 14 Jan 2019 16:47:47 +0200
Subject: [PATCH] examples/vhost: fix a typo
[ upstream commit 10b4270fff20287c5613d88a7ae5521dcbb44463 ]
This minor patch fixes a typo in examples/vhost/main.c.
Fixes: d19533e86f1d ("examples/vhost: copy old vhost example")
Signed-off-by: Rami Rosen <ramirose@gmail.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
---
examples/vhost/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index dc9ea1018..c4bdd3c43 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -1221,5 +1221,5 @@ destroy_device(int vid)
/*
* A new device is added to a data core. First the device is added to the main linked list
- * and the allocated to a specific data core.
+ * and then allocated to a specific data core.
*/
static int
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:55.824021743 +0000
+++ 0013-examples-vhost-fix-a-typo.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,12 +1,13 @@
-From 10b4270fff20287c5613d88a7ae5521dcbb44463 Mon Sep 17 00:00:00 2001
+From ef7a4a6a8b96703e90753431934c8f41fd093bf1 Mon Sep 17 00:00:00 2001
From: Rami Rosen <ramirose@gmail.com>
Date: Mon, 14 Jan 2019 16:47:47 +0200
Subject: [PATCH] examples/vhost: fix a typo
+[ upstream commit 10b4270fff20287c5613d88a7ae5521dcbb44463 ]
+
This minor patch fixes a typo in examples/vhost/main.c.
Fixes: d19533e86f1d ("examples/vhost: copy old vhost example")
-Cc: stable@dpdk.org
Signed-off-by: Rami Rosen <ramirose@gmail.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
@@ -15,10 +16,10 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
-index f722a13f6..645cf51e9 100644
+index dc9ea1018..c4bdd3c43 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
-@@ -1199,5 +1199,5 @@ destroy_device(int vid)
+@@ -1221,5 +1221,5 @@ destroy_device(int vid)
/*
* A new device is added to a data core. First the device is added to the main linked list
- * and the allocated to a specific data core.
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'eal: fix core number validation' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (11 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'examples/vhost: fix a typo' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'eal: fix out of bound access when no CPU available' " Kevin Traynor
` (53 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Hari Kumar Vemula; +Cc: David Marchand, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 2bda1baef9b2febcbd986ae8ffc014548a3e6943 Mon Sep 17 00:00:00 2001
From: Hari Kumar Vemula <hari.kumarx.vemula@intel.com>
Date: Thu, 17 Jan 2019 12:13:12 +0000
Subject: [PATCH] eal: fix core number validation
[ upstream commit b38693b612b4cabb7cb38a4eeb036285b2b55b0b ]
When incorrect core value or range provided,
as part of -l command line option, a crash occurs.
Added valid range checks to fix the crash.
Added ut check for negative core values.
Added unit test case for invalid core number range.
Fixes: d888cb8b9613 ("eal: add core list input format")
Signed-off-by: Hari Kumar Vemula <hari.kumarx.vemula@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
lib/librte_eal/common/eal_common_options.c | 9 +++-
test/test/test_eal_flags.c | 61 ++++++++++++++--------
2 files changed, 45 insertions(+), 25 deletions(-)
diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index bcf5f1b00..ca5a4e332 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -600,5 +600,7 @@ eal_parse_corelist(const char *corelist)
return -1;
errno = 0;
- idx = strtoul(corelist, &end, 10);
+ idx = strtol(corelist, &end, 10);
+ if (idx < 0 || idx >= (int)cfg->lcore_count)
+ return -1;
if (errno || end == NULL)
return -1;
@@ -1111,4 +1113,5 @@ eal_parse_common_option(int opt, const char *optarg,
static int b_used;
static int w_used;
+ struct rte_config *cfg = rte_eal_get_configuration();
switch (opt) {
@@ -1153,5 +1156,7 @@ eal_parse_common_option(int opt, const char *optarg,
case 'l':
if (eal_parse_corelist(optarg) < 0) {
- RTE_LOG(ERR, EAL, "invalid core list\n");
+ RTE_LOG(ERR, EAL,
+ "invalid core list, please check core numbers are in [0, %u] range\n",
+ cfg->lcore_count-1);
return -1;
}
diff --git a/test/test/test_eal_flags.c b/test/test/test_eal_flags.c
index 2acab9d69..e3a60c7ae 100644
--- a/test/test/test_eal_flags.c
+++ b/test/test/test_eal_flags.c
@@ -19,4 +19,5 @@
#include <limits.h>
+#include <rte_per_lcore.h>
#include <rte_debug.h>
#include <rte_string_fns.h>
@@ -478,38 +479,48 @@ test_missing_c_flag(void)
const char *argv10[] = { prgname, prefix, mp_flag,
"-n", "3", "-l", "1#2" };
+ /* core number is negative value */
+ const char * const argv11[] = { prgname, prefix, mp_flag,
+ "-n", "3", "-l", "-5" };
+ const char * const argv12[] = { prgname, prefix, mp_flag,
+ "-n", "3", "-l", "-5-7" };
+ /* core number is maximum value */
+ const char * const argv13[] = { prgname, prefix, mp_flag,
+ "-n", "3", "-l", RTE_STR(RTE_MAX_LCORE) };
+ const char * const argv14[] = { prgname, prefix, mp_flag,
+ "-n", "3", "-l", "1-"RTE_STR(RTE_MAX_LCORE) };
/* sanity check test - valid corelist value */
- const char *argv11[] = { prgname, prefix, mp_flag,
+ const char * const argv15[] = { prgname, prefix, mp_flag,
"-n", "3", "-l", "1-2,3" };
/* --lcores flag but no lcores value */
- const char *argv12[] = { prgname, prefix, mp_flag,
+ const char * const argv16[] = { prgname, prefix, mp_flag,
"-n", "3", "--lcores" };
- const char *argv13[] = { prgname, prefix, mp_flag,
+ const char * const argv17[] = { prgname, prefix, mp_flag,
"-n", "3", "--lcores", " " };
/* bad lcores value */
- const char *argv14[] = { prgname, prefix, mp_flag,
+ const char * const argv18[] = { prgname, prefix, mp_flag,
"-n", "3", "--lcores", "1-3-5" };
- const char *argv15[] = { prgname, prefix, mp_flag,
+ const char * const argv19[] = { prgname, prefix, mp_flag,
"-n", "3", "--lcores", "0-1,,2" };
- const char *argv16[] = { prgname, prefix, mp_flag,
+ const char * const argv20[] = { prgname, prefix, mp_flag,
"-n", "3", "--lcores", "0-,1" };
- const char *argv17[] = { prgname, prefix, mp_flag,
+ const char * const argv21[] = { prgname, prefix, mp_flag,
"-n", "3", "--lcores", "(0-,2-4)" };
- const char *argv18[] = { prgname, prefix, mp_flag,
+ const char * const argv22[] = { prgname, prefix, mp_flag,
"-n", "3", "--lcores", "(-1,2)" };
- const char *argv19[] = { prgname, prefix, mp_flag,
+ const char * const argv23[] = { prgname, prefix, mp_flag,
"-n", "3", "--lcores", "(2-4)@(2-4-6)" };
- const char *argv20[] = { prgname, prefix, mp_flag,
+ const char * const argv24[] = { prgname, prefix, mp_flag,
"-n", "3", "--lcores", "(a,2)" };
- const char *argv21[] = { prgname, prefix, mp_flag,
+ const char * const argv25[] = { prgname, prefix, mp_flag,
"-n", "3", "--lcores", "1-3@(1,3)" };
- const char *argv22[] = { prgname, prefix, mp_flag,
+ const char * const argv26[] = { prgname, prefix, mp_flag,
"-n", "3", "--lcores", "3@((1,3)" };
- const char *argv23[] = { prgname, prefix, mp_flag,
+ const char * const argv27[] = { prgname, prefix, mp_flag,
"-n", "3", "--lcores", "(4-7)=(1,3)" };
- const char *argv24[] = { prgname, prefix, mp_flag,
+ const char * const argv28[] = { prgname, prefix, mp_flag,
"-n", "3", "--lcores", "[4-7]@(1,3)" };
/* sanity check of tests - valid lcores value */
- const char *argv25[] = { prgname, prefix, mp_flag,
+ const char * const argv29[] = { prgname, prefix, mp_flag,
"-n", "3", "--lcores",
"0-1,2@(5-7),(3-5)@(0,2),(0,6),7"};
@@ -539,10 +550,14 @@ test_missing_c_flag(void)
|| launch_proc(argv8) == 0
|| launch_proc(argv9) == 0
- || launch_proc(argv10) == 0) {
+ || launch_proc(argv10) == 0
+ || launch_proc(argv11) == 0
+ || launch_proc(argv12) == 0
+ || launch_proc(argv13) == 0
+ || launch_proc(argv14) == 0) {
printf("Error - "
"process ran without error with invalid -l flag\n");
return -1;
}
- if (launch_proc(argv11) != 0) {
+ if (launch_proc(argv15) != 0) {
printf("Error - "
"process did not run ok with valid corelist value\n");
@@ -551,11 +566,11 @@ test_missing_c_flag(void)
/* start --lcores tests */
- if (launch_proc(argv12) == 0 || launch_proc(argv13) == 0 ||
- launch_proc(argv14) == 0 || launch_proc(argv15) == 0 ||
- launch_proc(argv16) == 0 || launch_proc(argv17) == 0 ||
+ if (launch_proc(argv16) == 0 || launch_proc(argv17) == 0 ||
launch_proc(argv18) == 0 || launch_proc(argv19) == 0 ||
launch_proc(argv20) == 0 || launch_proc(argv21) == 0 ||
- launch_proc(argv21) == 0 || launch_proc(argv22) == 0 ||
- launch_proc(argv23) == 0 || launch_proc(argv24) == 0) {
+ launch_proc(argv22) == 0 || launch_proc(argv23) == 0 ||
+ launch_proc(argv24) == 0 || launch_proc(argv25) == 0 ||
+ launch_proc(argv26) == 0 || launch_proc(argv27) == 0 ||
+ launch_proc(argv28) == 0) {
printf("Error - "
"process ran without error with invalid --lcore flag\n");
@@ -563,5 +578,5 @@ test_missing_c_flag(void)
}
- if (launch_proc(argv25) != 0) {
+ if (launch_proc(argv29) != 0) {
printf("Error - "
"process did not run ok with valid corelist value\n");
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:55.847319263 +0000
+++ 0014-eal-fix-core-number-validation.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From b38693b612b4cabb7cb38a4eeb036285b2b55b0b Mon Sep 17 00:00:00 2001
+From 2bda1baef9b2febcbd986ae8ffc014548a3e6943 Mon Sep 17 00:00:00 2001
From: Hari Kumar Vemula <hari.kumarx.vemula@intel.com>
Date: Thu, 17 Jan 2019 12:13:12 +0000
Subject: [PATCH] eal: fix core number validation
+[ upstream commit b38693b612b4cabb7cb38a4eeb036285b2b55b0b ]
+
When incorrect core value or range provided,
as part of -l command line option, a crash occurs.
@@ -12,7 +14,6 @@
Added unit test case for invalid core number range.
Fixes: d888cb8b9613 ("eal: add core list input format")
-Cc: stable@dpdk.org
Signed-off-by: Hari Kumar Vemula <hari.kumarx.vemula@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
@@ -22,10 +23,10 @@
2 files changed, 45 insertions(+), 25 deletions(-)
diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
-index 3796dbf48..4681333ed 100644
+index bcf5f1b00..ca5a4e332 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
-@@ -601,5 +601,7 @@ eal_parse_corelist(const char *corelist)
+@@ -600,5 +600,7 @@ eal_parse_corelist(const char *corelist)
return -1;
errno = 0;
- idx = strtoul(corelist, &end, 10);
@@ -34,13 +35,13 @@
+ return -1;
if (errno || end == NULL)
return -1;
-@@ -1112,4 +1114,5 @@ eal_parse_common_option(int opt, const char *optarg,
+@@ -1111,4 +1113,5 @@ eal_parse_common_option(int opt, const char *optarg,
static int b_used;
static int w_used;
+ struct rte_config *cfg = rte_eal_get_configuration();
switch (opt) {
-@@ -1154,5 +1157,7 @@ eal_parse_common_option(int opt, const char *optarg,
+@@ -1153,5 +1156,7 @@ eal_parse_common_option(int opt, const char *optarg,
case 'l':
if (eal_parse_corelist(optarg) < 0) {
- RTE_LOG(ERR, EAL, "invalid core list\n");
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'eal: fix out of bound access when no CPU available' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (12 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'eal: fix core number validation' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'eal: check string parameter lengths' " Kevin Traynor
` (52 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: David Marchand; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 508dc0617a6874784f9fa5ac5c5552bce82ae9de Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 17 Jan 2019 14:12:57 +0100
Subject: [PATCH] eal: fix out of bound access when no CPU available
[ upstream commit 7b55015e1487a5f407a760cfb4d9dbf1ddacd0cc ]
In the unlikely case when the dpdk application is started with no cpu
available in the [0, RTE_MAX_LCORE - 1] range, the master_lcore is
automatically chosen as RTE_MAX_LCORE which triggers an out of bound
access.
Either you have a crash then, or the initialisation fails later when
trying to pin the master thread on it.
In my test, with RTE_MAX_LCORE == 2:
$ taskset -c 2 ./master/app/testpmd --no-huge -m 512 --log-level *:debug
[...]
EAL: pthread_setaffinity_np failed
PANIC in eal_thread_init_master():
cannot set affinity
7: [./master/app/testpmd() [0x47f629]]
Bugzilla ID: 19
Fixes: 2eba8d21f3c9 ("eal: restrict cores auto detection")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
lib/librte_eal/common/eal_common_options.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index ca5a4e332..02eb18410 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -1388,4 +1388,6 @@ eal_adjust_config(struct internal_config *internal_cfg)
if (!master_lcore_parsed) {
cfg->master_lcore = rte_get_next_lcore(-1, 0, 0);
+ if (cfg->master_lcore >= RTE_MAX_LCORE)
+ return -1;
lcore_config[cfg->master_lcore].core_role = ROLE_RTE;
}
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:55.873553342 +0000
+++ 0015-eal-fix-out-of-bound-access-when-no-CPU-available.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From 7b55015e1487a5f407a760cfb4d9dbf1ddacd0cc Mon Sep 17 00:00:00 2001
+From 508dc0617a6874784f9fa5ac5c5552bce82ae9de Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 17 Jan 2019 14:12:57 +0100
Subject: [PATCH] eal: fix out of bound access when no CPU available
+[ upstream commit 7b55015e1487a5f407a760cfb4d9dbf1ddacd0cc ]
+
In the unlikely case when the dpdk application is started with no cpu
available in the [0, RTE_MAX_LCORE - 1] range, the master_lcore is
automatically chosen as RTE_MAX_LCORE which triggers an out of bound
@@ -21,7 +23,6 @@
Bugzilla ID: 19
Fixes: 2eba8d21f3c9 ("eal: restrict cores auto detection")
-Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
@@ -29,10 +30,10 @@
1 file changed, 2 insertions(+)
diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
-index 4681333ed..80d790292 100644
+index ca5a4e332..02eb18410 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
-@@ -1389,4 +1389,6 @@ eal_adjust_config(struct internal_config *internal_cfg)
+@@ -1388,4 +1388,6 @@ eal_adjust_config(struct internal_config *internal_cfg)
if (!master_lcore_parsed) {
cfg->master_lcore = rte_get_next_lcore(-1, 0, 0);
+ if (cfg->master_lcore >= RTE_MAX_LCORE)
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'eal: check string parameter lengths' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (13 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'eal: fix out of bound access when no CPU available' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'eal: fix clang build with intrinsics forced' " Kevin Traynor
` (51 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From ad40dacc038197c60f42883cee86b83033a1b113 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Wed, 16 Jan 2019 12:12:53 +0000
Subject: [PATCH] eal: check string parameter lengths
[ upstream commit 2383d8e909275b072145c7addf826e9c8edb6232 ]
When specifying parameters such as hugefile prefix from the
command-line, it is possibly to supply an empty string. This may
lead to various problems: for example, if hugefile prefix is
empty, the runtime config path construction may end up
looking like "/var/run/dpdk//_config", which will technically
work, but is wrong and places files in the wrong place.
To fix it, check lengths of such user-specified parameters for
hugefile prefix, as well as hugepage dir and user-specified
mbuf pool ops string.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
lib/librte_eal/common/eal_common_options.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index 02eb18410..f6dfbc73a 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -1415,4 +1415,19 @@ eal_check_common_options(struct internal_config *internal_cfg)
return -1;
}
+ if (internal_cfg->hugefile_prefix != NULL &&
+ strlen(internal_cfg->hugefile_prefix) < 1) {
+ RTE_LOG(ERR, EAL, "Invalid length of --" OPT_FILE_PREFIX " option\n");
+ return -1;
+ }
+ if (internal_cfg->hugepage_dir != NULL &&
+ strlen(internal_cfg->hugepage_dir) < 1) {
+ RTE_LOG(ERR, EAL, "Invalid length of --" OPT_HUGE_DIR" option\n");
+ return -1;
+ }
+ if (internal_cfg->user_mbuf_pool_ops_name != NULL &&
+ strlen(internal_cfg->user_mbuf_pool_ops_name) < 1) {
+ RTE_LOG(ERR, EAL, "Invalid length of --" OPT_MBUF_POOL_OPS_NAME" option\n");
+ return -1;
+ }
if (index(eal_get_hugefile_prefix(), '%') != NULL) {
RTE_LOG(ERR, EAL, "Invalid char, '%%', in --"OPT_FILE_PREFIX" "
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:55.896879010 +0000
+++ 0016-eal-check-string-parameter-lengths.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From 2383d8e909275b072145c7addf826e9c8edb6232 Mon Sep 17 00:00:00 2001
+From ad40dacc038197c60f42883cee86b83033a1b113 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Wed, 16 Jan 2019 12:12:53 +0000
Subject: [PATCH] eal: check string parameter lengths
+[ upstream commit 2383d8e909275b072145c7addf826e9c8edb6232 ]
+
When specifying parameters such as hugefile prefix from the
command-line, it is possibly to supply an empty string. This may
lead to various problems: for example, if hugefile prefix is
@@ -14,18 +16,16 @@
hugefile prefix, as well as hugepage dir and user-specified
mbuf pool ops string.
-Cc: stable@dpdk.org
-
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
lib/librte_eal/common/eal_common_options.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
-index 80d790292..6c96f459c 100644
+index 02eb18410..f6dfbc73a 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
-@@ -1416,4 +1416,19 @@ eal_check_common_options(struct internal_config *internal_cfg)
+@@ -1415,4 +1415,19 @@ eal_check_common_options(struct internal_config *internal_cfg)
return -1;
}
+ if (internal_cfg->hugefile_prefix != NULL &&
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'eal: fix clang build with intrinsics forced' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (14 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'eal: check string parameter lengths' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'build: fix meson check for binutils 2.30' " Kevin Traynor
` (50 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Ilya Maximets; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 04ceac036c5165eb9dd7539ce636ca3344abd957 Mon Sep 17 00:00:00 2001
From: Ilya Maximets <i.maximets@samsung.com>
Date: Tue, 15 Jan 2019 14:29:39 +0300
Subject: [PATCH] eal: fix clang build with intrinsics forced
[ upstream commit 6406d70561e44474b27646f74b3863929019b1f1 ]
This fixes x86_64-native-linuxapp-clang build with
CONFIG_RTE_FORCE_INTRINSICS=y:
include/generic/rte_atomic.h:218:9: error:
implicit declaration of function '__atomic_exchange_2'
is invalid in C99 [-Werror,-Wimplicit-function-declaration]
include/generic/rte_atomic.h:501:9: error:
implicit declaration of function '__atomic_exchange_4'
is invalid in C99 [-Werror,-Wimplicit-function-declaration]
include/generic/rte_atomic.h:783:9: error:
implicit declaration of function '__atomic_exchange_8'
is invalid in C99 [-Werror,-Wimplicit-function-declaration]
We didn't caught this issue previously on other platforms because
CONFIG_RTE_FORCE_INTRINSICS enabled by default only for armv8.
Fixes: 7bdccb93078e ("eal: fix ARM build with clang")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
---
lib/librte_eal/common/include/generic/rte_atomic.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/librte_eal/common/include/generic/rte_atomic.h b/lib/librte_eal/common/include/generic/rte_atomic.h
index d0c464fb1..4afd1acc3 100644
--- a/lib/librte_eal/common/include/generic/rte_atomic.h
+++ b/lib/librte_eal/common/include/generic/rte_atomic.h
@@ -213,5 +213,5 @@ static inline uint16_t
rte_atomic16_exchange(volatile uint16_t *dst, uint16_t val)
{
-#if defined(RTE_ARCH_ARM64) && defined(__clang__)
+#if defined(__clang__)
return __atomic_exchange_n(dst, val, __ATOMIC_SEQ_CST);
#else
@@ -496,5 +496,5 @@ static inline uint32_t
rte_atomic32_exchange(volatile uint32_t *dst, uint32_t val)
{
-#if defined(RTE_ARCH_ARM64) && defined(__clang__)
+#if defined(__clang__)
return __atomic_exchange_n(dst, val, __ATOMIC_SEQ_CST);
#else
@@ -778,5 +778,5 @@ static inline uint64_t
rte_atomic64_exchange(volatile uint64_t *dst, uint64_t val)
{
-#if defined(RTE_ARCH_ARM64) && defined(__clang__)
+#if defined(__clang__)
return __atomic_exchange_n(dst, val, __ATOMIC_SEQ_CST);
#else
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:55.921072704 +0000
+++ 0017-eal-fix-clang-build-with-intrinsics-forced.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From 6406d70561e44474b27646f74b3863929019b1f1 Mon Sep 17 00:00:00 2001
+From 04ceac036c5165eb9dd7539ce636ca3344abd957 Mon Sep 17 00:00:00 2001
From: Ilya Maximets <i.maximets@samsung.com>
Date: Tue, 15 Jan 2019 14:29:39 +0300
Subject: [PATCH] eal: fix clang build with intrinsics forced
+[ upstream commit 6406d70561e44474b27646f74b3863929019b1f1 ]
+
This fixes x86_64-native-linuxapp-clang build with
CONFIG_RTE_FORCE_INTRINSICS=y:
@@ -22,7 +24,6 @@
CONFIG_RTE_FORCE_INTRINSICS enabled by default only for armv8.
Fixes: 7bdccb93078e ("eal: fix ARM build with clang")
-Cc: stable@dpdk.org
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
---
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'build: fix meson check for binutils 2.30' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (15 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'eal: fix clang build with intrinsics forced' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'app/pdump: fix vdev cleanup' " Kevin Traynor
` (49 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Harry van Haaren; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From b5d310d08c11fc7f55142fdaaec93dbdd33e3f2d Mon Sep 17 00:00:00 2001
From: Harry van Haaren <harry.van.haaren@intel.com>
Date: Thu, 17 Jan 2019 17:17:44 +0000
Subject: [PATCH] build: fix meson check for binutils 2.30
[ upstream commit 566b4d7a968fa454ff7deab7c43216712878af30 ]
This commit reworks the checks for binutils 2.30 and how
the flags to disable AVX512F are passed to the compiler.
Previously the #define for including AVX512 code was set,
while the -mno-avx512f argument was given to the compiler.
This would cause gcc to correctly refuse to emit AVX512
instructions, but the rte_memcpy code that includes AVX512
optimizations was being added to the build.
The check for binutils check is now moved to x86 as it is
irrelevant for other architectures, and the -mno-avx512f
flag is passed to a march_opts array in meson. As the
-mno-avx512 flag is added earlier in the build, the code
in rte_memcpy is no longer attempted to be compiled.
This commit also adds a message print in the meson configure
stage to alert the user of the workaround being employed.
Fixes: a32ca9a4ebc1 ("mk: fix scope of disabling AVX512F support")
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
config/meson.build | 8 --------
config/x86/meson.build | 11 ++++++++++-
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/config/meson.build b/config/meson.build
index 40802fc88..db32499b3 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -44,12 +44,4 @@ dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain)
dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper(), 1)
-# get binutils version for the workaround of Bug 97
-ldver = run_command('ld', '-v').stdout().strip()
-if ldver.contains('2.30')
- if cc.has_argument('-mno-avx512f')
- machine_args += '-mno-avx512f'
- endif
-endif
-
add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
dpdk_extra_ldflags += '-Wl,--no-as-needed'
diff --git a/config/x86/meson.build b/config/x86/meson.build
index 33efb5e54..9e5952aa3 100644
--- a/config/x86/meson.build
+++ b/config/x86/meson.build
@@ -3,5 +3,14 @@
# for checking defines we need to use the correct compiler flags
-march_opt = '-march=@0@'.format(machine)
+march_opt = ['-march=@0@'.format(machine)]
+
+# get binutils version for the workaround of Bug 97
+ldver = run_command('ld', '-v').stdout().strip()
+if ldver.contains('2.30')
+ if cc.has_argument('-mno-avx512f')
+ march_opt += '-mno-avx512f'
+ message('Binutils 2.30 detected, disabling AVX512 support as workaround for bug #97')
+ endif
+endif
# we require SSE4.2 for DPDK
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:55.944295528 +0000
+++ 0018-build-fix-meson-check-for-binutils-2.30.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From 566b4d7a968fa454ff7deab7c43216712878af30 Mon Sep 17 00:00:00 2001
+From b5d310d08c11fc7f55142fdaaec93dbdd33e3f2d Mon Sep 17 00:00:00 2001
From: Harry van Haaren <harry.van.haaren@intel.com>
Date: Thu, 17 Jan 2019 17:17:44 +0000
Subject: [PATCH] build: fix meson check for binutils 2.30
+[ upstream commit 566b4d7a968fa454ff7deab7c43216712878af30 ]
+
This commit reworks the checks for binutils 2.30 and how
the flags to disable AVX512F are passed to the compiler.
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'app/pdump: fix vdev cleanup' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (16 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'build: fix meson check for binutils 2.30' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'gro: check invalid TCP header length' " Kevin Traynor
` (48 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Reshma Pattan; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From b438d916cf8480f692f1ec3337f034d35c814fd4 Mon Sep 17 00:00:00 2001
From: Reshma Pattan <reshma.pattan@intel.com>
Date: Tue, 15 Jan 2019 13:45:04 +0000
Subject: [PATCH] app/pdump: fix vdev cleanup
[ upstream commit 35cb223ab7be6791fa68698c05b94b843b8a5fda ]
Virtual devices added in pdump application
using rte_eal_hotplug_add should be removed explicitly
while exiting the pdump application, otherwise the
subsequent run of the pdump application will fail with the reason
that virtual devices with the same name already exists in primary.
Fixes: 6362f362a2 ("app/pdump: use EAL hotplug instead of ethdev attach")
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
app/pdump/main.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/app/pdump/main.c b/app/pdump/main.c
index 9e86bf623..5e183ea90 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -495,4 +495,5 @@ cleanup_pdump_resources(void)
int i;
struct pdump_tuples *pt;
+ char name[RTE_ETH_NAME_MAX_LEN];
/* disable pdump and free the pdump_tuple resources */
@@ -511,4 +512,12 @@ cleanup_pdump_resources(void)
if (pt->dir & RTE_PDUMP_FLAG_TX)
free_ring_data(pt->tx_ring, pt->tx_vdev_id, &pt->stats);
+
+ /* Remove the vdev created */
+ rte_eth_dev_get_name_by_port(pt->rx_vdev_id, name);
+ rte_eal_hotplug_remove("vdev", name);
+
+ rte_eth_dev_get_name_by_port(pt->tx_vdev_id, name);
+ rte_eal_hotplug_remove("vdev", name);
+
}
cleanup_rings();
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:55.966737269 +0000
+++ 0019-app-pdump-fix-vdev-cleanup.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From 35cb223ab7be6791fa68698c05b94b843b8a5fda Mon Sep 17 00:00:00 2001
+From b438d916cf8480f692f1ec3337f034d35c814fd4 Mon Sep 17 00:00:00 2001
From: Reshma Pattan <reshma.pattan@intel.com>
Date: Tue, 15 Jan 2019 13:45:04 +0000
Subject: [PATCH] app/pdump: fix vdev cleanup
+[ upstream commit 35cb223ab7be6791fa68698c05b94b843b8a5fda ]
+
Virtual devices added in pdump application
using rte_eal_hotplug_add should be removed explicitly
while exiting the pdump application, otherwise the
@@ -10,7 +12,6 @@
that virtual devices with the same name already exists in primary.
Fixes: 6362f362a2 ("app/pdump: use EAL hotplug instead of ethdev attach")
-Cc: stable@dpdk.org
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'gro: check invalid TCP header length' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (17 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'app/pdump: fix vdev cleanup' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'doc: add GRO limitations in programmers guide' " Kevin Traynor
` (47 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Jiayu Hu; +Cc: Yinan Wang, Konstantin Ananyev, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From b263fe2abfb121b93eeeed9c2ab452fb67fa8db1 Mon Sep 17 00:00:00 2001
From: Jiayu Hu <jiayu.hu@intel.com>
Date: Wed, 16 Jan 2019 08:45:33 +0800
Subject: [PATCH] gro: check invalid TCP header length
[ upstream commit 7ccc7a05d6ce57a8db88ccc70d507e7e3d51cd37 ]
When the TCP header length of input packets is invalid (i.e., less
than 20 bytes or greater than 60 bytes), check_seq_option() will
access illegal memory area when compare TCP Options, which may
cause a segmentation fault.
This patch adds missing invalid TCP header length check to avoid
illegal memory accesses.
Fixes: 0d2cbe59b719 ("lib/gro: support TCP/IPv4")
Fixes: 9e0b9d2ec0f4 ("gro: support VxLAN GRO")
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Tested-by: Yinan Wang <yinan.wang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
lib/librte_gro/gro_tcp4.c | 7 +++++++
lib/librte_gro/gro_tcp4.h | 5 +++++
lib/librte_gro/gro_vxlan_tcp4.c | 7 +++++++
3 files changed, 19 insertions(+)
diff --git a/lib/librte_gro/gro_tcp4.c b/lib/librte_gro/gro_tcp4.c
index 2fe9aab3e..7d128a431 100644
--- a/lib/librte_gro/gro_tcp4.c
+++ b/lib/librte_gro/gro_tcp4.c
@@ -209,4 +209,11 @@ gro_tcp4_reassemble(struct rte_mbuf *pkt,
uint8_t find;
+ /*
+ * Don't process the packet whose TCP header length is greater
+ * than 60 bytes or less than 20 bytes.
+ */
+ if (unlikely(INVALID_TCP_HDRLEN(pkt->l4_len)))
+ return -1;
+
eth_hdr = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
ipv4_hdr = (struct ipv4_hdr *)((char *)eth_hdr + pkt->l2_len);
diff --git a/lib/librte_gro/gro_tcp4.h b/lib/librte_gro/gro_tcp4.h
index 6bb30cdb9..d97924883 100644
--- a/lib/librte_gro/gro_tcp4.h
+++ b/lib/librte_gro/gro_tcp4.h
@@ -18,4 +18,9 @@
#define MAX_IPV4_PKT_LENGTH UINT16_MAX
+/* The maximum TCP header length */
+#define MAX_TCP_HLEN 60
+#define INVALID_TCP_HDRLEN(len) \
+ (((len) < sizeof(struct tcp_hdr)) || ((len) > MAX_TCP_HLEN))
+
/* Header fields representing a TCP/IPv4 flow */
struct tcp4_flow_key {
diff --git a/lib/librte_gro/gro_vxlan_tcp4.c b/lib/librte_gro/gro_vxlan_tcp4.c
index 955ae4b56..acb9bc919 100644
--- a/lib/librte_gro/gro_vxlan_tcp4.c
+++ b/lib/librte_gro/gro_vxlan_tcp4.c
@@ -307,4 +307,11 @@ gro_vxlan_tcp4_reassemble(struct rte_mbuf *pkt,
uint8_t find;
+ /*
+ * Don't process the packet whose TCP header length is greater
+ * than 60 bytes or less than 20 bytes.
+ */
+ if (unlikely(INVALID_TCP_HDRLEN(pkt->l4_len)))
+ return -1;
+
outer_eth_hdr = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
outer_ipv4_hdr = (struct ipv4_hdr *)((char *)outer_eth_hdr +
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:55.991016820 +0000
+++ 0020-gro-check-invalid-TCP-header-length.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From 7ccc7a05d6ce57a8db88ccc70d507e7e3d51cd37 Mon Sep 17 00:00:00 2001
+From b263fe2abfb121b93eeeed9c2ab452fb67fa8db1 Mon Sep 17 00:00:00 2001
From: Jiayu Hu <jiayu.hu@intel.com>
Date: Wed, 16 Jan 2019 08:45:33 +0800
Subject: [PATCH] gro: check invalid TCP header length
+[ upstream commit 7ccc7a05d6ce57a8db88ccc70d507e7e3d51cd37 ]
+
When the TCP header length of input packets is invalid (i.e., less
than 20 bytes or greater than 60 bytes), check_seq_option() will
access illegal memory area when compare TCP Options, which may
@@ -13,7 +15,6 @@
Fixes: 0d2cbe59b719 ("lib/gro: support TCP/IPv4")
Fixes: 9e0b9d2ec0f4 ("gro: support VxLAN GRO")
-Cc: stable@dpdk.org
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Tested-by: Yinan Wang <yinan.wang@intel.com>
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'doc: add GRO limitations in programmers guide' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (18 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'gro: check invalid TCP header length' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'examples/kni: fix crash while handling userspace request' " Kevin Traynor
` (46 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Jiayu Hu; +Cc: Konstantin Ananyev, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From f31db6a62d113c999a2b1db6e234cffb65350077 Mon Sep 17 00:00:00 2001
From: Jiayu Hu <jiayu.hu@intel.com>
Date: Wed, 16 Jan 2019 10:13:42 +0800
Subject: [PATCH] doc: add GRO limitations in programmers guide
[ upstream commit 5bd5f7b3aee8d0d9cef658c47c7f7544e657ae96 ]
This patch adds GRO limitations in the programmer guide.
Fixes: 2c900d09055e ("doc: add GRO guide")
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
.../generic_receive_offload_lib.rst | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/doc/guides/prog_guide/generic_receive_offload_lib.rst b/doc/guides/prog_guide/generic_receive_offload_lib.rst
index 9c6a4d08c..5b3fb91c8 100644
--- a/doc/guides/prog_guide/generic_receive_offload_lib.rst
+++ b/doc/guides/prog_guide/generic_receive_offload_lib.rst
@@ -192,2 +192,21 @@ Header fields deciding if packets are neighbors include:
Additionally, packets which have different value of DF bit can't
be merged.
+
+GRO Library Limitations
+-----------------------
+
+- GRO library uses MBUF->l2_len/l3_len/l4_len/outer_l2_len/
+ outer_l3_len/packet_type to get protocol headers for the
+ input packet, rather than parsing the packet header. Therefore,
+ before call GRO APIs to merge packets, user applications
+ must set MBUF->l2_len/l3_len/l4_len/outer_l2_len/outer_l3_len/
+ packet_type to the same values as the protocol headers of the
+ packet.
+
+- GRO library doesn't support to process the packets with IPv4
+ Options or VLAN tagged.
+
+- GRO library just supports to process the packet organized
+ in a single MBUF. If the input packet consists of multiple
+ MBUFs (i.e. chained MBUFs), GRO reassembly behaviors are
+ unknown.
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.016060600 +0000
+++ 0021-doc-add-GRO-limitations-in-programmers-guide.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,12 +1,13 @@
-From 5bd5f7b3aee8d0d9cef658c47c7f7544e657ae96 Mon Sep 17 00:00:00 2001
+From f31db6a62d113c999a2b1db6e234cffb65350077 Mon Sep 17 00:00:00 2001
From: Jiayu Hu <jiayu.hu@intel.com>
Date: Wed, 16 Jan 2019 10:13:42 +0800
Subject: [PATCH] doc: add GRO limitations in programmers guide
+[ upstream commit 5bd5f7b3aee8d0d9cef658c47c7f7544e657ae96 ]
+
This patch adds GRO limitations in the programmer guide.
Fixes: 2c900d09055e ("doc: add GRO guide")
-Cc: stable@dpdk.org
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'examples/kni: fix crash while handling userspace request' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (19 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'doc: add GRO limitations in programmers guide' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'net/i40e: fix VF overwrite PF RSS LUT for X722' " Kevin Traynor
` (45 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: Phil Yang, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 2bcf25c9a9b8a2ccfcf6dd66491eb1df9623b675 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 15 Jan 2019 17:28:02 +0000
Subject: [PATCH] examples/kni: fix crash while handling userspace request
[ upstream commit 2e06c565651eaca8034c5e3e83f25f24d6b91503 ]
When KNI interface receives RTE_KNI_REQ_CFG_NETWORK_IF request, it
stap/start the physical device which as a result of stop() can free all
the mbufs in its queue.
Meanwhile sample application continues to read from KNI interface queues
and push into device queues. This simultaneous access may cause a crash,
crash log can be found at defect description.
As a solution KNI sample application can do the proper synchronization,
and stop transfer between KNI interface and physical interface while
physical device stop/started.
Bugzilla ID: 116
Fixes: 3fc5ca2f6352 ("kni: initial import")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Phil Yang <phil.yang@arm.com>
---
examples/kni/main.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/examples/kni/main.c b/examples/kni/main.c
index e37b1ad36..a58774a33 100644
--- a/examples/kni/main.c
+++ b/examples/kni/main.c
@@ -133,4 +133,5 @@ static int kni_config_mac_address(uint16_t port_id, uint8_t mac_addr[]);
static rte_atomic32_t kni_stop = RTE_ATOMIC32_INIT(0);
+static rte_atomic32_t kni_pause = RTE_ATOMIC32_INIT(0);
/* Print out statistics on packets handled */
@@ -277,4 +278,5 @@ main_loop(__rte_unused void *arg)
uint16_t i;
int32_t f_stop;
+ int32_t f_pause;
const unsigned lcore_id = rte_lcore_id();
enum lcore_rxtx {
@@ -305,6 +307,9 @@ main_loop(__rte_unused void *arg)
while (1) {
f_stop = rte_atomic32_read(&kni_stop);
+ f_pause = rte_atomic32_read(&kni_pause);
if (f_stop)
break;
+ if (f_pause)
+ continue;
kni_ingress(kni_port_params_array[i]);
}
@@ -315,6 +320,9 @@ main_loop(__rte_unused void *arg)
while (1) {
f_stop = rte_atomic32_read(&kni_stop);
+ f_pause = rte_atomic32_read(&kni_pause);
if (f_stop)
break;
+ if (f_pause)
+ continue;
kni_egress(kni_port_params_array[i]);
}
@@ -808,4 +816,6 @@ kni_config_network_interface(uint16_t port_id, uint8_t if_up)
port_id, if_up ? "up" : "down");
+ rte_atomic32_inc(&kni_pause);
+
if (if_up != 0) { /* Configure network interface up */
rte_eth_dev_stop(port_id);
@@ -814,4 +824,6 @@ kni_config_network_interface(uint16_t port_id, uint8_t if_up)
rte_eth_dev_stop(port_id);
+ rte_atomic32_dec(&kni_pause);
+
if (ret < 0)
RTE_LOG(ERR, APP, "Failed to start port %d\n", port_id);
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.037990014 +0000
+++ 0022-examples-kni-fix-crash-while-handling-userspace-requ.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From 2e06c565651eaca8034c5e3e83f25f24d6b91503 Mon Sep 17 00:00:00 2001
+From 2bcf25c9a9b8a2ccfcf6dd66491eb1df9623b675 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 15 Jan 2019 17:28:02 +0000
Subject: [PATCH] examples/kni: fix crash while handling userspace request
+[ upstream commit 2e06c565651eaca8034c5e3e83f25f24d6b91503 ]
+
When KNI interface receives RTE_KNI_REQ_CFG_NETWORK_IF request, it
stap/start the physical device which as a result of stop() can free all
the mbufs in its queue.
@@ -16,7 +18,6 @@
Bugzilla ID: 116
Fixes: 3fc5ca2f6352 ("kni: initial import")
-Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Phil Yang <phil.yang@arm.com>
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix VF overwrite PF RSS LUT for X722' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (20 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'examples/kni: fix crash while handling userspace request' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'net/mlx5: fix Rx packet padding' " Kevin Traynor
` (44 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Yanglong Wu; +Cc: Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From b7b11844a8b20b39a74ae239b85acc7e2e412056 Mon Sep 17 00:00:00 2001
From: Yanglong Wu <yanglong.wu@intel.com>
Date: Tue, 15 Jan 2019 10:23:45 +0800
Subject: [PATCH] net/i40e: fix VF overwrite PF RSS LUT for X722
[ upstream commit 1d4b2b4966bbb219afd2d7072ffba51f3a3067a5 ]
i40e_aq_set_rss_lut should set register according
to the vsi->type. if not, VF may overwrite the rigister
of PF.
Note, only X722 is impacted, since flag I40E_FLAG_RSS_AQ_CAPABLE
is only enabled on X722.
Fixes: d0a349409bd7 ("i40e: support AQ based RSS config")
Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/i40e/i40e_ethdev.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index a6b97e164..f97cd5348 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -4184,5 +4184,6 @@ i40e_get_rss_lut(struct i40e_vsi *vsi, uint8_t *lut, uint16_t lut_size)
if (pf->flags & I40E_FLAG_RSS_AQ_CAPABLE) {
- ret = i40e_aq_get_rss_lut(hw, vsi->vsi_id, TRUE,
+ ret = i40e_aq_get_rss_lut(hw, vsi->vsi_id,
+ vsi->type != I40E_VSI_SRIOV,
lut, lut_size);
if (ret) {
@@ -4223,5 +4224,6 @@ i40e_set_rss_lut(struct i40e_vsi *vsi, uint8_t *lut, uint16_t lut_size)
if (pf->flags & I40E_FLAG_RSS_AQ_CAPABLE) {
- ret = i40e_aq_set_rss_lut(hw, vsi->vsi_id, TRUE,
+ ret = i40e_aq_set_rss_lut(hw, vsi->vsi_id,
+ vsi->type != I40E_VSI_SRIOV,
lut, lut_size);
if (ret) {
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.061923492 +0000
+++ 0023-net-i40e-fix-VF-overwrite-PF-RSS-LUT-for-X722.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From 1d4b2b4966bbb219afd2d7072ffba51f3a3067a5 Mon Sep 17 00:00:00 2001
+From b7b11844a8b20b39a74ae239b85acc7e2e412056 Mon Sep 17 00:00:00 2001
From: Yanglong Wu <yanglong.wu@intel.com>
Date: Tue, 15 Jan 2019 10:23:45 +0800
Subject: [PATCH] net/i40e: fix VF overwrite PF RSS LUT for X722
+[ upstream commit 1d4b2b4966bbb219afd2d7072ffba51f3a3067a5 ]
+
i40e_aq_set_rss_lut should set register according
to the vsi->type. if not, VF may overwrite the rigister
of PF.
@@ -10,7 +12,6 @@
is only enabled on X722.
Fixes: d0a349409bd7 ("i40e: support AQ based RSS config")
-Cc: stable@dpdk.org
Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix Rx packet padding' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (21 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'net/i40e: fix VF overwrite PF RSS LUT for X722' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'net/mlx5: fix deprecated library API for Rx " Kevin Traynor
` (43 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Yongseok Koh; +Cc: Erez Ferber, Shahaf Shuler, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From e7a7c98c8a710f7d1f614d7635ec1cbc29e61613 Mon Sep 17 00:00:00 2001
From: Yongseok Koh <yskoh@mellanox.com>
Date: Tue, 15 Jan 2019 09:38:58 -0800
Subject: [PATCH] net/mlx5: fix Rx packet padding
[ upstream commit 78c7a16daad1b3948b84399203cf225aa153a45c ]
Rx packet padding is supposed to be set by an environment variable -
MLX5_PMD_ENABLE_PADDING, but it has been missing for some time by mistake.
Rather than using such a variable, a PMD parameter (rxq_pkt_pad_en) is
added instead.
Fixes: a1366b1a2be3 ("net/mlx5: add reference counter on DPDK Rx queues")
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Reviewed-by: Erez Ferber <erezf@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
---
doc/guides/nics/mlx5.rst | 27 +++++++++++++--------------
drivers/net/mlx5/mlx5.c | 18 +++++++++++++++---
2 files changed, 28 insertions(+), 17 deletions(-)
diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index 23f0f5700..436898acd 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -228,18 +228,4 @@ Environment variables
since ``LD_LIBRARY_PATH`` has no effect in this case.
-- ``MLX5_PMD_ENABLE_PADDING``
-
- Enables HW packet padding in PCI bus transactions.
-
- When packet size is cache aligned and CRC stripping is enabled, 4 fewer
- bytes are written to the PCI bus. Enabling padding makes such packets
- aligned again.
-
- In cases where PCI bandwidth is the bottleneck, padding can improve
- performance by 10%.
-
- This is disabled by default since this can also decrease performance for
- unaligned packet sizes.
-
- ``MLX5_SHUT_UP_BF``
@@ -296,4 +282,17 @@ Run-time configuration
- CPU having 128B cacheline with ConnectX-5 and Bluefield.
+- ``rxq_pkt_pad_en`` parameter [int]
+
+ A nonzero value enables padding Rx packet to the size of cacheline on PCI
+ transaction. This feature would waste PCI bandwidth but could improve
+ performance by avoiding partial cacheline write which may cause costly
+ read-modify-copy in memory transaction on some architectures. Disabled by
+ default.
+
+ Supported on:
+
+ - x86_64 with ConnectX-4, ConnectX-4 LX, ConnectX-5, ConnectX-6 and Bluefield.
+ - POWER8 and ARMv8 with ConnectX-4 LX, ConnectX-5, ConnectX-6 and Bluefield.
+
- ``mprq_en`` parameter [int]
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 9e5cab169..50a62b400 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -55,4 +55,7 @@
#define MLX5_RXQ_CQE_PAD_EN "rxq_cqe_pad_en"
+/* Device parameter to enable padding Rx packet to cacheline size. */
+#define MLX5_RXQ_PKT_PAD_EN "rxq_pkt_pad_en"
+
/* Device parameter to enable Multi-Packet Rx queue. */
#define MLX5_RX_MPRQ_EN "mprq_en"
@@ -487,4 +490,6 @@ mlx5_args_check(const char *key, const char *val, void *opaque)
} else if (strcmp(MLX5_RXQ_CQE_PAD_EN, key) == 0) {
config->cqe_pad = !!tmp;
+ } else if (strcmp(MLX5_RXQ_PKT_PAD_EN, key) == 0) {
+ config->hw_padding = !!tmp;
} else if (strcmp(MLX5_RX_MPRQ_EN, key) == 0) {
config->mprq.enabled = !!tmp;
@@ -542,4 +547,5 @@ mlx5_args(struct mlx5_dev_config *config, struct rte_devargs *devargs)
MLX5_RXQ_CQE_COMP_EN,
MLX5_RXQ_CQE_PAD_EN,
+ MLX5_RXQ_PKT_PAD_EN,
MLX5_RX_MPRQ_EN,
MLX5_RX_MPRQ_LOG_STRIDE_NUM,
@@ -736,4 +742,5 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
struct priv *priv = NULL;
int err = 0;
+ unsigned int hw_padding = 0;
unsigned int mps;
unsigned int cqe_comp;
@@ -1055,8 +1062,12 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
(config.hw_fcs_strip ? "" : "not "));
#ifdef HAVE_IBV_WQ_FLAG_RX_END_PADDING
- config.hw_padding = !!attr.rx_pad_end_addr_align;
+ hw_padding = !!attr.rx_pad_end_addr_align;
#endif
- DRV_LOG(DEBUG, "hardware Rx end alignment padding is %ssupported",
- (config.hw_padding ? "" : "not "));
+ if (config.hw_padding && !hw_padding) {
+ DRV_LOG(DEBUG, "Rx end alignment padding isn't supported");
+ config.hw_padding = 0;
+ } else if (config.hw_padding) {
+ DRV_LOG(DEBUG, "Rx end alignment padding is enabled");
+ }
config.tso = (attr.tso_caps.max_tso > 0 &&
(attr.tso_caps.supported_qpts &
@@ -1435,4 +1446,5 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
/* Default configuration. */
dev_config = (struct mlx5_dev_config){
+ .hw_padding = 0,
.mps = MLX5_ARG_UNSET,
.tx_vec_en = 1,
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.096046764 +0000
+++ 0024-net-mlx5-fix-Rx-packet-padding.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,15 +1,16 @@
-From 78c7a16daad1b3948b84399203cf225aa153a45c Mon Sep 17 00:00:00 2001
+From e7a7c98c8a710f7d1f614d7635ec1cbc29e61613 Mon Sep 17 00:00:00 2001
From: Yongseok Koh <yskoh@mellanox.com>
Date: Tue, 15 Jan 2019 09:38:58 -0800
Subject: [PATCH] net/mlx5: fix Rx packet padding
+[ upstream commit 78c7a16daad1b3948b84399203cf225aa153a45c ]
+
Rx packet padding is supposed to be set by an environment variable -
MLX5_PMD_ENABLE_PADDING, but it has been missing for some time by mistake.
Rather than using such a variable, a PMD parameter (rxq_pkt_pad_en) is
added instead.
Fixes: a1366b1a2be3 ("net/mlx5: add reference counter on DPDK Rx queues")
-Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Reviewed-by: Erez Ferber <erezf@mellanox.com>
@@ -20,10 +21,10 @@
2 files changed, 28 insertions(+), 17 deletions(-)
diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
-index 5ddca44ee..3f168b161 100644
+index 23f0f5700..436898acd 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
-@@ -234,18 +234,4 @@ Environment variables
+@@ -228,18 +228,4 @@ Environment variables
since ``LD_LIBRARY_PATH`` has no effect in this case.
-- ``MLX5_PMD_ENABLE_PADDING``
@@ -42,7 +43,7 @@
-
- ``MLX5_SHUT_UP_BF``
-@@ -302,4 +288,17 @@ Run-time configuration
+@@ -296,4 +282,17 @@ Run-time configuration
- CPU having 128B cacheline with ConnectX-5 and Bluefield.
+- ``rxq_pkt_pad_en`` parameter [int]
@@ -61,7 +62,7 @@
- ``mprq_en`` parameter [int]
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
-index a84e1afa0..741bc7fc0 100644
+index 9e5cab169..50a62b400 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -55,4 +55,7 @@
@@ -91,7 +92,7 @@
+ unsigned int hw_padding = 0;
unsigned int mps;
unsigned int cqe_comp;
-@@ -1061,8 +1068,12 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
+@@ -1055,8 +1062,12 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
(config.hw_fcs_strip ? "" : "not "));
#ifdef HAVE_IBV_WQ_FLAG_RX_END_PADDING
- config.hw_padding = !!attr.rx_pad_end_addr_align;
@@ -107,7 +108,7 @@
+ }
config.tso = (attr.tso_caps.max_tso > 0 &&
(attr.tso_caps.supported_qpts &
-@@ -1441,4 +1452,5 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
+@@ -1435,4 +1446,5 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
/* Default configuration. */
dev_config = (struct mlx5_dev_config){
+ .hw_padding = 0,
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix deprecated library API for Rx padding' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (22 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'net/mlx5: fix Rx packet padding' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'net/sfc: fix VF error/missed stats mapping' " Kevin Traynor
` (42 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Yongseok Koh; +Cc: Erez Ferber, Shahaf Shuler, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From aabc995c77956c1b176bf42f140829ab784523b7 Mon Sep 17 00:00:00 2001
From: Yongseok Koh <yskoh@mellanox.com>
Date: Tue, 15 Jan 2019 09:38:59 -0800
Subject: [PATCH] net/mlx5: fix deprecated library API for Rx padding
[ upstream commit 2014a7fbae2be56af7fcffc882a299eb06a6a81c ]
In rdma-core library IBV_WQ_FLAG_RX_END_PADDING is renamed to
IBV_WQ_FLAGS_PCI_WRITE_END_PADDING. Way to query the capability is also
changed.
Fixes: 43e9d9794cde ("net/mlx5: support upstream rdma-core")
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Reviewed-by: Erez Ferber <erezf@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
---
drivers/net/mlx5/Makefile | 5 +++++
drivers/net/mlx5/meson.build | 2 ++
drivers/net/mlx5/mlx5.c | 5 ++++-
drivers/net/mlx5/mlx5_rxq.c | 7 +++++--
4 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile
index 895cdfeed..63dfa45b2 100644
--- a/drivers/net/mlx5/Makefile
+++ b/drivers/net/mlx5/Makefile
@@ -118,4 +118,9 @@ mlx5_autoconf.h.new: $(RTE_SDK)/buildtools/auto-config-h.sh
enum IBV_FLOW_SPEC_MPLS \
$(AUTOCONF_OUTPUT)
+ $Q sh -- '$<' '$@' \
+ HAVE_IBV_WQ_FLAGS_PCI_WRITE_END_PADDING \
+ infiniband/verbs.h \
+ enum IBV_WQ_FLAGS_PCI_WRITE_END_PADDING \
+ $(AUTOCONF_OUTPUT)
$Q sh -- '$<' '$@' \
HAVE_IBV_WQ_FLAG_RX_END_PADDING \
diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
index 28938db0f..de0c32bcf 100644
--- a/drivers/net/mlx5/meson.build
+++ b/drivers/net/mlx5/meson.build
@@ -103,4 +103,6 @@ if build
[ 'HAVE_IBV_DEVICE_MPLS_SUPPORT', 'infiniband/verbs.h',
'IBV_FLOW_SPEC_MPLS' ],
+ [ 'HAVE_IBV_WQ_FLAGS_PCI_WRITE_END_PADDING', 'infiniband/verbs.h',
+ 'IBV_WQ_FLAGS_PCI_WRITE_END_PADDING' ],
[ 'HAVE_IBV_WQ_FLAG_RX_END_PADDING', 'infiniband/verbs.h',
'IBV_WQ_FLAG_RX_END_PADDING' ],
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 50a62b400..e7668bd5d 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1061,6 +1061,9 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
DRV_LOG(DEBUG, "FCS stripping configuration is %ssupported",
(config.hw_fcs_strip ? "" : "not "));
-#ifdef HAVE_IBV_WQ_FLAG_RX_END_PADDING
+#if defined(HAVE_IBV_WQ_FLAG_RX_END_PADDING)
hw_padding = !!attr.rx_pad_end_addr_align;
+#elif defined(HAVE_IBV_WQ_FLAGS_PCI_WRITE_END_PADDING)
+ hw_padding = !!(attr.device_cap_flags_ex &
+ IBV_DEVICE_PCI_WRITE_END_PADDING);
#endif
if (config.hw_padding && !hw_padding) {
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 34c833872..10b6ce0c1 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -882,10 +882,13 @@ mlx5_rxq_ibv_new(struct rte_eth_dev *dev, uint16_t idx)
attr.wq.ibv.comp_mask |= IBV_WQ_INIT_ATTR_FLAGS;
}
-#ifdef HAVE_IBV_WQ_FLAG_RX_END_PADDING
if (config->hw_padding) {
+#if defined(HAVE_IBV_WQ_FLAG_RX_END_PADDING)
attr.wq.ibv.create_flags |= IBV_WQ_FLAG_RX_END_PADDING;
attr.wq.ibv.comp_mask |= IBV_WQ_INIT_ATTR_FLAGS;
- }
+#elif defined(HAVE_IBV_WQ_FLAGS_PCI_WRITE_END_PADDING)
+ attr.wq.ibv.create_flags |= IBV_WQ_FLAGS_PCI_WRITE_END_PADDING;
+ attr.wq.ibv.comp_mask |= IBV_WQ_INIT_ATTR_FLAGS;
#endif
+ }
#ifdef HAVE_IBV_DEVICE_STRIDING_RQ_SUPPORT
attr.wq.mlx5 = (struct mlx5dv_wq_init_attr){
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.121165078 +0000
+++ 0025-net-mlx5-fix-deprecated-library-API-for-Rx-padding.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,14 +1,15 @@
-From 2014a7fbae2be56af7fcffc882a299eb06a6a81c Mon Sep 17 00:00:00 2001
+From aabc995c77956c1b176bf42f140829ab784523b7 Mon Sep 17 00:00:00 2001
From: Yongseok Koh <yskoh@mellanox.com>
Date: Tue, 15 Jan 2019 09:38:59 -0800
Subject: [PATCH] net/mlx5: fix deprecated library API for Rx padding
+[ upstream commit 2014a7fbae2be56af7fcffc882a299eb06a6a81c ]
+
In rdma-core library IBV_WQ_FLAG_RX_END_PADDING is renamed to
IBV_WQ_FLAGS_PCI_WRITE_END_PADDING. Way to query the capability is also
changed.
Fixes: 43e9d9794cde ("net/mlx5: support upstream rdma-core")
-Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Reviewed-by: Erez Ferber <erezf@mellanox.com>
@@ -21,10 +22,10 @@
4 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile
-index 688678ac8..9a7da1819 100644
+index 895cdfeed..63dfa45b2 100644
--- a/drivers/net/mlx5/Makefile
+++ b/drivers/net/mlx5/Makefile
-@@ -121,4 +121,9 @@ mlx5_autoconf.h.new: $(RTE_SDK)/buildtools/auto-config-h.sh
+@@ -118,4 +118,9 @@ mlx5_autoconf.h.new: $(RTE_SDK)/buildtools/auto-config-h.sh
enum IBV_FLOW_SPEC_MPLS \
$(AUTOCONF_OUTPUT)
+ $Q sh -- '$<' '$@' \
@@ -35,10 +36,10 @@
$Q sh -- '$<' '$@' \
HAVE_IBV_WQ_FLAG_RX_END_PADDING \
diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
-index 6413cefd0..4540c455b 100644
+index 28938db0f..de0c32bcf 100644
--- a/drivers/net/mlx5/meson.build
+++ b/drivers/net/mlx5/meson.build
-@@ -104,4 +104,6 @@ if build
+@@ -103,4 +103,6 @@ if build
[ 'HAVE_IBV_DEVICE_MPLS_SUPPORT', 'infiniband/verbs.h',
'IBV_FLOW_SPEC_MPLS' ],
+ [ 'HAVE_IBV_WQ_FLAGS_PCI_WRITE_END_PADDING', 'infiniband/verbs.h',
@@ -46,10 +47,10 @@
[ 'HAVE_IBV_WQ_FLAG_RX_END_PADDING', 'infiniband/verbs.h',
'IBV_WQ_FLAG_RX_END_PADDING' ],
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
-index 741bc7fc0..a913a5955 100644
+index 50a62b400..e7668bd5d 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
-@@ -1067,6 +1067,9 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
+@@ -1061,6 +1061,9 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
DRV_LOG(DEBUG, "FCS stripping configuration is %ssupported",
(config.hw_fcs_strip ? "" : "not "));
-#ifdef HAVE_IBV_WQ_FLAG_RX_END_PADDING
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/sfc: fix VF error/missed stats mapping' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (23 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'net/mlx5: fix deprecated library API for Rx " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'net/sfc: fix datapath name references in logs' " Kevin Traynor
` (41 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Andrew Rybchenko; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 76e8d658e8250200bd2410a18328cf2f8e25f342 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Wed, 16 Jan 2019 09:43:23 +0000
Subject: [PATCH] net/sfc: fix VF error/missed stats mapping
[ upstream commit 24f8a95917b36b313a49bd604c3958f992893efd ]
VADAPTER_RX_OVERFLOW means Rx statistics overflow, not a missed
packet because of overflow.
VADAPTER_RX_BAD_PACKETS accumulates a number of error conditions,
but mainly impossibility to deliver because of no descriptors
available, so it is better to classify it as imissed.
Fixes: 1caab2f1e684 ("net/sfc: add basic statistics")
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
drivers/net/sfc/sfc_ethdev.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 3886daf7a..9f59c8db9 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -538,6 +538,5 @@ sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
mac_stats[EFX_MAC_VADAPTER_TX_MULTICAST_BYTES] +
mac_stats[EFX_MAC_VADAPTER_TX_BROADCAST_BYTES];
- stats->imissed = mac_stats[EFX_MAC_VADAPTER_RX_OVERFLOW];
- stats->ierrors = mac_stats[EFX_MAC_VADAPTER_RX_BAD_PACKETS];
+ stats->imissed = mac_stats[EFX_MAC_VADAPTER_RX_BAD_PACKETS];
stats->oerrors = mac_stats[EFX_MAC_VADAPTER_TX_BAD_PACKETS];
} else {
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.147688785 +0000
+++ 0026-net-sfc-fix-VF-error-missed-stats-mapping.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From 24f8a95917b36b313a49bd604c3958f992893efd Mon Sep 17 00:00:00 2001
+From 76e8d658e8250200bd2410a18328cf2f8e25f342 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Wed, 16 Jan 2019 09:43:23 +0000
Subject: [PATCH] net/sfc: fix VF error/missed stats mapping
+[ upstream commit 24f8a95917b36b313a49bd604c3958f992893efd ]
+
VADAPTER_RX_OVERFLOW means Rx statistics overflow, not a missed
packet because of overflow.
@@ -11,7 +13,6 @@
available, so it is better to classify it as imissed.
Fixes: 1caab2f1e684 ("net/sfc: add basic statistics")
-Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/sfc: fix datapath name references in logs' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (24 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'net/sfc: fix VF error/missed stats mapping' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'vhost: fix memory leak on realloc failure' " Kevin Traynor
` (40 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Ivan Malov; +Cc: Andrew Rybchenko, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From f3f00447301fdf0ce89201ddb0a51ccf93e21de0 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Wed, 16 Jan 2019 12:24:40 +0000
Subject: [PATCH] net/sfc: fix datapath name references in logs
[ upstream commit 7f7bdb5987644dca493573c21cbd02ffdf68c04b ]
Rx and Tx datapath references were mixed up in a couple
of log statements and commentary blocks in the original
commit. Correct datapath name references in said places.
Fixes: f28ede500c2e ("net/sfc: support multi-process")
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
drivers/net/sfc/sfc.h | 2 +-
drivers/net/sfc/sfc_ethdev.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/sfc/sfc.h b/drivers/net/sfc/sfc.h
index 51be44037..0b852340f 100644
--- a/drivers/net/sfc/sfc.h
+++ b/drivers/net/sfc/sfc.h
@@ -252,5 +252,5 @@ struct sfc_adapter {
/*
* Shared memory copy of the Tx datapath name to be used by
- * the secondary process to find Rx datapath to be used.
+ * the secondary process to find Tx datapath to be used.
*/
char *dp_tx_name;
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 9f59c8db9..08d3271cb 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -1863,5 +1863,5 @@ sfc_eth_dev_secondary_set_ops(struct rte_eth_dev *dev)
dp_rx = sfc_dp_find_rx_by_name(&sfc_dp_head, sa->dp_rx_name);
if (dp_rx == NULL) {
- sfc_err(sa, "cannot find %s Rx datapath", sa->dp_tx_name);
+ sfc_err(sa, "cannot find %s Rx datapath", sa->dp_rx_name);
rc = ENOENT;
goto fail_dp_rx;
@@ -1869,5 +1869,5 @@ sfc_eth_dev_secondary_set_ops(struct rte_eth_dev *dev)
if (~dp_rx->features & SFC_DP_RX_FEAT_MULTI_PROCESS) {
sfc_err(sa, "%s Rx datapath does not support multi-process",
- sa->dp_tx_name);
+ sa->dp_rx_name);
rc = EINVAL;
goto fail_dp_rx_multi_process;
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.171102218 +0000
+++ 0027-net-sfc-fix-datapath-name-references-in-logs.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,14 +1,15 @@
-From 7f7bdb5987644dca493573c21cbd02ffdf68c04b Mon Sep 17 00:00:00 2001
+From f3f00447301fdf0ce89201ddb0a51ccf93e21de0 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Wed, 16 Jan 2019 12:24:40 +0000
Subject: [PATCH] net/sfc: fix datapath name references in logs
+[ upstream commit 7f7bdb5987644dca493573c21cbd02ffdf68c04b ]
+
Rx and Tx datapath references were mixed up in a couple
of log statements and commentary blocks in the original
commit. Correct datapath name references in said places.
Fixes: f28ede500c2e ("net/sfc: support multi-process")
-Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'vhost: fix memory leak on realloc failure' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (25 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'net/sfc: fix datapath name references in logs' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'examples/vhost: fix path allocation failure handling' " Kevin Traynor
` (39 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Tiwei Bie; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 7144e55e3fd22598117d70241c0925f6b4a8eea2 Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Tue, 15 Jan 2019 15:13:23 +0800
Subject: [PATCH] vhost: fix memory leak on realloc failure
[ upstream commit e1c0834f95597b1d5a889532281eb2fde6774ddd ]
When realloc() fails, the original block isn't freed.
Fixes: e246896178e6 ("vhost: get guest/host physical address mappings")
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
lib/librte_vhost/vhost_user.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 401c4aa7b..19e04c953 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -734,11 +734,14 @@ add_one_guest_page(struct virtio_net *dev, uint64_t guest_phys_addr,
{
struct guest_page *page, *last_page;
+ struct guest_page *old_pages;
if (dev->nr_guest_pages == dev->max_guest_pages) {
dev->max_guest_pages *= 2;
+ old_pages = dev->guest_pages;
dev->guest_pages = realloc(dev->guest_pages,
dev->max_guest_pages * sizeof(*page));
if (!dev->guest_pages) {
RTE_LOG(ERR, VHOST_CONFIG, "cannot realloc guest_pages\n");
+ free(old_pages);
return -1;
}
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.195104917 +0000
+++ 0028-vhost-fix-memory-leak-on-realloc-failure.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,12 +1,13 @@
-From e1c0834f95597b1d5a889532281eb2fde6774ddd Mon Sep 17 00:00:00 2001
+From 7144e55e3fd22598117d70241c0925f6b4a8eea2 Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Tue, 15 Jan 2019 15:13:23 +0800
Subject: [PATCH] vhost: fix memory leak on realloc failure
+[ upstream commit e1c0834f95597b1d5a889532281eb2fde6774ddd ]
+
When realloc() fails, the original block isn't freed.
Fixes: e246896178e6 ("vhost: get guest/host physical address mappings")
-Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -15,7 +16,7 @@
1 file changed, 3 insertions(+)
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
-index f2f30369b..78be6cfa5 100644
+index 401c4aa7b..19e04c953 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -734,11 +734,14 @@ add_one_guest_page(struct virtio_net *dev, uint64_t guest_phys_addr,
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'examples/vhost: fix path allocation failure handling' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (26 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'vhost: fix memory leak on realloc failure' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'net/sfc: fix Rx packets counter' " Kevin Traynor
` (38 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Tiwei Bie; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 4fef18491498e0e816512f963fb478f6cfc7fc07 Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Tue, 15 Jan 2019 15:13:24 +0800
Subject: [PATCH] examples/vhost: fix path allocation failure handling
[ upstream commit d79035b7dd6e599589552573b53c138f488dead3 ]
Add the missing failure handling for path allocation,
as realloc() may fail.
Fixes: ad0eef4d2203 ("examples/vhost: support multiple socket files")
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
examples/vhost/main.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index c4bdd3c43..2261f089f 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -376,9 +376,17 @@ static int
us_vhost_parse_socket_path(const char *q_arg)
{
+ char *old;
+
/* parse number string */
if (strnlen(q_arg, PATH_MAX) == PATH_MAX)
return -1;
+ old = socket_files;
socket_files = realloc(socket_files, PATH_MAX * (nb_sockets + 1));
+ if (socket_files == NULL) {
+ free(old);
+ return -1;
+ }
+
snprintf(socket_files + nb_sockets * PATH_MAX, PATH_MAX, "%s", q_arg);
nb_sockets++;
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.220680653 +0000
+++ 0029-examples-vhost-fix-path-allocation-failure-handling.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,13 +1,14 @@
-From d79035b7dd6e599589552573b53c138f488dead3 Mon Sep 17 00:00:00 2001
+From 4fef18491498e0e816512f963fb478f6cfc7fc07 Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Tue, 15 Jan 2019 15:13:24 +0800
Subject: [PATCH] examples/vhost: fix path allocation failure handling
+[ upstream commit d79035b7dd6e599589552573b53c138f488dead3 ]
+
Add the missing failure handling for path allocation,
as realloc() may fail.
Fixes: ad0eef4d2203 ("examples/vhost: support multiple socket files")
-Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -16,10 +17,10 @@
1 file changed, 8 insertions(+)
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
-index 645cf51e9..5e914f58e 100644
+index c4bdd3c43..2261f089f 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
-@@ -354,9 +354,17 @@ static int
+@@ -376,9 +376,17 @@ static int
us_vhost_parse_socket_path(const char *q_arg)
{
+ char *old;
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/sfc: fix Rx packets counter' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (27 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'examples/vhost: fix path allocation failure handling' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'doc: fix ifc naming' " Kevin Traynor
` (37 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Andrew Rybchenko; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 99bb9ff6d83ab567be02618608e8ffe8c5c1fdfa Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Thu, 17 Jan 2019 06:17:32 +0000
Subject: [PATCH] net/sfc: fix Rx packets counter
[ upstream commit ab77a0013a811aacdde49e903786eff7abb308ec ]
Errors, missed and pauses should not be included in delivered
good Rx packets reported by ipackets.
Fixes: 1caab2f1e684 ("net/sfc: add basic statistics")
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
drivers/net/sfc/sfc.h | 2 ++
drivers/net/sfc/sfc_ethdev.c | 31 ++++++++++++++++++++++++++++++-
drivers/net/sfc/sfc_port.c | 14 ++++++++++++++
3 files changed, 46 insertions(+), 1 deletion(-)
diff --git a/drivers/net/sfc/sfc.h b/drivers/net/sfc/sfc.h
index 0b852340f..a94ca8e75 100644
--- a/drivers/net/sfc/sfc.h
+++ b/drivers/net/sfc/sfc.h
@@ -150,4 +150,6 @@ struct sfc_port {
uint32_t mac_stats_mask[EFX_MAC_STATS_MASK_NPAGES];
+
+ uint64_t ipackets;
};
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 08d3271cb..a7322a1eb 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -504,4 +504,27 @@ sfc_tx_queue_release(void *queue)
}
+/*
+ * Some statistics are computed as A - B where A and B each increase
+ * monotonically with some hardware counter(s) and the counters are read
+ * asynchronously.
+ *
+ * If packet X is counted in A, but not counted in B yet, computed value is
+ * greater than real.
+ *
+ * If packet X is not counted in A at the moment of reading the counter,
+ * but counted in B at the moment of reading the counter, computed value
+ * is less than real.
+ *
+ * However, counter which grows backward is worse evil than slightly wrong
+ * value. So, let's try to guarantee that it never happens except may be
+ * the case when the MAC stats are zeroed as a result of a NIC reset.
+ */
+static void
+sfc_update_diff_stat(uint64_t *stat, uint64_t newval)
+{
+ if ((int64_t)(newval - *stat) > 0 || newval == 0)
+ *stat = newval;
+}
+
static int
sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
@@ -541,5 +564,4 @@ sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
stats->oerrors = mac_stats[EFX_MAC_VADAPTER_TX_BAD_PACKETS];
} else {
- stats->ipackets = mac_stats[EFX_MAC_RX_PKTS];
stats->opackets = mac_stats[EFX_MAC_TX_PKTS];
stats->ibytes = mac_stats[EFX_MAC_RX_OCTETS];
@@ -567,4 +589,11 @@ sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
mac_stats[EFX_MAC_RX_JABBER_PKTS];
/* no oerrors counters supported on EF10 */
+
+ /* Exclude missed, errors and pauses from Rx packets */
+ sfc_update_diff_stat(&port->ipackets,
+ mac_stats[EFX_MAC_RX_PKTS] -
+ mac_stats[EFX_MAC_RX_PAUSE_PKTS] -
+ stats->imissed - stats->ierrors);
+ stats->ipackets = port->ipackets;
}
diff --git a/drivers/net/sfc/sfc_port.c b/drivers/net/sfc/sfc_port.c
index 5384dbbdb..5eb4b3aca 100644
--- a/drivers/net/sfc/sfc_port.c
+++ b/drivers/net/sfc/sfc_port.c
@@ -88,4 +88,16 @@ sfc_port_update_mac_stats(struct sfc_adapter *sa)
}
+static void
+sfc_port_reset_sw_stats(struct sfc_adapter *sa)
+{
+ struct sfc_port *port = &sa->port;
+
+ /*
+ * Reset diff stats explicitly since check which does not allow
+ * the statistics to grow backward could deny it.
+ */
+ port->ipackets = 0;
+}
+
int
sfc_port_reset_mac_stats(struct sfc_adapter *sa)
@@ -96,4 +108,6 @@ sfc_port_reset_mac_stats(struct sfc_adapter *sa)
rte_spinlock_lock(&port->mac_stats_lock);
rc = efx_mac_stats_clear(sa->nic);
+ if (rc == 0)
+ sfc_port_reset_sw_stats(sa);
rte_spinlock_unlock(&port->mac_stats_lock);
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.244433764 +0000
+++ 0030-net-sfc-fix-Rx-packets-counter.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,13 +1,14 @@
-From ab77a0013a811aacdde49e903786eff7abb308ec Mon Sep 17 00:00:00 2001
+From 99bb9ff6d83ab567be02618608e8ffe8c5c1fdfa Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Thu, 17 Jan 2019 06:17:32 +0000
Subject: [PATCH] net/sfc: fix Rx packets counter
+[ upstream commit ab77a0013a811aacdde49e903786eff7abb308ec ]
+
Errors, missed and pauses should not be included in delivered
good Rx packets reported by ipackets.
Fixes: 1caab2f1e684 ("net/sfc: add basic statistics")
-Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'doc: fix ifc naming' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (28 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'net/sfc: fix Rx packets counter' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'doc: add missing loopback option in testpmd guide' " Kevin Traynor
` (36 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Rami Rosen; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 31697aa41f9054f96a2108b349e0243fe5b1ada1 Mon Sep 17 00:00:00 2001
From: Rami Rosen <ramirose@gmail.com>
Date: Thu, 17 Jan 2019 16:50:31 +0200
Subject: [PATCH] doc: fix ifc naming
[ upstream commit d690d953a779b4e842e590ec849c5d5a47bca66f ]
This patch fixes an error in ifc NIC document; a previous patch
changed the semantics to use CONFIG_RTE_LIBRTE_IFC_PMD
instead of CONFIG_RTE_LIBRTE_IFCVF_VDPA_PMD,
but the ifc NIC doc file remained with the old name.
Fixes: 4b614e9504a1 ("net/ifc: make driver name consistent")
Signed-off-by: Rami Rosen <ramirose@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
doc/guides/nics/ifc.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/guides/nics/ifc.rst b/doc/guides/nics/ifc.rst
index 48f9adf1d..08fe1d232 100644
--- a/doc/guides/nics/ifc.rst
+++ b/doc/guides/nics/ifc.rst
@@ -20,7 +20,7 @@ Config File Options
The following option can be modified in the ``config`` file.
-- ``CONFIG_RTE_LIBRTE_IFCVF_VDPA_PMD`` (default ``y`` for linux)
+- ``CONFIG_RTE_LIBRTE_IFC_PMD`` (default ``y`` for linux)
- Toggle compilation of the ``librte_ifcvf_vdpa`` driver.
+ Toggle compilation of the ``librte_pmd_ifc`` driver.
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.269536089 +0000
+++ 0031-doc-fix-ifc-naming.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,15 +1,16 @@
-From d690d953a779b4e842e590ec849c5d5a47bca66f Mon Sep 17 00:00:00 2001
+From 31697aa41f9054f96a2108b349e0243fe5b1ada1 Mon Sep 17 00:00:00 2001
From: Rami Rosen <ramirose@gmail.com>
Date: Thu, 17 Jan 2019 16:50:31 +0200
Subject: [PATCH] doc: fix ifc naming
+[ upstream commit d690d953a779b4e842e590ec849c5d5a47bca66f ]
+
This patch fixes an error in ifc NIC document; a previous patch
changed the semantics to use CONFIG_RTE_LIBRTE_IFC_PMD
instead of CONFIG_RTE_LIBRTE_IFCVF_VDPA_PMD,
but the ifc NIC doc file remained with the old name.
Fixes: 4b614e9504a1 ("net/ifc: make driver name consistent")
-Cc: stable@dpdk.org
Signed-off-by: Rami Rosen <ramirose@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -18,7 +19,7 @@
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/guides/nics/ifc.rst b/doc/guides/nics/ifc.rst
-index bdf7b4e4a..12a2a342e 100644
+index 48f9adf1d..08fe1d232 100644
--- a/doc/guides/nics/ifc.rst
+++ b/doc/guides/nics/ifc.rst
@@ -20,7 +20,7 @@ Config File Options
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'doc: add missing loopback option in testpmd guide' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (29 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'doc: fix ifc naming' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'efd: fix tail queue leak' " Kevin Traynor
` (35 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Rami Rosen; +Cc: Bernard Iremonger, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 9847a0bdd887f2dd6854a32598dbf76dcf49eebf Mon Sep 17 00:00:00 2001
From: Rami Rosen <ramirose@gmail.com>
Date: Thu, 17 Jan 2019 13:39:26 +0200
Subject: [PATCH] doc: add missing loopback option in testpmd guide
[ upstream commit 48670ed6f77adb44e696eb2b97592e25a2889fb6 ]
This patch adds a missing topology "loop" mode for port-topology
option in testpmd guide. The testpmd "loop" option
(PORT_TOPOLOGY_LOOP) was added to testpmd parameter
port-topology back in 2014, but it seems that it was never added
to the testpmd guide. This patch adds it in the testpmd guide.
Fixes: 3e2006d6186c ("app/testpmd: add loopback topology")
Signed-off-by: Rami Rosen <ramirose@gmail.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
doc/guides/testpmd_app_ug/run_app.rst | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst
index f717bd3f4..4495ed038 100644
--- a/doc/guides/testpmd_app_ug/run_app.rst
+++ b/doc/guides/testpmd_app_ug/run_app.rst
@@ -197,5 +197,5 @@ The commandline options are:
* ``--port-topology=mode``
- Set port topology, where mode is ``paired`` (the default) or ``chained``.
+ Set port topology, where mode is ``paired`` (the default), ``chained`` or ``loop``.
In ``paired`` mode, the forwarding is between pairs of ports, for example: (0,1), (2,3), (4,5).
@@ -205,4 +205,6 @@ The commandline options are:
The ordering of the ports can be changed using the portlist testpmd runtime function.
+ In ``loop`` mode, ingress traffic is simply transmitted back on the same interface.
+
* ``--forward-mode=mode``
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.291510176 +0000
+++ 0032-doc-add-missing-loopback-option-in-testpmd-guide.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From 48670ed6f77adb44e696eb2b97592e25a2889fb6 Mon Sep 17 00:00:00 2001
+From 9847a0bdd887f2dd6854a32598dbf76dcf49eebf Mon Sep 17 00:00:00 2001
From: Rami Rosen <ramirose@gmail.com>
Date: Thu, 17 Jan 2019 13:39:26 +0200
Subject: [PATCH] doc: add missing loopback option in testpmd guide
+[ upstream commit 48670ed6f77adb44e696eb2b97592e25a2889fb6 ]
+
This patch adds a missing topology "loop" mode for port-topology
option in testpmd guide. The testpmd "loop" option
(PORT_TOPOLOGY_LOOP) was added to testpmd parameter
@@ -10,7 +12,6 @@
to the testpmd guide. This patch adds it in the testpmd guide.
Fixes: 3e2006d6186c ("app/testpmd: add loopback topology")
-Cc: stable@dpdk.org
Signed-off-by: Rami Rosen <ramirose@gmail.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'efd: fix tail queue leak' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (30 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'doc: add missing loopback option in testpmd guide' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'bus/ifpga: fix build for cpp applications' " Kevin Traynor
` (34 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Hari Kumar Vemula
Cc: Honnappa Nagarahalli, Reshma Pattan, Pablo de Lara, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From b6b78b5e02731b2a1161eadeb2aa8feaba2feb79 Mon Sep 17 00:00:00 2001
From: Hari Kumar Vemula <hari.kumarx.vemula@intel.com>
Date: Fri, 18 Jan 2019 07:40:42 +0000
Subject: [PATCH] efd: fix tail queue leak
[ upstream commit c749c032252997cf50cbe3620a7edd30532423af ]
In rte_efd_create() allocated memory for tail queue entry but
not freed.
Added freeing the tail queue entry.
Fixes: 56b6ef874f80 ("efd: new Elastic Flow Distributor library")
Signed-off-by: Hari Kumar Vemula <hari.kumarx.vemula@intel.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
lib/librte_efd/rte_efd.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/lib/librte_efd/rte_efd.c b/lib/librte_efd/rte_efd.c
index e6e5cfda2..1a97ece05 100644
--- a/lib/librte_efd/rte_efd.c
+++ b/lib/librte_efd/rte_efd.c
@@ -741,4 +741,6 @@ rte_efd_free(struct rte_efd_table *table)
{
uint8_t socket_id;
+ struct rte_efd_list *efd_list;
+ struct rte_tailq_entry *te, *temp;
if (table == NULL)
@@ -748,4 +750,16 @@ rte_efd_free(struct rte_efd_table *table)
rte_free(table->chunks[socket_id]);
+ efd_list = RTE_TAILQ_CAST(rte_efd_tailq.head, rte_efd_list);
+ rte_rwlock_write_lock(RTE_EAL_TAILQ_RWLOCK);
+
+ TAILQ_FOREACH_SAFE(te, efd_list, next, temp) {
+ if (te->data == (void *) table) {
+ TAILQ_REMOVE(efd_list, te, next);
+ rte_free(te);
+ break;
+ }
+ }
+
+ rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK);
rte_ring_free(table->free_slots);
rte_free(table->offline_chunks);
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.314034743 +0000
+++ 0033-efd-fix-tail-queue-leak.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,14 +1,15 @@
-From c749c032252997cf50cbe3620a7edd30532423af Mon Sep 17 00:00:00 2001
+From b6b78b5e02731b2a1161eadeb2aa8feaba2feb79 Mon Sep 17 00:00:00 2001
From: Hari Kumar Vemula <hari.kumarx.vemula@intel.com>
Date: Fri, 18 Jan 2019 07:40:42 +0000
Subject: [PATCH] efd: fix tail queue leak
+[ upstream commit c749c032252997cf50cbe3620a7edd30532423af ]
+
In rte_efd_create() allocated memory for tail queue entry but
not freed.
Added freeing the tail queue entry.
Fixes: 56b6ef874f80 ("efd: new Elastic Flow Distributor library")
-Cc: stable@dpdk.org
Signed-off-by: Hari Kumar Vemula <hari.kumarx.vemula@intel.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'bus/ifpga: fix build for cpp applications' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (31 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'efd: fix tail queue leak' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'bus/ifpga: fix forcing optional devargs' " Kevin Traynor
` (33 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Andy Pei; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 676587c9032e88eb72684a4d7eef1a5f193c6b7f Mon Sep 17 00:00:00 2001
From: Andy Pei <andy.pei@intel.com>
Date: Fri, 18 Jan 2019 11:09:33 +0000
Subject: [PATCH] bus/ifpga: fix build for cpp applications
[ upstream commit 03eab74ecb8d0249d655f2cd6c15abac764ca7d1 ]
Brackets unmatch when __cplusplus defined.
Fixes: 05fa3d4a6539 ("bus/ifpga: add Intel FPGA bus library")
Signed-off-by: Andy Pei <andy.pei@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/bus/ifpga/rte_bus_ifpga.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/bus/ifpga/rte_bus_ifpga.h b/drivers/bus/ifpga/rte_bus_ifpga.h
index d53c0f483..0bf43ba88 100644
--- a/drivers/bus/ifpga/rte_bus_ifpga.h
+++ b/drivers/bus/ifpga/rte_bus_ifpga.h
@@ -14,5 +14,5 @@
#ifdef __cplusplus
extern "C" {
-#endif
+#endif /* __cplusplus */
#include <rte_bus.h>
@@ -144,3 +144,7 @@ RTE_PMD_EXPORT_NAME(nm, __COUNTER__)
static const char *afudrvinit_ ## nm ## _alias = RTE_STR(alias)
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#endif /* _RTE_BUS_IFPGA_H_ */
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.338533267 +0000
+++ 0034-bus-ifpga-fix-build-for-cpp-applications.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,12 +1,13 @@
-From 03eab74ecb8d0249d655f2cd6c15abac764ca7d1 Mon Sep 17 00:00:00 2001
+From 676587c9032e88eb72684a4d7eef1a5f193c6b7f Mon Sep 17 00:00:00 2001
From: Andy Pei <andy.pei@intel.com>
Date: Fri, 18 Jan 2019 11:09:33 +0000
Subject: [PATCH] bus/ifpga: fix build for cpp applications
+[ upstream commit 03eab74ecb8d0249d655f2cd6c15abac764ca7d1 ]
+
Brackets unmatch when __cplusplus defined.
Fixes: 05fa3d4a6539 ("bus/ifpga: add Intel FPGA bus library")
-Cc: stable@dpdk.org
Signed-off-by: Andy Pei <andy.pei@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'bus/ifpga: fix forcing optional devargs' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (32 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'bus/ifpga: fix build for cpp applications' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'bus/ifpga: fix AFU probe failure handler' " Kevin Traynor
` (32 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Andy Pei; +Cc: Rosen Xu, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From d25eaae5ce2abd7dbd18c146c98e287eb313f3de Mon Sep 17 00:00:00 2001
From: Andy Pei <andy.pei@intel.com>
Date: Fri, 18 Jan 2019 11:07:01 +0000
Subject: [PATCH] bus/ifpga: fix forcing optional devargs
[ upstream commit 6fa4aa2b36459d6cba8c01a243a527ad12444247 ]
Original driver requires users to input "afu_bts" args.
But driver can also work without an explicit "afu_bts" args.
Fixes: 05fa3d4a6539 ("bus/ifpga: add Intel FPGA bus library")
Signed-off-by: Andy Pei <andy.pei@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
---
drivers/bus/ifpga/ifpga_bus.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c
index 5f23ed8b4..e4b7b6f50 100644
--- a/drivers/bus/ifpga/ifpga_bus.c
+++ b/drivers/bus/ifpga/ifpga_bus.c
@@ -126,13 +126,11 @@ ifpga_scan_one(struct rte_rawdev *rawdev,
goto end;
}
+ afu_pr_conf.pr_enable = 1;
} else {
- IFPGA_BUS_ERR("arg %s is mandatory for ifpga bus",
- IFPGA_AFU_BTS);
- goto end;
+ afu_pr_conf.pr_enable = 0;
}
afu_pr_conf.afu_id.uuid.uuid_low = 0;
afu_pr_conf.afu_id.uuid.uuid_high = 0;
- afu_pr_conf.pr_enable = path?1:0;
if (ifpga_find_afu_dev(rawdev, &afu_pr_conf.afu_id))
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.360379275 +0000
+++ 0035-bus-ifpga-fix-forcing-optional-devargs.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,13 +1,14 @@
-From 6fa4aa2b36459d6cba8c01a243a527ad12444247 Mon Sep 17 00:00:00 2001
+From d25eaae5ce2abd7dbd18c146c98e287eb313f3de Mon Sep 17 00:00:00 2001
From: Andy Pei <andy.pei@intel.com>
Date: Fri, 18 Jan 2019 11:07:01 +0000
Subject: [PATCH] bus/ifpga: fix forcing optional devargs
+[ upstream commit 6fa4aa2b36459d6cba8c01a243a527ad12444247 ]
+
Original driver requires users to input "afu_bts" args.
But driver can also work without an explicit "afu_bts" args.
Fixes: 05fa3d4a6539 ("bus/ifpga: add Intel FPGA bus library")
-Cc: stable@dpdk.org
Signed-off-by: Andy Pei <andy.pei@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'bus/ifpga: fix AFU probe failure handler' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (33 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'bus/ifpga: fix forcing optional devargs' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'raw/ifpga: fix memory leak' " Kevin Traynor
` (31 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Andy Pei; +Cc: Ferruh Yigit, Rosen Xu, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From d2c2e9f198ddaccdd7be8f39646129e5920cb637 Mon Sep 17 00:00:00 2001
From: Andy Pei <andy.pei@intel.com>
Date: Fri, 18 Jan 2019 11:12:33 +0000
Subject: [PATCH] bus/ifpga: fix AFU probe failure handler
[ upstream commit fb87e55abac808bdda60e114a6817ab6e812ec16 ]
In the original code, when an AFU device probe a driver,
if the first driver in the driver list does not support
this device or some error happens, bus probe returns an error.
With this patch, a device will try to match driver in the driver
list one by one until an appropriate driver is found.
If some error happens, the error is returned. If the current driver
does not support the device, just try the next driver in the list.
If all the drivers in the list are tried and no driver matches,
0 is returned. Otherwise, the error code is returned.
Fixes: 05fa3d4a6539 ("bus/ifpga: add Intel FPGA bus library")
Signed-off-by: Andy Pei <andy.pei@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
---
drivers/bus/ifpga/ifpga_bus.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c
index e4b7b6f50..55d3abf9f 100644
--- a/drivers/bus/ifpga/ifpga_bus.c
+++ b/drivers/bus/ifpga/ifpga_bus.c
@@ -307,10 +307,17 @@ ifpga_probe_all_drivers(struct rte_afu_device *afu_dev)
TAILQ_FOREACH(drv, &ifpga_afu_drv_list, next) {
- if (ifpga_probe_one_driver(drv, afu_dev)) {
- ret = -1;
- break;
- }
+ ret = ifpga_probe_one_driver(drv, afu_dev);
+ if (ret < 0)
+ /* negative value is an error */
+ return ret;
+ if (ret > 0)
+ /* positive value means driver doesn't support it */
+ continue;
+ return 0;
}
- return ret;
+ if ((ret > 0) && (afu_dev->driver == NULL))
+ return 0;
+ else
+ return ret;
}
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.382519301 +0000
+++ 0036-bus-ifpga-fix-AFU-probe-failure-handler.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From fb87e55abac808bdda60e114a6817ab6e812ec16 Mon Sep 17 00:00:00 2001
+From d2c2e9f198ddaccdd7be8f39646129e5920cb637 Mon Sep 17 00:00:00 2001
From: Andy Pei <andy.pei@intel.com>
Date: Fri, 18 Jan 2019 11:12:33 +0000
Subject: [PATCH] bus/ifpga: fix AFU probe failure handler
+[ upstream commit fb87e55abac808bdda60e114a6817ab6e812ec16 ]
+
In the original code, when an AFU device probe a driver,
if the first driver in the driver list does not support
this device or some error happens, bus probe returns an error.
@@ -17,7 +19,6 @@
0 is returned. Otherwise, the error code is returned.
Fixes: 05fa3d4a6539 ("bus/ifpga: add Intel FPGA bus library")
-Cc: stable@dpdk.org
Signed-off-by: Andy Pei <andy.pei@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'raw/ifpga: fix memory leak' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (34 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'bus/ifpga: fix AFU probe failure handler' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'net/qede: fix performance bottleneck in Rx path' " Kevin Traynor
` (30 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Andy Pei; +Cc: Tianfei Zhang, Rosen Xu, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 7e4b72b1d9434fea1c0c4b327897d3ffc5ba1205 Mon Sep 17 00:00:00 2001
From: Andy Pei <andy.pei@intel.com>
Date: Fri, 18 Jan 2019 11:14:33 +0000
Subject: [PATCH] raw/ifpga: fix memory leak
[ upstream commit 3c69149a21be9f21da4d36bcf851762d81e873c1 ]
When ifpga_rawdev_create() allocate memory for a new rawdev,
the original code allocate redundant memory for adapter,
which is a member of the rawdev. What is actually necessary is
the adapter to be initialized, not memory allocated.
Fixes: ef1e8ede3da5 ("raw/ifpga: add Intel FPGA bus rawdev driver")
Signed-off-by: Andy Pei <andy.pei@intel.com>
Acked-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
---
drivers/raw/ifpga_rawdev/base/opae_hw_api.c | 14 +++++++-------
drivers/raw/ifpga_rawdev/base/opae_hw_api.h | 3 ++-
drivers/raw/ifpga_rawdev/ifpga_rawdev.c | 12 ++++--------
3 files changed, 13 insertions(+), 16 deletions(-)
diff --git a/drivers/raw/ifpga_rawdev/base/opae_hw_api.c b/drivers/raw/ifpga_rawdev/base/opae_hw_api.c
index a533dfea8..1541b6798 100644
--- a/drivers/raw/ifpga_rawdev/base/opae_hw_api.c
+++ b/drivers/raw/ifpga_rawdev/base/opae_hw_api.c
@@ -304,16 +304,16 @@ static struct opae_adapter_ops *match_ops(struct opae_adapter *adapter)
/**
- * opae_adapter_data_alloc - alloc opae_adapter_data data structure
+ * opae_adapter_init - init opae_adapter data structure
+ * @adapter: pointer of opae_adapter data structure
* @name: adapter name.
* @data: private data of this adapter.
*
- * Return: opae_adapter on success, otherwise NULL.
+ * Return: 0 on success.
*/
-struct opae_adapter *opae_adapter_alloc(const char *name, void *data)
+int opae_adapter_init(struct opae_adapter *adapter,
+ const char *name, void *data)
{
- struct opae_adapter *adapter = opae_zmalloc(sizeof(*adapter));
-
if (!adapter)
- return NULL;
+ return -ENOMEM;
TAILQ_INIT(&adapter->acc_list);
@@ -322,5 +322,5 @@ struct opae_adapter *opae_adapter_alloc(const char *name, void *data)
adapter->ops = match_ops(adapter);
- return adapter;
+ return 0;
}
diff --git a/drivers/raw/ifpga_rawdev/base/opae_hw_api.h b/drivers/raw/ifpga_rawdev/base/opae_hw_api.h
index 4bbc9df5c..332e0f3f6 100644
--- a/drivers/raw/ifpga_rawdev/base/opae_hw_api.h
+++ b/drivers/raw/ifpga_rawdev/base/opae_hw_api.h
@@ -226,5 +226,6 @@ void *opae_adapter_data_alloc(enum opae_adapter_type type);
#define opae_adapter_data_free(data) opae_free(data)
-struct opae_adapter *opae_adapter_alloc(const char *name, void *data);
+int opae_adapter_init(struct opae_adapter *adapter,
+ const char *name, void *data);
#define opae_adapter_free(adapter) opae_free(adapter)
diff --git a/drivers/raw/ifpga_rawdev/ifpga_rawdev.c b/drivers/raw/ifpga_rawdev/ifpga_rawdev.c
index 32e318fc3..da772d026 100644
--- a/drivers/raw/ifpga_rawdev/ifpga_rawdev.c
+++ b/drivers/raw/ifpga_rawdev/ifpga_rawdev.c
@@ -410,7 +410,8 @@ ifpga_rawdev_create(struct rte_pci_device *pci_dev,
data->vendor_id = pci_dev->id.vendor_id;
+ adapter = rawdev->dev_private;
/* create a opae_adapter based on above device data */
- adapter = opae_adapter_alloc(pci_dev->device.name, data);
- if (!adapter) {
+ ret = opae_adapter_init(adapter, pci_dev->device.name, data);
+ if (ret) {
ret = -ENOMEM;
goto free_adapter_data;
@@ -421,10 +422,8 @@ ifpga_rawdev_create(struct rte_pci_device *pci_dev,
rawdev->driver_name = pci_dev->device.driver->name;
- rawdev->dev_private = adapter;
-
/* must enumerate the adapter before use it */
ret = opae_adapter_enumerate(adapter);
if (ret)
- goto free_adapter;
+ goto free_adapter_data;
/* get opae_manager to rawdev */
@@ -437,7 +436,4 @@ ifpga_rawdev_create(struct rte_pci_device *pci_dev,
return ret;
-free_adapter:
- if (adapter)
- opae_adapter_free(adapter);
free_adapter_data:
if (data)
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.406311302 +0000
+++ 0037-raw-ifpga-fix-memory-leak.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,15 +1,16 @@
-From 3c69149a21be9f21da4d36bcf851762d81e873c1 Mon Sep 17 00:00:00 2001
+From 7e4b72b1d9434fea1c0c4b327897d3ffc5ba1205 Mon Sep 17 00:00:00 2001
From: Andy Pei <andy.pei@intel.com>
Date: Fri, 18 Jan 2019 11:14:33 +0000
Subject: [PATCH] raw/ifpga: fix memory leak
+[ upstream commit 3c69149a21be9f21da4d36bcf851762d81e873c1 ]
+
When ifpga_rawdev_create() allocate memory for a new rawdev,
the original code allocate redundant memory for adapter,
which is a member of the rawdev. What is actually necessary is
the adapter to be initialized, not memory allocated.
Fixes: ef1e8ede3da5 ("raw/ifpga: add Intel FPGA bus rawdev driver")
-Cc: stable@dpdk.org
Signed-off-by: Andy Pei <andy.pei@intel.com>
Acked-by: Tianfei Zhang <tianfei.zhang@intel.com>
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/qede: fix performance bottleneck in Rx path' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (35 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'raw/ifpga: fix memory leak' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'net/qede: remove prefetch in Tx " Kevin Traynor
` (29 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Shahed Shaikh; +Cc: Rasesh Mody, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 7e22a66545262ffcbd07ff6a266614dfeff643e9 Mon Sep 17 00:00:00 2001
From: Shahed Shaikh <shshaikh@marvell.com>
Date: Fri, 18 Jan 2019 02:29:29 -0800
Subject: [PATCH] net/qede: fix performance bottleneck in Rx path
[ upstream commit 8f2312474529ad7ff0e4b65b82efc8530e7484ce ]
Allocating replacement buffer per received packet is expensive.
Instead, process received packets first and allocate
replacement buffers in bulk later.
This improves performance by ~25% in terms of PPS on AMD
platforms.
Fixes: 2ea6f76aff40 ("qede: add core driver")
Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
---
drivers/net/qede/qede_rxtx.c | 97 +++++++++++++++++++++++++++---------
drivers/net/qede/qede_rxtx.h | 2 +
2 files changed, 75 insertions(+), 24 deletions(-)
diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index 0e33be1a3..684c4aeef 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -36,4 +36,50 @@ static inline int qede_alloc_rx_buffer(struct qede_rx_queue *rxq)
}
+#define QEDE_MAX_BULK_ALLOC_COUNT 512
+
+static inline int qede_alloc_rx_bulk_mbufs(struct qede_rx_queue *rxq, int count)
+{
+ void *obj_p[QEDE_MAX_BULK_ALLOC_COUNT] __rte_cache_aligned;
+ struct rte_mbuf *mbuf = NULL;
+ struct eth_rx_bd *rx_bd;
+ dma_addr_t mapping;
+ int i, ret = 0;
+ uint16_t idx;
+
+ idx = rxq->sw_rx_prod & NUM_RX_BDS(rxq);
+
+ if (count > QEDE_MAX_BULK_ALLOC_COUNT)
+ count = QEDE_MAX_BULK_ALLOC_COUNT;
+
+ ret = rte_mempool_get_bulk(rxq->mb_pool, obj_p, count);
+ if (unlikely(ret)) {
+ PMD_RX_LOG(ERR, rxq,
+ "Failed to allocate %d rx buffers "
+ "sw_rx_prod %u sw_rx_cons %u mp entries %u free %u",
+ count, idx, rxq->sw_rx_cons & NUM_RX_BDS(rxq),
+ rte_mempool_avail_count(rxq->mb_pool),
+ rte_mempool_in_use_count(rxq->mb_pool));
+ return -ENOMEM;
+ }
+
+ for (i = 0; i < count; i++) {
+ mbuf = obj_p[i];
+ if (likely(i < count - 1))
+ rte_prefetch0(obj_p[i + 1]);
+
+ idx = rxq->sw_rx_prod & NUM_RX_BDS(rxq);
+ rxq->sw_rx_ring[idx].mbuf = mbuf;
+ rxq->sw_rx_ring[idx].page_offset = 0;
+ mapping = rte_mbuf_data_iova_default(mbuf);
+ rx_bd = (struct eth_rx_bd *)
+ ecore_chain_produce(&rxq->rx_bd_ring);
+ rx_bd->addr.hi = rte_cpu_to_le_32(U64_HI(mapping));
+ rx_bd->addr.lo = rte_cpu_to_le_32(U64_LO(mapping));
+ rxq->sw_rx_prod++;
+ }
+
+ return 0;
+}
+
/* Criterias for calculating Rx buffer size -
* 1) rx_buf_size should not exceed the size of mbuf
@@ -1132,5 +1178,5 @@ qede_reuse_page(__rte_unused struct qede_dev *qdev,
{
struct eth_rx_bd *rx_bd_prod = ecore_chain_produce(&rxq->rx_bd_ring);
- uint16_t idx = rxq->sw_rx_cons & NUM_RX_BDS(rxq);
+ uint16_t idx = rxq->sw_rx_prod & NUM_RX_BDS(rxq);
struct qede_rx_entry *curr_prod;
dma_addr_t new_mapping;
@@ -1365,5 +1411,4 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
#endif
uint8_t tunn_parse_flag;
- uint8_t j;
struct eth_fast_path_rx_tpa_start_cqe *cqe_start_tpa;
uint64_t ol_flags;
@@ -1374,4 +1419,5 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
struct qede_agg_info *tpa_info = NULL;
uint32_t rss_hash;
+ int rx_alloc_count = 0;
hw_comp_cons = rte_le_to_cpu_16(*rxq->hw_cons_ptr);
@@ -1383,4 +1429,23 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
return 0;
+ /* Allocate buffers that we used in previous loop */
+ if (rxq->rx_alloc_count) {
+ if (unlikely(qede_alloc_rx_bulk_mbufs(rxq,
+ rxq->rx_alloc_count))) {
+ struct rte_eth_dev *dev;
+
+ PMD_RX_LOG(ERR, rxq,
+ "New buffer allocation failed,"
+ "dropping incoming packetn");
+ dev = &rte_eth_devices[rxq->port_id];
+ dev->data->rx_mbuf_alloc_failed +=
+ rxq->rx_alloc_count;
+ rxq->rx_alloc_errors += rxq->rx_alloc_count;
+ return 0;
+ }
+ qede_update_rx_prod(qdev, rxq);
+ rxq->rx_alloc_count = 0;
+ }
+
while (sw_comp_cons != hw_comp_cons) {
ol_flags = 0;
@@ -1554,14 +1619,5 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
}
- if (unlikely(qede_alloc_rx_buffer(rxq) != 0)) {
- PMD_RX_LOG(ERR, rxq,
- "New buffer allocation failed,"
- "dropping incoming packet\n");
- qede_recycle_rx_bd_ring(rxq, qdev, fp_cqe->bd_num);
- rte_eth_devices[rxq->port_id].
- data->rx_mbuf_alloc_failed++;
- rxq->rx_alloc_errors++;
- break;
- }
+ rx_alloc_count++;
qede_rx_bd_ring_consume(rxq);
@@ -1575,15 +1631,7 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
pkt_len - len))
goto next_cqe;
- for (j = 0; j < num_segs; j++) {
- if (qede_alloc_rx_buffer(rxq)) {
- PMD_RX_LOG(ERR, rxq,
- "Buffer allocation failed");
- rte_eth_devices[rxq->port_id].
- data->rx_mbuf_alloc_failed++;
- rxq->rx_alloc_errors++;
- break;
- }
- rxq->rx_segs++;
- }
+
+ rx_alloc_count += num_segs;
+ rxq->rx_segs += num_segs;
}
rxq->rx_segs++; /* for the first segment */
@@ -1627,5 +1675,6 @@ next_cqe:
}
- qede_update_rx_prod(qdev, rxq);
+ /* Request number of bufferes to be allocated in next loop */
+ rxq->rx_alloc_count = rx_alloc_count;
rxq->rcv_pkts += rx_pkt;
diff --git a/drivers/net/qede/qede_rxtx.h b/drivers/net/qede/qede_rxtx.h
index 454daa07b..5b249cbb2 100644
--- a/drivers/net/qede/qede_rxtx.h
+++ b/drivers/net/qede/qede_rxtx.h
@@ -193,4 +193,6 @@ struct qede_rx_queue {
uint16_t port_id;
uint16_t rx_buf_size;
+ uint16_t rx_alloc_count;
+ uint16_t unused;
uint64_t rcv_pkts;
uint64_t rx_segs;
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.429751219 +0000
+++ 0038-net-qede-fix-performance-bottleneck-in-Rx-path.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From 8f2312474529ad7ff0e4b65b82efc8530e7484ce Mon Sep 17 00:00:00 2001
+From 7e22a66545262ffcbd07ff6a266614dfeff643e9 Mon Sep 17 00:00:00 2001
From: Shahed Shaikh <shshaikh@marvell.com>
Date: Fri, 18 Jan 2019 02:29:29 -0800
Subject: [PATCH] net/qede: fix performance bottleneck in Rx path
+[ upstream commit 8f2312474529ad7ff0e4b65b82efc8530e7484ce ]
+
Allocating replacement buffer per received packet is expensive.
Instead, process received packets first and allocate
replacement buffers in bulk later.
@@ -11,7 +13,6 @@
platforms.
Fixes: 2ea6f76aff40 ("qede: add core driver")
-Cc: stable@dpdk.org
Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/qede: remove prefetch in Tx path' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (36 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'net/qede: fix performance bottleneck in Rx path' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'doc: fix references in power management guide' " Kevin Traynor
` (28 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Shahed Shaikh; +Cc: Rasesh Mody, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 0be9868dee5ee1e9151267495bc9b5c1249bb04a Mon Sep 17 00:00:00 2001
From: Shahed Shaikh <shshaikh@marvell.com>
Date: Fri, 18 Jan 2019 02:29:30 -0800
Subject: [PATCH] net/qede: remove prefetch in Tx path
[ upstream commit d6ddd17fb17cb250044bada4ae42a799375fd6c5 ]
Incorrect placement of prefetch in Tx path is causing
a performance drop of around ~2% on AMD platform.
Fixes: 2ea6f76aff40 ("qede: add core driver")
Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
---
drivers/net/qede/qede_rxtx.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index 684c4aeef..eda19b2b1 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -2182,5 +2182,4 @@ qede_xmit_pkts(void *p_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
txq->nb_tx_avail -= bd1->data.nbds;
txq->sw_tx_prod++;
- rte_prefetch0(txq->sw_tx_ring[TX_PROD(txq)].mbuf);
bd_prod =
rte_cpu_to_le_16(ecore_chain_get_prod_idx(&txq->tx_pbl));
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.454111091 +0000
+++ 0039-net-qede-remove-prefetch-in-Tx-path.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,13 +1,14 @@
-From d6ddd17fb17cb250044bada4ae42a799375fd6c5 Mon Sep 17 00:00:00 2001
+From 0be9868dee5ee1e9151267495bc9b5c1249bb04a Mon Sep 17 00:00:00 2001
From: Shahed Shaikh <shshaikh@marvell.com>
Date: Fri, 18 Jan 2019 02:29:30 -0800
Subject: [PATCH] net/qede: remove prefetch in Tx path
+[ upstream commit d6ddd17fb17cb250044bada4ae42a799375fd6c5 ]
+
Incorrect placement of prefetch in Tx path is causing
a performance drop of around ~2% on AMD platform.
Fixes: 2ea6f76aff40 ("qede: add core driver")
-Cc: stable@dpdk.org
Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'doc: fix references in power management guide' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (37 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'net/qede: remove prefetch in Tx " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'doc: add GCM AAD limitation in qat " Kevin Traynor
` (27 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: David Hunt; +Cc: Marko Kovacevic, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 0509fd5b31b67468b5d839dfc183d3752073debd Mon Sep 17 00:00:00 2001
From: David Hunt <david.hunt@intel.com>
Date: Fri, 18 Jan 2019 09:34:24 +0000
Subject: [PATCH] doc: fix references in power management guide
[ upstream commit fa77f80f49b649995a90f2adc38a4811efa39dc3 ]
In the References section in the Power Management overview,
both links pointed to the same l3fwd-power app. Fix the links
so that one points to l3fwd-power, and the other points to
the vm_power_manager sample app.
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
---
doc/guides/prog_guide/power_man.rst | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/doc/guides/prog_guide/power_man.rst b/doc/guides/prog_guide/power_man.rst
index f55436bc9..0a3755a90 100644
--- a/doc/guides/prog_guide/power_man.rst
+++ b/doc/guides/prog_guide/power_man.rst
@@ -196,5 +196,7 @@ References
----------
-* l3fwd-power: The sample application in DPDK that performs L3 forwarding with power management.
+* The :doc:`../sample_app_ug/l3_forward_power_man`
+ chapter in the :doc:`../sample_app_ug/index` section.
-* The "L3 Forwarding with Power Management Sample Application" chapter in the *DPDK Sample Application's User Guide*.
+* The :doc:`../sample_app_ug/vm_power_management`
+ chapter in the :doc:`../sample_app_ug/index` section.
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.477846442 +0000
+++ 0040-doc-fix-references-in-power-management-guide.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From fa77f80f49b649995a90f2adc38a4811efa39dc3 Mon Sep 17 00:00:00 2001
+From 0509fd5b31b67468b5d839dfc183d3752073debd Mon Sep 17 00:00:00 2001
From: David Hunt <david.hunt@intel.com>
Date: Fri, 18 Jan 2019 09:34:24 +0000
Subject: [PATCH] doc: fix references in power management guide
+[ upstream commit fa77f80f49b649995a90f2adc38a4811efa39dc3 ]
+
In the References section in the Power Management overview,
both links pointed to the same l3fwd-power app. Fix the links
so that one points to l3fwd-power, and the other points to
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'doc: add GCM AAD limitation in qat guide' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (38 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'doc: fix references in power management guide' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'test/metrics: fix a negative case' " Kevin Traynor
` (26 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Fiona Trahe; +Cc: Arek Kusztal, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From e9fa1954dca7b357b5f16ae0602c09609c294dda Mon Sep 17 00:00:00 2001
From: Fiona Trahe <fiona.trahe@intel.com>
Date: Thu, 17 Jan 2019 18:23:19 +0000
Subject: [PATCH] doc: add GCM AAD limitation in qat guide
[ upstream commit 2a7bb4fdf61e9edfb7adbaecb50e728b82da9e23 ]
Add limitation that AAD buffer must be padded with zeroes
in GCM case.
Fixes: d4f44265a1d7 ("doc: add limitation of AAD size to QAT guide")
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
doc/guides/cryptodevs/qat.rst | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/doc/guides/cryptodevs/qat.rst b/doc/guides/cryptodevs/qat.rst
index 9fb9f01d1..3ca70bc05 100644
--- a/doc/guides/cryptodevs/qat.rst
+++ b/doc/guides/cryptodevs/qat.rst
@@ -80,8 +80,7 @@ Limitations
* No BSD support as BSD QAT kernel driver not available.
* ZUC EEA3/EIA3 is not supported by dh895xcc devices
-* Maximum additional authenticated data (AAD) for GCM is 240 bytes long.
+* Maximum additional authenticated data (AAD) for GCM is 240 bytes long and must be passed to the device in a buffer rounded up to the nearest block-size multiple (x16) and padded with zeros.
* Queue pairs are not thread-safe (that is, within a single queue pair, RX and TX from different lcores is not supported).
-
Extra notes on KASUMI F9
~~~~~~~~~~~~~~~~~~~~~~~~
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.500797629 +0000
+++ 0041-doc-add-GCM-AAD-limitation-in-qat-guide.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,13 +1,14 @@
-From 2a7bb4fdf61e9edfb7adbaecb50e728b82da9e23 Mon Sep 17 00:00:00 2001
+From e9fa1954dca7b357b5f16ae0602c09609c294dda Mon Sep 17 00:00:00 2001
From: Fiona Trahe <fiona.trahe@intel.com>
Date: Thu, 17 Jan 2019 18:23:19 +0000
Subject: [PATCH] doc: add GCM AAD limitation in qat guide
+[ upstream commit 2a7bb4fdf61e9edfb7adbaecb50e728b82da9e23 ]
+
Add limitation that AAD buffer must be padded with zeroes
in GCM case.
Fixes: d4f44265a1d7 ("doc: add limitation of AAD size to QAT guide")
-Cc: stable@dpdk.org
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'test/metrics: fix a negative case' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (39 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'doc: add GCM AAD limitation in qat " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'vfio: allow secondary process to query IOMMU type' " Kevin Traynor
` (25 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Harman Kalra; +Cc: Remy Horton, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 6423daae9b4b22ec966d702ab83a556968e01ea9 Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra@marvell.com>
Date: Mon, 10 Dec 2018 08:39:15 +0000
Subject: [PATCH] test/metrics: fix a negative case
[ upstream commit 99f16073b2a3d9881aa8fabe24c62834d902afda ]
Negative test case for passing invalid count size to
rte_metrics_update_values() will pass if count value
is any value greater than 1 because set size wrt to
key id 1 is 1 and passing 0 as no of values to be
updated will not hit the ERANGE check.
Fixes: cd3804242901 ("test/metrics: add unit tests for metrics library")
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Remy Horton <remy.horton@intel.com>
---
test/test/test_metrics.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/test/test_metrics.c b/test/test/test_metrics.c
index 94d54d71c..3c2f36b8a 100644
--- a/test/test/test_metrics.c
+++ b/test/test/test_metrics.c
@@ -155,5 +155,5 @@ test_metrics_update_values(void)
/* Failed Test: Invalid count size */
err = rte_metrics_update_values(RTE_METRICS_GLOBAL,
- KEY, &value[0], 0);
+ KEY, &value[0], ARRAY_SIZE(value));
TEST_ASSERT(err < 0, "%s, %d", __func__, __LINE__);
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.524208234 +0000
+++ 0042-test-metrics-fix-a-negative-case.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From 99f16073b2a3d9881aa8fabe24c62834d902afda Mon Sep 17 00:00:00 2001
+From 6423daae9b4b22ec966d702ab83a556968e01ea9 Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra@marvell.com>
Date: Mon, 10 Dec 2018 08:39:15 +0000
Subject: [PATCH] test/metrics: fix a negative case
+[ upstream commit 99f16073b2a3d9881aa8fabe24c62834d902afda ]
+
Negative test case for passing invalid count size to
rte_metrics_update_values() will pass if count value
is any value greater than 1 because set size wrt to
@@ -10,7 +12,6 @@
updated will not hit the ERANGE check.
Fixes: cd3804242901 ("test/metrics: add unit tests for metrics library")
-Cc: stable@dpdk.org
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Remy Horton <remy.horton@intel.com>
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'vfio: allow secondary process to query IOMMU type' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (40 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'test/metrics: fix a negative case' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'ethdev: fix errno to have positive value' " Kevin Traynor
` (24 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: Darek Stojaczyk, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 09be2373eaf624acef3c235e8e2b3b09c83e273a Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Fri, 18 Jan 2019 10:24:41 +0000
Subject: [PATCH] vfio: allow secondary process to query IOMMU type
[ upstream commit 47f4fe0595fda08e0e4b8a26ad249dd52b95186f ]
It is only possible to know IOMMU type of a given VFIO container
by attempting to initialize it. Since secondary process never
attempts to set up VFIO container itself (because they're shared
between primary and secondary), it never knows which IOMMU type
the container is using, and never sets up the appropriate config
structures. This results in inability to perform DMA mappings in
secondary process.
Fix this by allowing secondary process to query IOMMU type of
primary's default container at device initialization.
Note that this fix is assuming we're only interested in default
container.
Bugzilla ID: 174
Fixes: 6bcb7c95fe14 ("vfio: share default container in multi-process")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
---
lib/librte_eal/linuxapp/eal/eal_vfio.c | 88 +++++++++++++++++++
lib/librte_eal/linuxapp/eal/eal_vfio.h | 12 ++-
.../linuxapp/eal/eal_vfio_mp_sync.c | 16 ++++
3 files changed, 115 insertions(+), 1 deletion(-)
diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.c b/lib/librte_eal/linuxapp/eal/eal_vfio.c
index 72cc65151..c821e8382 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio.c
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio.c
@@ -550,4 +550,63 @@ next:
}
+static int
+vfio_sync_default_container(void)
+{
+ struct rte_mp_msg mp_req, *mp_rep;
+ struct rte_mp_reply mp_reply;
+ struct timespec ts = {.tv_sec = 5, .tv_nsec = 0};
+ struct vfio_mp_param *p = (struct vfio_mp_param *)mp_req.param;
+ int iommu_type_id;
+ unsigned int i;
+
+ /* cannot be called from primary */
+ if (rte_eal_process_type() != RTE_PROC_SECONDARY)
+ return -1;
+
+ /* default container fd should have been opened in rte_vfio_enable() */
+ if (!default_vfio_cfg->vfio_enabled ||
+ default_vfio_cfg->vfio_container_fd < 0) {
+ RTE_LOG(ERR, EAL, "VFIO support is not initialized\n");
+ return -1;
+ }
+
+ /* find default container's IOMMU type */
+ p->req = SOCKET_REQ_IOMMU_TYPE;
+ strcpy(mp_req.name, EAL_VFIO_MP);
+ mp_req.len_param = sizeof(*p);
+ mp_req.num_fds = 0;
+
+ iommu_type_id = -1;
+ if (rte_mp_request_sync(&mp_req, &mp_reply, &ts) == 0 &&
+ mp_reply.nb_received == 1) {
+ mp_rep = &mp_reply.msgs[0];
+ p = (struct vfio_mp_param *)mp_rep->param;
+ if (p->result == SOCKET_OK)
+ iommu_type_id = p->iommu_type_id;
+ free(mp_reply.msgs);
+ }
+ if (iommu_type_id < 0) {
+ RTE_LOG(ERR, EAL, "Could not get IOMMU type for default container\n");
+ return -1;
+ }
+
+ /* we now have an fd for default container, as well as its IOMMU type.
+ * now, set up default VFIO container config to match.
+ */
+ for (i = 0; i < RTE_DIM(iommu_types); i++) {
+ const struct vfio_iommu_type *t = &iommu_types[i];
+ if (t->type_id != iommu_type_id)
+ continue;
+
+ /* we found our IOMMU type */
+ default_vfio_cfg->vfio_iommu_type = t;
+
+ return 0;
+ }
+ RTE_LOG(ERR, EAL, "Could not find IOMMU type id (%i)\n",
+ iommu_type_id);
+ return -1;
+}
+
int
rte_vfio_clear_group(int vfio_group_fd)
@@ -746,4 +805,24 @@ rte_vfio_setup_device(const char *sysfs_base, const char *dev_addr,
RTE_LOG(DEBUG, EAL, "Installed memory event callback for VFIO\n");
}
+ } else if (rte_eal_process_type() != RTE_PROC_PRIMARY &&
+ vfio_cfg == default_vfio_cfg &&
+ vfio_cfg->vfio_iommu_type == NULL) {
+ /* if we're not a primary process, we do not set up the VFIO
+ * container because it's already been set up by the primary
+ * process. instead, we simply ask the primary about VFIO type
+ * we are using, and set the VFIO config up appropriately.
+ */
+ ret = vfio_sync_default_container();
+ if (ret < 0) {
+ RTE_LOG(ERR, EAL, "Could not sync default VFIO container\n");
+ close(vfio_group_fd);
+ rte_vfio_clear_group(vfio_group_fd);
+ return -1;
+ }
+ /* we have successfully initialized VFIO, notify user */
+ const struct vfio_iommu_type *t =
+ default_vfio_cfg->vfio_iommu_type;
+ RTE_LOG(NOTICE, EAL, " using IOMMU type %d (%s)\n",
+ t->type_id, t->name);
}
@@ -979,4 +1058,13 @@ vfio_get_default_container_fd(void)
}
+int
+vfio_get_iommu_type(void)
+{
+ if (default_vfio_cfg->vfio_iommu_type == NULL)
+ return -1;
+
+ return default_vfio_cfg->vfio_iommu_type->type_id;
+}
+
const struct vfio_iommu_type *
vfio_set_iommu_type(int vfio_container_fd)
diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.h b/lib/librte_eal/linuxapp/eal/eal_vfio.h
index 63ae115c3..cb2d35fb1 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio.h
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio.h
@@ -6,4 +6,6 @@
#define EAL_VFIO_H_
+#include <rte_common.h>
+
/*
* determine if VFIO is present on the system
@@ -123,4 +125,7 @@ const struct vfio_iommu_type *
vfio_set_iommu_type(int vfio_container_fd);
+int
+vfio_get_iommu_type(void);
+
/* check if we have any supported extensions */
int
@@ -134,4 +139,5 @@ int vfio_mp_sync_setup(void);
#define SOCKET_REQ_GROUP 0x200
#define SOCKET_REQ_DEFAULT_CONTAINER 0x400
+#define SOCKET_REQ_IOMMU_TYPE 0x800
#define SOCKET_OK 0x0
#define SOCKET_NO_FD 0x1
@@ -141,5 +147,9 @@ struct vfio_mp_param {
int req;
int result;
- int group_num;
+ RTE_STD_C11
+ union {
+ int group_num;
+ int iommu_type_id;
+ };
};
diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c b/lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c
index a1e8c834f..2a47f29d5 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c
@@ -78,4 +78,20 @@ vfio_mp_primary(const struct rte_mp_msg *msg, const void *peer)
}
break;
+ case SOCKET_REQ_IOMMU_TYPE:
+ {
+ int iommu_type_id;
+
+ r->req = SOCKET_REQ_IOMMU_TYPE;
+
+ iommu_type_id = vfio_get_iommu_type();
+
+ if (iommu_type_id < 0)
+ r->result = SOCKET_ERR;
+ else {
+ r->iommu_type_id = iommu_type_id;
+ r->result = SOCKET_OK;
+ }
+ break;
+ }
default:
RTE_LOG(ERR, EAL, "vfio received invalid message!\n");
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.547157449 +0000
+++ 0043-vfio-allow-secondary-process-to-query-IOMMU-type.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From 47f4fe0595fda08e0e4b8a26ad249dd52b95186f Mon Sep 17 00:00:00 2001
+From 09be2373eaf624acef3c235e8e2b3b09c83e273a Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Fri, 18 Jan 2019 10:24:41 +0000
Subject: [PATCH] vfio: allow secondary process to query IOMMU type
+[ upstream commit 47f4fe0595fda08e0e4b8a26ad249dd52b95186f ]
+
It is only possible to know IOMMU type of a given VFIO container
by attempting to initialize it. Since secondary process never
attempts to set up VFIO container itself (because they're shared
@@ -19,7 +21,6 @@
Bugzilla ID: 174
Fixes: 6bcb7c95fe14 ("vfio: share default container in multi-process")
-Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'ethdev: fix errno to have positive value' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (41 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'vfio: allow secondary process to query IOMMU type' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'gso: fix VxLAN/GRE tunnel checks' " Kevin Traynor
` (23 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Andrew Rybchenko; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 9d0084878cf266f5c083ef5a4d6276840e2c7ba5 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Mon, 21 Jan 2019 16:18:35 +0000
Subject: [PATCH] ethdev: fix errno to have positive value
[ upstream commit 8e0c8dcf3507ae812f1abcd5247617917f131dae ]
rte_errno should be set to positive value from errno.h plus
few RTE-specific values.
Fixes: 4fb7e803eb1a ("ethdev: add Tx preparation")
Fixes: 439a90b5f2a7 ("ethdev: reorder inline functions")
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
lib/librte_ethdev/rte_ethdev.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 1960f3a2d..a3e9fb816 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -4226,5 +4226,5 @@ rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id,
if (!rte_eth_dev_is_valid_port(port_id)) {
RTE_ETHDEV_LOG(ERR, "Invalid TX port_id=%u\n", port_id);
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
return 0;
}
@@ -4236,5 +4236,5 @@ rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id,
if (queue_id >= dev->data->nb_tx_queues) {
RTE_ETHDEV_LOG(ERR, "Invalid TX queue_id=%u\n", queue_id);
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
return 0;
}
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.571671032 +0000
+++ 0044-ethdev-fix-errno-to-have-positive-value.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,14 +1,15 @@
-From 8e0c8dcf3507ae812f1abcd5247617917f131dae Mon Sep 17 00:00:00 2001
+From 9d0084878cf266f5c083ef5a4d6276840e2c7ba5 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Mon, 21 Jan 2019 16:18:35 +0000
Subject: [PATCH] ethdev: fix errno to have positive value
+[ upstream commit 8e0c8dcf3507ae812f1abcd5247617917f131dae ]
+
rte_errno should be set to positive value from errno.h plus
few RTE-specific values.
Fixes: 4fb7e803eb1a ("ethdev: add Tx preparation")
Fixes: 439a90b5f2a7 ("ethdev: reorder inline functions")
-Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
@@ -16,17 +17,17 @@
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
-index 76266ad10..a3c864a13 100644
+index 1960f3a2d..a3e9fb816 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
-@@ -4223,5 +4223,5 @@ rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id,
+@@ -4226,5 +4226,5 @@ rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id,
if (!rte_eth_dev_is_valid_port(port_id)) {
RTE_ETHDEV_LOG(ERR, "Invalid TX port_id=%u\n", port_id);
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
return 0;
}
-@@ -4233,5 +4233,5 @@ rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id,
+@@ -4236,5 +4236,5 @@ rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id,
if (queue_id >= dev->data->nb_tx_queues) {
RTE_ETHDEV_LOG(ERR, "Invalid TX queue_id=%u\n", queue_id);
- rte_errno = -EINVAL;
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'gso: fix VxLAN/GRE tunnel checks' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (42 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'ethdev: fix errno to have positive value' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'kni: fix build on RHEL8 for arm and Power9' " Kevin Traynor
` (22 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Andrew Rybchenko; +Cc: Jiayu Hu, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 15bfefb4bb1509d2409b3164fef57f1929d9f423 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Mon, 21 Jan 2019 06:42:38 +0000
Subject: [PATCH] gso: fix VxLAN/GRE tunnel checks
[ upstream commit 727663e88b3fbaa8183499a1b415f02b0a689319 ]
Tunnel type is an enum in PKT_TX_TUNNEL_MASK bits.
As the result, for example, IPIP or MPLSinUDP tunnel packets may be
incorrectly treated internally as VXLAN.
Fixes: b058d92ea95d ("gso: support VxLAN GSO")
Fixes: 70e737e448c7 ("gso: support GRE GSO")
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Jiayu Hu <jiayu.hu@intel.com>
---
lib/librte_gso/gso_common.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/librte_gso/gso_common.h b/lib/librte_gso/gso_common.h
index 6cd764ff5..b6ff1b886 100644
--- a/lib/librte_gso/gso_common.h
+++ b/lib/librte_gso/gso_common.h
@@ -23,10 +23,10 @@
#define IS_IPV4_VXLAN_TCP4(flag) (((flag) & (PKT_TX_TCP_SEG | PKT_TX_IPV4 | \
- PKT_TX_OUTER_IPV4 | PKT_TX_TUNNEL_VXLAN)) == \
+ PKT_TX_OUTER_IPV4 | PKT_TX_TUNNEL_MASK)) == \
(PKT_TX_TCP_SEG | PKT_TX_IPV4 | PKT_TX_OUTER_IPV4 | \
PKT_TX_TUNNEL_VXLAN))
#define IS_IPV4_GRE_TCP4(flag) (((flag) & (PKT_TX_TCP_SEG | PKT_TX_IPV4 | \
- PKT_TX_OUTER_IPV4 | PKT_TX_TUNNEL_GRE)) == \
+ PKT_TX_OUTER_IPV4 | PKT_TX_TUNNEL_MASK)) == \
(PKT_TX_TCP_SEG | PKT_TX_IPV4 | PKT_TX_OUTER_IPV4 | \
PKT_TX_TUNNEL_GRE))
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.597820962 +0000
+++ 0045-gso-fix-VxLAN-GRE-tunnel-checks.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,15 +1,16 @@
-From 727663e88b3fbaa8183499a1b415f02b0a689319 Mon Sep 17 00:00:00 2001
+From 15bfefb4bb1509d2409b3164fef57f1929d9f423 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Mon, 21 Jan 2019 06:42:38 +0000
Subject: [PATCH] gso: fix VxLAN/GRE tunnel checks
+[ upstream commit 727663e88b3fbaa8183499a1b415f02b0a689319 ]
+
Tunnel type is an enum in PKT_TX_TUNNEL_MASK bits.
As the result, for example, IPIP or MPLSinUDP tunnel packets may be
incorrectly treated internally as VXLAN.
Fixes: b058d92ea95d ("gso: support VxLAN GSO")
Fixes: 70e737e448c7 ("gso: support GRE GSO")
-Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Jiayu Hu <jiayu.hu@intel.com>
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'kni: fix build on RHEL8 for arm and Power9' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (43 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'gso: fix VxLAN/GRE tunnel checks' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'kni: fix build for dev_open in Linux 5.0' " Kevin Traynor
` (21 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: David Zeng; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From a14239650e288b64b367221c27478e54a87edc0d Mon Sep 17 00:00:00 2001
From: David Zeng <zengxhsh@cn.ibm.com>
Date: Sat, 22 Dec 2018 00:27:33 +0800
Subject: [PATCH] kni: fix build on RHEL8 for arm and Power9
[ upstream commit 3d5501d568aacbcf71832691278f5656d3a9b649 ]
Signed-off-by: David Zeng <zengxhsh@cn.ibm.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
kernel/linux/kni/compat.h | 8 +++++++-
kernel/linux/kni/ethtool/igb/kcompat.h | 3 ++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h
index bc81d0c8d..3c575c70a 100644
--- a/kernel/linux/kni/compat.h
+++ b/kernel/linux/kni/compat.h
@@ -103,7 +103,13 @@
#endif
+/*
+ * RHEL has two different version with different kernel version:
+ * 3.10 is for AMD, Intel, IBM POWER7 and POWER8;
+ * 4.14 is for ARM and IBM POWER9
+ */
#if (defined(RHEL_RELEASE_CODE) && \
(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)) && \
- (RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0)))
+ (RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0)) && \
+ (LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)))
#define ndo_change_mtu ndo_change_mtu_rh74
#endif
diff --git a/kernel/linux/kni/ethtool/igb/kcompat.h b/kernel/linux/kni/ethtool/igb/kcompat.h
index 2681be684..430aabafe 100644
--- a/kernel/linux/kni/ethtool/igb/kcompat.h
+++ b/kernel/linux/kni/ethtool/igb/kcompat.h
@@ -3932,5 +3932,6 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
#if (defined(RHEL_RELEASE_CODE) && \
(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)) && \
- (RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0)))
+ (RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0)) && \
+ (LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)))
#define ndo_change_mtu ndo_change_mtu_rh74
#endif
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.620173180 +0000
+++ 0046-kni-fix-build-on-RHEL8-for-arm-and-Power9.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From 3d5501d568aacbcf71832691278f5656d3a9b649 Mon Sep 17 00:00:00 2001
+From a14239650e288b64b367221c27478e54a87edc0d Mon Sep 17 00:00:00 2001
From: David Zeng <zengxhsh@cn.ibm.com>
Date: Sat, 22 Dec 2018 00:27:33 +0800
Subject: [PATCH] kni: fix build on RHEL8 for arm and Power9
+[ upstream commit 3d5501d568aacbcf71832691278f5656d3a9b649 ]
+
Signed-off-by: David Zeng <zengxhsh@cn.ibm.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'kni: fix build for dev_open in Linux 5.0' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (44 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'kni: fix build on RHEL8 for arm and Power9' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'kni: fix build for igb_ndo_bridge_setlink " Kevin Traynor
` (20 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From f275bfedd6dccc7320cf659c6f50b7a2010d7965 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 22 Jan 2019 15:44:28 +0000
Subject: [PATCH] kni: fix build for dev_open in Linux 5.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit d01c18ff821b81baa3b99329ebf051c6a1bfd4ee ]
Build error seen with Linux kernel 5.0 and
when CONFIG_RTE_KNI_KMOD_ETHTOOL is enabled.
build error:
.../build/build/kernel/linux/kni/ixgbe_ethtool.c:1746:4:
error: too few arguments to function ‘dev_open’
dev_open(netdev);
^~~~~~~~
In file included from .../build/kernel/linux/kni/ixgbe_ethtool.c:18:
.../linux/linux/include/linux/netdevice.h:2620:5: note: declared here
int dev_open(struct net_device *dev, struct netlink_ext_ack *extack);
^~~~~~~~
.../build/build/kernel/linux/kni/igb_ethtool.c:1812:4:
error: too few arguments to function ‘dev_open’
dev_open(netdev);
^~~~~~~~
In file included from .../build/build/kernel/linux/kni/igb_ethtool.c:15:
.../linux/linux/include/linux/netdevice.h:2620:5: note: declared here
int dev_open(struct net_device *dev, struct netlink_ext_ack *extack);
^~~~~~~~
dev_open() is changed in Linux kernel version 5.0 and now requires
a new parameter, 'struct netlink_ext_ack *extack'.
Fixed by defining dev_open as macro when kernel version >= 5.0
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
kernel/linux/kni/ethtool/igb/kcompat.h | 4 ++++
kernel/linux/kni/ethtool/ixgbe/kcompat.h | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/kernel/linux/kni/ethtool/igb/kcompat.h b/kernel/linux/kni/ethtool/igb/kcompat.h
index 430aabafe..068cfeb52 100644
--- a/kernel/linux/kni/ethtool/igb/kcompat.h
+++ b/kernel/linux/kni/ethtool/igb/kcompat.h
@@ -3941,4 +3941,8 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
#endif
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) )
+#define dev_open(x) dev_open(x, NULL)
+#endif /* >= 5.0.0 */
+
#if defined(timer_setup) && defined(from_timer)
#define HAVE_TIMER_SETUP
diff --git a/kernel/linux/kni/ethtool/ixgbe/kcompat.h b/kernel/linux/kni/ethtool/ixgbe/kcompat.h
index 7c7d6c317..419fd1f13 100644
--- a/kernel/linux/kni/ethtool/ixgbe/kcompat.h
+++ b/kernel/linux/kni/ethtool/ixgbe/kcompat.h
@@ -3126,4 +3126,8 @@ static inline int __kc_pci_vfs_assigned(struct pci_dev *dev)
#endif /* >= 3.16.0 */
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) )
+#define dev_open(x) dev_open(x, NULL)
+#endif /* >= 5.0.0 */
+
/*
* vlan_tx_tag_* macros renamed to skb_vlan_tag_* (Linux commit: df8a39defad4)
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.645713057 +0000
+++ 0047-kni-fix-build-for-dev_open-in-Linux-5.0.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,4 +1,4 @@
-From d01c18ff821b81baa3b99329ebf051c6a1bfd4ee Mon Sep 17 00:00:00 2001
+From f275bfedd6dccc7320cf659c6f50b7a2010d7965 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 22 Jan 2019 15:44:28 +0000
Subject: [PATCH] kni: fix build for dev_open in Linux 5.0
@@ -6,6 +6,8 @@
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
+[ upstream commit d01c18ff821b81baa3b99329ebf051c6a1bfd4ee ]
+
Build error seen with Linux kernel 5.0 and
when CONFIG_RTE_KNI_KMOD_ETHTOOL is enabled.
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'kni: fix build for igb_ndo_bridge_setlink in Linux 5.0' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (45 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'kni: fix build for dev_open in Linux 5.0' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'vfio: fix error message' " Kevin Traynor
` (19 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 0e8edbe360e002847ab1e795b68692e4fa14115a Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 22 Jan 2019 15:44:29 +0000
Subject: [PATCH] kni: fix build for igb_ndo_bridge_setlink in Linux 5.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 18cb8293e312bc3bd67211a5a540676f1c667d88 ]
Build error seen with Linux kernel 5.0 and
when CONFIG_RTE_KNI_KMOD_ETHTOOL is enabled.
build error:
.../build/build/kernel/linux/kni/igb_main.c:2348:24:
error: initialization of
‘int (*)(struct net_device *, struct nlmsghdr *, u16,
struct netlink_ext_ack *)’
{aka ‘int (*)(struct net_device *, struct nlmsghdr *,
short unsigned int, struct netlink_ext_ack *)’}
from incompatible pointer type
‘int (*)(struct net_device *, struct nlmsghdr *, u16)’
{aka ‘int (*)(struct net_device *, struct nlmsghdr *,
short unsigned int)’}
[-Werror=incompatible-pointer-types]
.ndo_bridge_setlink = igb_ndo_bridge_setlink,
^~~~~~~~~~~~~~~~~~~~~~
.../build/build/kernel/linux/kni/igb_main.c:2348:24:
note: (near initialization for ‘igb_netdev_ops.ndo_bridge_setlink’)
igb_ndo_bridge_setlink() is changed in Linux kernel version 5.0
and now requires a new parameter, 'struct netlink_ext_ack *extack'.
Fixed by adding a new parameter with a kernel version check.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
kernel/linux/kni/ethtool/igb/igb_main.c | 5 +++++
kernel/linux/kni/ethtool/igb/kcompat.h | 1 +
2 files changed, 6 insertions(+)
diff --git a/kernel/linux/kni/ethtool/igb/igb_main.c b/kernel/linux/kni/ethtool/igb/igb_main.c
index af378d2f2..0b4faeae5 100644
--- a/kernel/linux/kni/ethtool/igb/igb_main.c
+++ b/kernel/linux/kni/ethtool/igb/igb_main.c
@@ -2208,5 +2208,10 @@ static int igb_ndo_fdb_dump(struct sk_buff *skb,
static int igb_ndo_bridge_setlink(struct net_device *dev,
struct nlmsghdr *nlh,
+#ifdef HAVE_NDO_BRIDGE_SETLINK_EXTACK
+ u16 flags, struct netlink_ext_ack *extack)
+#else
u16 flags)
+#endif
+
#else
static int igb_ndo_bridge_setlink(struct net_device *dev,
diff --git a/kernel/linux/kni/ethtool/igb/kcompat.h b/kernel/linux/kni/ethtool/igb/kcompat.h
index 068cfeb52..11b15f3a9 100644
--- a/kernel/linux/kni/ethtool/igb/kcompat.h
+++ b/kernel/linux/kni/ethtool/igb/kcompat.h
@@ -3943,4 +3943,5 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) )
#define dev_open(x) dev_open(x, NULL)
+#define HAVE_NDO_BRIDGE_SETLINK_EXTACK
#endif /* >= 5.0.0 */
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.676020010 +0000
+++ 0048-kni-fix-build-for-igb_ndo_bridge_setlink-in-Linux-5..patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,4 +1,4 @@
-From 18cb8293e312bc3bd67211a5a540676f1c667d88 Mon Sep 17 00:00:00 2001
+From 0e8edbe360e002847ab1e795b68692e4fa14115a Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 22 Jan 2019 15:44:29 +0000
Subject: [PATCH] kni: fix build for igb_ndo_bridge_setlink in Linux 5.0
@@ -6,6 +6,8 @@
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
+[ upstream commit 18cb8293e312bc3bd67211a5a540676f1c667d88 ]
+
Build error seen with Linux kernel 5.0 and
when CONFIG_RTE_KNI_KMOD_ETHTOOL is enabled.
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'vfio: fix error message' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (46 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'kni: fix build for igb_ndo_bridge_setlink " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'eal/linux: fix parsing zero socket memory and limits' " Kevin Traynor
` (18 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Alejandro Lucero; +Cc: Anatoly Burakov, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 0ac3863560dd3a7f6fb82e33e4f3f585402bad63 Mon Sep 17 00:00:00 2001
From: Alejandro Lucero <alejandro.lucero@netronome.com>
Date: Wed, 23 Jan 2019 10:00:48 +0000
Subject: [PATCH] vfio: fix error message
[ upstream commit 43f2b3d250551b66ca282e6c5135b299b22d9d22 ]
The message refers to uio driver.
Fixes: ff0b67d1c868 ("vfio: DMA mapping")
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
drivers/bus/pci/linux/pci_vfio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index 54a4c959e..8e3d43e9c 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -659,5 +659,5 @@ pci_vfio_map_resource_primary(struct rte_pci_device *dev)
if (vfio_res == NULL) {
RTE_LOG(ERR, EAL,
- "%s(): cannot store uio mmap details\n", __func__);
+ "%s(): cannot store vfio mmap details\n", __func__);
goto err_vfio_dev_fd;
}
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.712790238 +0000
+++ 0049-vfio-fix-error-message.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,12 +1,13 @@
-From 43f2b3d250551b66ca282e6c5135b299b22d9d22 Mon Sep 17 00:00:00 2001
+From 0ac3863560dd3a7f6fb82e33e4f3f585402bad63 Mon Sep 17 00:00:00 2001
From: Alejandro Lucero <alejandro.lucero@netronome.com>
Date: Wed, 23 Jan 2019 10:00:48 +0000
Subject: [PATCH] vfio: fix error message
+[ upstream commit 43f2b3d250551b66ca282e6c5135b299b22d9d22 ]
+
The message refers to uio driver.
Fixes: ff0b67d1c868 ("vfio: DMA mapping")
-Cc: stable@dpdk.org
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
@@ -15,10 +16,10 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
-index fa8cfbb0b..ebf6ccd3c 100644
+index 54a4c959e..8e3d43e9c 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
-@@ -676,5 +676,5 @@ pci_vfio_map_resource_primary(struct rte_pci_device *dev)
+@@ -659,5 +659,5 @@ pci_vfio_map_resource_primary(struct rte_pci_device *dev)
if (vfio_res == NULL) {
RTE_LOG(ERR, EAL,
- "%s(): cannot store uio mmap details\n", __func__);
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'eal/linux: fix parsing zero socket memory and limits' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (47 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'vfio: fix error message' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'test: check zero socket memory as valid' " Kevin Traynor
` (17 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Ilya Maximets; +Cc: Anatoly Burakov, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 0122564d8c372d879aa9848675d54dfaa933d464 Mon Sep 17 00:00:00 2001
From: Ilya Maximets <i.maximets@samsung.com>
Date: Tue, 22 Jan 2019 19:27:14 +0300
Subject: [PATCH] eal/linux: fix parsing zero socket memory and limits
[ upstream commit 0a703f0f36c11b6f23fad4fab9e79c308811329d ]
Modern memory mode allowes to not reserve any memory by the
'--socket-mem' option. i.e. it could be possible to specify
zero preallocated memory like '--socket-mem 0'.
Also, it should be possible to configure unlimited memory
allocations by '--socket-limit 0'.
Both cases are impossible now and blocks starting the DPDK
application:
./dpdk-app --socket-limit 0 <...>
EAL: invalid parameters for --socket-limit
EAL: Invalid 'command line' arguments.
Unable to initialize DPDK: Invalid argument
Fixes: 6b42f75632f0 ("eal: enable non-legacy memory mode")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
lib/librte_eal/linuxapp/eal/eal.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
index 0226b7f6a..30138b638 100644
--- a/lib/librte_eal/linuxapp/eal/eal.c
+++ b/lib/librte_eal/linuxapp/eal/eal.c
@@ -582,8 +582,4 @@ eal_parse_socket_arg(char *strval, volatile uint64_t *socket_arg)
}
- /* check if we have a positive amount of total memory */
- if (total_mem == 0)
- return -1;
-
return 0;
}
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.735202710 +0000
+++ 0050-eal-linux-fix-parsing-zero-socket-memory-and-limits.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From 0a703f0f36c11b6f23fad4fab9e79c308811329d Mon Sep 17 00:00:00 2001
+From 0122564d8c372d879aa9848675d54dfaa933d464 Mon Sep 17 00:00:00 2001
From: Ilya Maximets <i.maximets@samsung.com>
Date: Tue, 22 Jan 2019 19:27:14 +0300
Subject: [PATCH] eal/linux: fix parsing zero socket memory and limits
+[ upstream commit 0a703f0f36c11b6f23fad4fab9e79c308811329d ]
+
Modern memory mode allowes to not reserve any memory by the
'--socket-mem' option. i.e. it could be possible to specify
zero preallocated memory like '--socket-mem 0'.
@@ -18,7 +20,6 @@
Unable to initialize DPDK: Invalid argument
Fixes: 6b42f75632f0 ("eal: enable non-legacy memory mode")
-Cc: stable@dpdk.org
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
@@ -27,10 +28,10 @@
1 file changed, 4 deletions(-)
diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
-index a386829f3..13f401684 100644
+index 0226b7f6a..30138b638 100644
--- a/lib/librte_eal/linuxapp/eal/eal.c
+++ b/lib/librte_eal/linuxapp/eal/eal.c
-@@ -583,8 +583,4 @@ eal_parse_socket_arg(char *strval, volatile uint64_t *socket_arg)
+@@ -582,8 +582,4 @@ eal_parse_socket_arg(char *strval, volatile uint64_t *socket_arg)
}
- /* check if we have a positive amount of total memory */
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'test: check zero socket memory as valid' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (48 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'eal/linux: fix parsing zero socket memory and limits' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'net/i40e: fix queue region DCB configure' " Kevin Traynor
` (16 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Ilya Maximets; +Cc: Shuai Zhu, David Marchand, Anatoly Burakov, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 2e0185e8a962790f4adda67c9a3e6f9465fb6677 Mon Sep 17 00:00:00 2001
From: Ilya Maximets <i.maximets@samsung.com>
Date: Fri, 25 Jan 2019 10:55:58 +0300
Subject: [PATCH] test: check zero socket memory as valid
[ upstream commit 10d66cee5bf51bbd27d58b565b3340282e18ef07 ]
Dynamic memory mode allowes zero socket-mem because all the
required memory could be allocated on demand.
Fixes: 0a703f0f36c1 ("eal/linux: fix parsing zero socket memory and limits")
Reported-by: Shuai Zhu <shuaix.zhu@intel.com>
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
test/test/test_eal_flags.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/test/test_eal_flags.c b/test/test/test_eal_flags.c
index e3a60c7ae..81e345b87 100644
--- a/test/test/test_eal_flags.c
+++ b/test/test/test_eal_flags.c
@@ -1159,5 +1159,5 @@ test_memory_flags(void)
"--file-prefix=" memtest, "-m", DEFAULT_MEM_SIZE};
- /* invalid (zero) --socket-mem flag */
+ /* valid (zero) --socket-mem flag */
const char *argv2[] = {prgname, "-c", "10", "-n", "2",
"--file-prefix=" memtest, "--socket-mem=0,0,0,0"};
@@ -1257,6 +1257,6 @@ test_memory_flags(void)
return -1;
}
- if (launch_proc(argv2) == 0) {
- printf("Error - process run ok with invalid (zero) --socket-mem!\n");
+ if (launch_proc(argv2) != 0) {
+ printf("Error - process failed with valid (zero) --socket-mem!\n");
return -1;
}
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.758409525 +0000
+++ 0051-test-check-zero-socket-memory-as-valid.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,13 +1,14 @@
-From 10d66cee5bf51bbd27d58b565b3340282e18ef07 Mon Sep 17 00:00:00 2001
+From 2e0185e8a962790f4adda67c9a3e6f9465fb6677 Mon Sep 17 00:00:00 2001
From: Ilya Maximets <i.maximets@samsung.com>
Date: Fri, 25 Jan 2019 10:55:58 +0300
Subject: [PATCH] test: check zero socket memory as valid
+[ upstream commit 10d66cee5bf51bbd27d58b565b3340282e18ef07 ]
+
Dynamic memory mode allowes zero socket-mem because all the
required memory could be allocated on demand.
Fixes: 0a703f0f36c1 ("eal/linux: fix parsing zero socket memory and limits")
-Cc: stable@dpdk.org
Reported-by: Shuai Zhu <shuaix.zhu@intel.com>
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix queue region DCB configure' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (49 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'test: check zero socket memory as valid' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:25 ` [dpdk-stable] patch 'vhost: fix access for indirect descriptors' " Kevin Traynor
` (15 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Wei Zhao; +Cc: Yuan Peng, Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From bff4efdafb86e4e54a08cb806ba72d5dd78f6fa3 Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Tue, 22 Jan 2019 16:11:03 +0800
Subject: [PATCH] net/i40e: fix queue region DCB configure
[ upstream commit 991a2e812fcfdba6d47b77462e06859262def583 ]
DCB is not necessary to be configured if no user priority of
queue region is requested.
Unexpected configuration of DCB will cause unexpected behavior, like
FDIR does not work on those queues, but could cause more issues.
Fixes: 7cbecc2f7424 ("net/i40e: support queue region set and flush")
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/i40e/rte_pmd_i40e.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
index 7ce5d02fa..c49c872b6 100644
--- a/drivers/net/i40e/rte_pmd_i40e.c
+++ b/drivers/net/i40e/rte_pmd_i40e.c
@@ -2819,5 +2819,5 @@ i40e_queue_region_dcb_configure(struct i40e_hw *hw,
int32_t ret = -EINVAL;
uint16_t i, j, prio_index, region_index;
- uint8_t tc_map, tc_bw, bw_lf;
+ uint8_t tc_map, tc_bw, bw_lf, dcb_flag = 0;
if (!info->queue_region_number) {
@@ -2826,4 +2826,14 @@ i40e_queue_region_dcb_configure(struct i40e_hw *hw,
}
+ for (i = 0; i < info->queue_region_number; i++) {
+ if (info->region[i].user_priority_num) {
+ dcb_flag = 1;
+ break;
+ }
+ }
+
+ if (dcb_flag == 0)
+ return 0;
+
dcb_cfg = &dcb_cfg_local;
memset(dcb_cfg, 0, sizeof(struct i40e_dcbx_config));
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.782142122 +0000
+++ 0052-net-i40e-fix-queue-region-DCB-configure.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From 991a2e812fcfdba6d47b77462e06859262def583 Mon Sep 17 00:00:00 2001
+From bff4efdafb86e4e54a08cb806ba72d5dd78f6fa3 Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Tue, 22 Jan 2019 16:11:03 +0800
Subject: [PATCH] net/i40e: fix queue region DCB configure
+[ upstream commit 991a2e812fcfdba6d47b77462e06859262def583 ]
+
DCB is not necessary to be configured if no user priority of
queue region is requested.
@@ -10,7 +12,6 @@
FDIR does not work on those queues, but could cause more issues.
Fixes: 7cbecc2f7424 ("net/i40e: support queue region set and flush")
-Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'vhost: fix access for indirect descriptors' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (50 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'net/i40e: fix queue region DCB configure' " Kevin Traynor
@ 2019-02-07 13:25 ` Kevin Traynor
2019-02-07 13:26 ` [dpdk-stable] patch 'net/sfc: fix crash in EF10 TSO if no payload' " Kevin Traynor
` (14 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:25 UTC (permalink / raw)
To: Tiwei Bie; +Cc: Haiyue Wang, Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 6a9995128d52e99c05a687eefa9c705edd4f7c40 Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Mon, 21 Jan 2019 16:12:18 +0800
Subject: [PATCH] vhost: fix access for indirect descriptors
[ upstream commit 48006390003b81f6d5c7b78e3f02ed49d1049945 ]
Fix a possible out of bound access which may happen when handling
indirect descs in split ring.
Fixes: 1be4ebb1c464 ("vhost: support indirect descriptor in mergeable Rx")
Reported-by: Haiyue Wang <haiyue.wang@intel.com>
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
lib/librte_vhost/virtio_net.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index ed9c0847f..15d682c3c 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -337,4 +337,5 @@ fill_vec_buf_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
uint64_t dlen;
uint32_t nr_descs = vq->size;
+ uint32_t cnt = 0;
struct vring_desc *descs = vq->desc;
struct vring_desc *idesc = NULL;
@@ -375,10 +376,5 @@ fill_vec_buf_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
while (1) {
- if (unlikely(idx >= vq->size)) {
- free_ind_table(idesc);
- return -1;
- }
-
- if (unlikely(nr_descs-- == 0)) {
+ if (unlikely(idx >= nr_descs || cnt++ >= nr_descs)) {
free_ind_table(idesc);
return -1;
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.807124963 +0000
+++ 0053-vhost-fix-access-for-indirect-descriptors.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,13 +1,14 @@
-From 48006390003b81f6d5c7b78e3f02ed49d1049945 Mon Sep 17 00:00:00 2001
+From 6a9995128d52e99c05a687eefa9c705edd4f7c40 Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Mon, 21 Jan 2019 16:12:18 +0800
Subject: [PATCH] vhost: fix access for indirect descriptors
+[ upstream commit 48006390003b81f6d5c7b78e3f02ed49d1049945 ]
+
Fix a possible out of bound access which may happen when handling
indirect descs in split ring.
Fixes: 1be4ebb1c464 ("vhost: support indirect descriptor in mergeable Rx")
-Cc: stable@dpdk.org
Reported-by: Haiyue Wang <haiyue.wang@intel.com>
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
@@ -17,16 +18,16 @@
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
-index 0893a1d04..37a4c00d2 100644
+index ed9c0847f..15d682c3c 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
-@@ -311,4 +311,5 @@ fill_vec_buf_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -337,4 +337,5 @@ fill_vec_buf_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
uint64_t dlen;
uint32_t nr_descs = vq->size;
+ uint32_t cnt = 0;
struct vring_desc *descs = vq->desc;
struct vring_desc *idesc = NULL;
-@@ -349,10 +350,5 @@ fill_vec_buf_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -375,10 +376,5 @@ fill_vec_buf_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
while (1) {
- if (unlikely(idx >= vq->size)) {
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/sfc: fix crash in EF10 TSO if no payload' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (51 preceding siblings ...)
2019-02-07 13:25 ` [dpdk-stable] patch 'vhost: fix access for indirect descriptors' " Kevin Traynor
@ 2019-02-07 13:26 ` Kevin Traynor
2019-02-07 13:26 ` [dpdk-stable] patch 'app/testpmd: fix Tx metadata show command' " Kevin Traynor
` (13 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:26 UTC (permalink / raw)
To: Igor Romanov; +Cc: Andrew Rybchenko, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 35d082c20711099610d3c4d54957bf21dfe6c4aa Mon Sep 17 00:00:00 2001
From: Igor Romanov <igor.romanov@oktetlabs.ru>
Date: Wed, 23 Jan 2019 13:08:55 +0000
Subject: [PATCH] net/sfc: fix crash in EF10 TSO if no payload
[ upstream commit c2303617e664d5af3e5aac143d407f0474d5d7c0 ]
Fixes: 6bc985e41155 ("net/sfc: support TSO in EF10 Tx datapath")
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
drivers/net/sfc/sfc_ef10_tx.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/sfc/sfc_ef10_tx.c b/drivers/net/sfc/sfc_ef10_tx.c
index bcd3153ff..ff6d5b486 100644
--- a/drivers/net/sfc/sfc_ef10_tx.c
+++ b/drivers/net/sfc/sfc_ef10_tx.c
@@ -382,4 +382,7 @@ sfc_ef10_xmit_tso_pkt(struct sfc_ef10_txq * const txq, struct rte_mbuf *m_seg,
hdr_iova = rte_mbuf_data_iova(m_seg);
if (rte_pktmbuf_data_len(m_seg) == header_len) {
+ /* Cannot send a packet that consists only of header */
+ if (unlikely(m_seg->next == NULL))
+ return EMSGSIZE;
/*
* Associate header mbuf with header descriptor
@@ -410,4 +413,8 @@ sfc_ef10_xmit_tso_pkt(struct sfc_ef10_txq * const txq, struct rte_mbuf *m_seg,
&m_seg, &in_off);
+ /* Cannot send a packet that consists only of header */
+ if (unlikely(m_seg == NULL))
+ return EMSGSIZE;
+
m_seg_to_free_up_to = m_seg;
/*
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.832698592 +0000
+++ 0054-net-sfc-fix-crash-in-EF10-TSO-if-no-payload.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,10 +1,11 @@
-From c2303617e664d5af3e5aac143d407f0474d5d7c0 Mon Sep 17 00:00:00 2001
+From 35d082c20711099610d3c4d54957bf21dfe6c4aa Mon Sep 17 00:00:00 2001
From: Igor Romanov <igor.romanov@oktetlabs.ru>
Date: Wed, 23 Jan 2019 13:08:55 +0000
Subject: [PATCH] net/sfc: fix crash in EF10 TSO if no payload
+[ upstream commit c2303617e664d5af3e5aac143d407f0474d5d7c0 ]
+
Fixes: 6bc985e41155 ("net/sfc: support TSO in EF10 Tx datapath")
-Cc: stable@dpdk.org
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix Tx metadata show command' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (52 preceding siblings ...)
2019-02-07 13:26 ` [dpdk-stable] patch 'net/sfc: fix crash in EF10 TSO if no payload' " Kevin Traynor
@ 2019-02-07 13:26 ` Kevin Traynor
2019-02-07 13:26 ` [dpdk-stable] patch 'net/virtio-user: fix used ring in cvq handling' " Kevin Traynor
` (12 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:26 UTC (permalink / raw)
To: Dekel Peled; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 3830f48513ff1568b81f9b3d694444e0766c8b4f Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Tue, 22 Jan 2019 17:16:43 +0200
Subject: [PATCH] app/testpmd: fix Tx metadata show command
[ upstream commit 5ffbd70b1712d1856aa86f18877628b2d94813ce ]
Function cmd_config_tx_metadata_specific_parsed() takes input value,
applies rte_cpu_to_be_32() on it, and stores it for Tx use.
Function cmd_show_tx_metadata_parsed() displays the stored value as is.
This patch modifies function cmd_show_tx_metadata_parsed(), to apply
rte_be_to_cpu_32() on the stored value before displaying it.
Fixes: c18feafa193c ("app/testpmd: support metadata as flow rule item")
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
app/test-pmd/cmdline.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 3ddc3e02a..51704b500 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -18456,5 +18456,5 @@ cmd_show_tx_metadata_parsed(void *parsed_result,
if (!strcmp(res->cmd_keyword, "tx_metadata")) {
printf("Port %u tx_metadata: %u\n", res->cmd_pid,
- ports[res->cmd_pid].tx_metadata);
+ rte_be_to_cpu_32(ports[res->cmd_pid].tx_metadata));
}
}
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.855713177 +0000
+++ 0055-app-testpmd-fix-Tx-metadata-show-command.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From 5ffbd70b1712d1856aa86f18877628b2d94813ce Mon Sep 17 00:00:00 2001
+From 3830f48513ff1568b81f9b3d694444e0766c8b4f Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Tue, 22 Jan 2019 17:16:43 +0200
Subject: [PATCH] app/testpmd: fix Tx metadata show command
+[ upstream commit 5ffbd70b1712d1856aa86f18877628b2d94813ce ]
+
Function cmd_config_tx_metadata_specific_parsed() takes input value,
applies rte_cpu_to_be_32() on it, and stores it for Tx use.
Function cmd_show_tx_metadata_parsed() displays the stored value as is.
@@ -11,7 +13,6 @@
rte_be_to_cpu_32() on the stored value before displaying it.
Fixes: c18feafa193c ("app/testpmd: support metadata as flow rule item")
-Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/virtio-user: fix used ring in cvq handling' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (53 preceding siblings ...)
2019-02-07 13:26 ` [dpdk-stable] patch 'app/testpmd: fix Tx metadata show command' " Kevin Traynor
@ 2019-02-07 13:26 ` Kevin Traynor
2019-02-07 13:26 ` [dpdk-stable] patch 'net/mlx5: fix TC rule handle assignment' " Kevin Traynor
` (11 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:26 UTC (permalink / raw)
To: Tiwei Bie; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From a3634e471cef6188d35ad349e03c66e899e2412a Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Wed, 23 Jan 2019 01:01:43 +0800
Subject: [PATCH] net/virtio-user: fix used ring in cvq handling
[ upstream commit 0403e37a468df59707ed938cca4a507276a0befb ]
When updating used ring, the id in used element should be the
index of the first desc in the desc chain.
Fixes: f9b9d1a55775 ("net/virtio-user: add multiple queues in device emulation")
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/virtio/virtio_user/virtio_user_dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 20816c936..9c8bcd2c6 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -625,5 +625,5 @@ virtio_user_handle_cq(struct virtio_user_dev *dev, uint16_t queue_idx)
/* Update used ring */
uep = &vring->used->ring[avail_idx];
- uep->id = avail_idx;
+ uep->id = desc_idx;
uep->len = n_descs;
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.897290049 +0000
+++ 0056-net-virtio-user-fix-used-ring-in-cvq-handling.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,13 +1,14 @@
-From 0403e37a468df59707ed938cca4a507276a0befb Mon Sep 17 00:00:00 2001
+From a3634e471cef6188d35ad349e03c66e899e2412a Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Wed, 23 Jan 2019 01:01:43 +0800
Subject: [PATCH] net/virtio-user: fix used ring in cvq handling
+[ upstream commit 0403e37a468df59707ed938cca4a507276a0befb ]
+
When updating used ring, the id in used element should be the
index of the first desc in the desc chain.
Fixes: f9b9d1a55775 ("net/virtio-user: add multiple queues in device emulation")
-Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -16,10 +17,10 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
-index 89d287a74..d1157378d 100644
+index 20816c936..9c8bcd2c6 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
-@@ -723,5 +723,5 @@ virtio_user_handle_cq(struct virtio_user_dev *dev, uint16_t queue_idx)
+@@ -625,5 +625,5 @@ virtio_user_handle_cq(struct virtio_user_dev *dev, uint16_t queue_idx)
/* Update used ring */
uep = &vring->used->ring[avail_idx];
- uep->id = avail_idx;
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix TC rule handle assignment' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (54 preceding siblings ...)
2019-02-07 13:26 ` [dpdk-stable] patch 'net/virtio-user: fix used ring in cvq handling' " Kevin Traynor
@ 2019-02-07 13:26 ` Kevin Traynor
2019-02-07 13:26 ` [dpdk-stable] patch 'net/mlx5: fix VXLAN port registration race condition' " Kevin Traynor
` (10 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:26 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Shahaf Shuler, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From a81e12468e1e834705750b8ba37876977f101ba9 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Tue, 22 Jan 2019 12:05:46 +0000
Subject: [PATCH] net/mlx5: fix TC rule handle assignment
[ upstream commit 0deb984fd7e59746625e8a16b1b28b7b048971ee ]
When tc rule is created via Netlink message application
can provide the unique rule value which can be accepted
by the kernel. Than rule is managed with this assigned
handle. It was found that kernel can reject the proposed
handle and assign its own handle value, the rule control
is lost, because application uses its initially prorosed
rule handle and knows nothing about handle been repleced.
The kernel can assign handle automatically, the application
can get the assigned handle value by specifying NLM_F_ECHO
flag in Netlink message when rule is being created. The
kernel sends back the full descriptor of rule and handle
can be retrieved from and stored by application for further
rule management.
Fixes: 57123c00c1b8 ("net/mlx5: add Linux TC flower driver for E-Switch flow")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_tcf.c | 97 ++++++++++++++++++++------------
1 file changed, 60 insertions(+), 37 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_tcf.c b/drivers/net/mlx5/mlx5_flow_tcf.c
index 14896e64d..94421c5a1 100644
--- a/drivers/net/mlx5/mlx5_flow_tcf.c
+++ b/drivers/net/mlx5/mlx5_flow_tcf.c
@@ -2666,25 +2666,4 @@ action_of_vlan:
}
-/**
- * Brand rtnetlink buffer with unique handle.
- *
- * This handle should be unique for a given network interface to avoid
- * collisions.
- *
- * @param nlh
- * Pointer to Netlink message.
- * @param handle
- * Unique 32-bit handle to use.
- */
-static void
-flow_tcf_nl_brand(struct nlmsghdr *nlh, uint32_t handle)
-{
- struct tcmsg *tcm = mnl_nlmsg_get_payload(nlh);
-
- tcm->tcm_handle = handle;
- DRV_LOG(DEBUG, "Netlink msg %p is branded with handle %x",
- (void *)nlh, handle);
-}
-
/**
* Prepare a flow object for Linux TC flower. It calculates the maximum size of
@@ -2777,18 +2756,4 @@ flow_tcf_prepare(const struct rte_flow_attr *attr,
else if (action_flags & MLX5_FLOW_ACTION_VXLAN_ENCAP)
dev_flow->tcf.tunnel->type = FLOW_TCF_TUNACT_VXLAN_ENCAP;
- /*
- * Generate a reasonably unique handle based on the address of the
- * target buffer.
- *
- * This is straightforward on 32-bit systems where the flow pointer can
- * be used directly. Otherwise, its least significant part is taken
- * after shifting it by the previous power of two of the pointed buffer
- * size.
- */
- if (sizeof(dev_flow) <= 4)
- flow_tcf_nl_brand(nlh, (uintptr_t)dev_flow);
- else
- flow_tcf_nl_brand(nlh, (uintptr_t)dev_flow >>
- rte_log2_u32(rte_align32prevpow2(size)));
return dev_flow;
}
@@ -5349,4 +5314,5 @@ flow_tcf_remove(struct rte_eth_dev *dev, struct rte_flow *flow)
struct mlx5_flow *dev_flow;
struct nlmsghdr *nlh;
+ struct tcmsg *tcm;
if (!flow)
@@ -5369,8 +5335,51 @@ flow_tcf_remove(struct rte_eth_dev *dev, struct rte_flow *flow)
dev_flow->tcf.tunnel->vtep = NULL;
}
+ /* Cleanup the rule handle value. */
+ tcm = mnl_nlmsg_get_payload(nlh);
+ tcm->tcm_handle = 0;
dev_flow->tcf.applied = 0;
}
}
+/**
+ * Fetch the applied rule handle. This is callback routine called by
+ * libmnl mnl_cb_run() in loop for every message in received packet.
+ * When the NLM_F_ECHO flag i sspecified the kernel sends the created
+ * rule descriptor back to the application and we can retrieve the
+ * actual rule handle from updated descriptor.
+ *
+ * @param[in] nlh
+ * Pointer to reply header.
+ * @param[in, out] arg
+ * Context pointer for this callback.
+ *
+ * @return
+ * A positive, nonzero value on success (required by libmnl
+ * to continue messages processing).
+ */
+static int
+flow_tcf_collect_apply_cb(const struct nlmsghdr *nlh, void *arg)
+{
+ struct nlmsghdr *nlhrq = arg;
+ struct tcmsg *tcmrq = mnl_nlmsg_get_payload(nlhrq);
+ struct tcmsg *tcm = mnl_nlmsg_get_payload(nlh);
+ struct nlattr *na;
+
+ if (nlh->nlmsg_type != RTM_NEWTFILTER ||
+ nlh->nlmsg_seq != nlhrq->nlmsg_seq)
+ return 1;
+ mnl_attr_for_each(na, nlh, sizeof(*tcm)) {
+ switch (mnl_attr_get_type(na)) {
+ case TCA_KIND:
+ if (strcmp(mnl_attr_get_payload(na), "flower")) {
+ /* Not flower filter, drop entire message. */
+ return 1;
+ }
+ tcmrq->tcm_handle = tcm->tcm_handle;
+ return 1;
+ }
+ }
+ return 1;
+}
/**
* Apply flow to E-Switch by sending Netlink message.
@@ -5394,4 +5403,6 @@ flow_tcf_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
struct mlx5_flow *dev_flow;
struct nlmsghdr *nlh;
+ struct tcmsg *tcm;
+ int ret;
dev_flow = LIST_FIRST(&flow->dev_flows);
@@ -5402,5 +5413,9 @@ flow_tcf_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
nlh = dev_flow->tcf.nlh;
nlh->nlmsg_type = RTM_NEWTFILTER;
- nlh->nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE | NLM_F_EXCL;
+ nlh->nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE |
+ NLM_F_EXCL | NLM_F_ECHO;
+ tcm = mnl_nlmsg_get_payload(nlh);
+ /* Allow kernel to assign handle on its own. */
+ tcm->tcm_handle = 0;
if (dev_flow->tcf.tunnel) {
/*
@@ -5423,5 +5438,13 @@ flow_tcf_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
dev_flow->tcf.tunnel->vtep->ifindex;
}
- if (!flow_tcf_nl_ack(ctx, nlh, NULL, NULL)) {
+ ret = flow_tcf_nl_ack(ctx, nlh, flow_tcf_collect_apply_cb, nlh);
+ if (!ret) {
+ if (!tcm->tcm_handle) {
+ flow_tcf_remove(dev, flow);
+ return rte_flow_error_set
+ (error, ENOENT,
+ RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
+ "netlink: rule zero handle returned");
+ }
dev_flow->tcf.applied = 1;
if (*dev_flow->tcf.ptc_flags & TCA_CLS_FLAGS_SKIP_SW)
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.920261543 +0000
+++ 0057-net-mlx5-fix-TC-rule-handle-assignment.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From 0deb984fd7e59746625e8a16b1b28b7b048971ee Mon Sep 17 00:00:00 2001
+From a81e12468e1e834705750b8ba37876977f101ba9 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Tue, 22 Jan 2019 12:05:46 +0000
Subject: [PATCH] net/mlx5: fix TC rule handle assignment
+[ upstream commit 0deb984fd7e59746625e8a16b1b28b7b048971ee ]
+
When tc rule is created via Netlink message application
can provide the unique rule value which can be accepted
by the kernel. Than rule is managed with this assigned
@@ -19,7 +21,6 @@
rule management.
Fixes: 57123c00c1b8 ("net/mlx5: add Linux TC flower driver for E-Switch flow")
-Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
@@ -28,10 +29,10 @@
1 file changed, 60 insertions(+), 37 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_tcf.c b/drivers/net/mlx5/mlx5_flow_tcf.c
-index cf34742d5..859e99a9a 100644
+index 14896e64d..94421c5a1 100644
--- a/drivers/net/mlx5/mlx5_flow_tcf.c
+++ b/drivers/net/mlx5/mlx5_flow_tcf.c
-@@ -2778,25 +2778,4 @@ action_of_vlan:
+@@ -2666,25 +2666,4 @@ action_of_vlan:
}
-/**
@@ -57,7 +58,7 @@
-
/**
* Prepare a flow object for Linux TC flower. It calculates the maximum size of
-@@ -2889,18 +2868,4 @@ flow_tcf_prepare(const struct rte_flow_attr *attr,
+@@ -2777,18 +2756,4 @@ flow_tcf_prepare(const struct rte_flow_attr *attr,
else if (action_flags & MLX5_FLOW_ACTION_VXLAN_ENCAP)
dev_flow->tcf.tunnel->type = FLOW_TCF_TUNACT_VXLAN_ENCAP;
- /*
@@ -76,13 +77,13 @@
- rte_log2_u32(rte_align32prevpow2(size)));
return dev_flow;
}
-@@ -5594,4 +5559,5 @@ flow_tcf_remove(struct rte_eth_dev *dev, struct rte_flow *flow)
+@@ -5349,4 +5314,5 @@ flow_tcf_remove(struct rte_eth_dev *dev, struct rte_flow *flow)
struct mlx5_flow *dev_flow;
struct nlmsghdr *nlh;
+ struct tcmsg *tcm;
if (!flow)
-@@ -5614,8 +5580,51 @@ flow_tcf_remove(struct rte_eth_dev *dev, struct rte_flow *flow)
+@@ -5369,8 +5335,51 @@ flow_tcf_remove(struct rte_eth_dev *dev, struct rte_flow *flow)
dev_flow->tcf.tunnel->vtep = NULL;
}
+ /* Cleanup the rule handle value. */
@@ -134,14 +135,14 @@
+}
/**
* Apply flow to E-Switch by sending Netlink message.
-@@ -5639,4 +5648,6 @@ flow_tcf_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
+@@ -5394,4 +5403,6 @@ flow_tcf_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
struct mlx5_flow *dev_flow;
struct nlmsghdr *nlh;
+ struct tcmsg *tcm;
+ int ret;
dev_flow = LIST_FIRST(&flow->dev_flows);
-@@ -5647,5 +5658,9 @@ flow_tcf_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
+@@ -5402,5 +5413,9 @@ flow_tcf_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
nlh = dev_flow->tcf.nlh;
nlh->nlmsg_type = RTM_NEWTFILTER;
- nlh->nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE | NLM_F_EXCL;
@@ -152,7 +153,7 @@
+ tcm->tcm_handle = 0;
if (dev_flow->tcf.tunnel) {
/*
-@@ -5668,5 +5683,13 @@ flow_tcf_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
+@@ -5423,5 +5438,13 @@ flow_tcf_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
dev_flow->tcf.tunnel->vtep->ifindex;
}
- if (!flow_tcf_nl_ack(ctx, nlh, NULL, NULL)) {
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix VXLAN port registration race condition' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (55 preceding siblings ...)
2019-02-07 13:26 ` [dpdk-stable] patch 'net/mlx5: fix TC rule handle assignment' " Kevin Traynor
@ 2019-02-07 13:26 ` Kevin Traynor
2019-02-07 13:26 ` [dpdk-stable] patch 'net/i40e: fix statistics' " Kevin Traynor
` (9 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:26 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Shahaf Shuler, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From e207f69599507de39b70b58bad472acf9487c6c4 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Wed, 23 Jan 2019 07:51:18 +0000
Subject: [PATCH] net/mlx5: fix VXLAN port registration race condition
[ upstream commit 71ab2d64723c8b7192eea01877012de7aa5c2476 ]
E-Switch VXLAN tunneling rules require virtual VXLAN network
devices be created. These devices are managed by MLX5 PMD and
created/deleted dynamically.
Kernel creates the VXLAN devices and registers VXLAN UDP ports
to be hardware offloaded within the NIC kernel drivers. The
registration process is being performed into context of working
kernel thread and the race conditions might happen.
The VXLAN device is created and success code is returned to calling
application, but the UDP port registration process is not completed
yet and the next applied rule might be rejected by the driver with
ENOSUP code. This patch adds some timeout for new created devices,
allowing port registration process to be completed. The waiting
is performed once after device been created and first rule is being
applied.
Fixes: 95a464cecc21 ("net/mlx5: add E-switch VXLAN tunnel devices management")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_tcf.c | 49 ++++++++++++++++++++++++++++++--
1 file changed, 47 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_tcf.c b/drivers/net/mlx5/mlx5_flow_tcf.c
index 94421c5a1..e677404cf 100644
--- a/drivers/net/mlx5/mlx5_flow_tcf.c
+++ b/drivers/net/mlx5/mlx5_flow_tcf.c
@@ -321,4 +321,9 @@ struct tc_tunnel_key {
#define MLX5_VXLAN_PORT_MAX 60000
#define MLX5_VXLAN_DEVICE_PFX "vmlx_"
+/**
+ * Timeout in milliseconds to wait VXLAN UDP offloaded port
+ * registration completed within the mlx5 driver.
+ */
+#define MLX5_VXLAN_WAIT_PORT_REG_MS 250
/** Tunnel action type, used for @p type in header structure. */
@@ -404,5 +409,6 @@ struct tcf_vtep {
unsigned int ifouter; /**< Index of device attached to. */
uint16_t port;
- uint8_t created;
+ uint32_t created:1; /**< Actually created by PMD. */
+ uint32_t waitreg:1; /**< Wait for VXLAN UDP port registration. */
};
@@ -4889,4 +4895,5 @@ flow_tcf_vtep_create(struct mlx5_flow_tcf_context *tcf,
*/
vtep->created = 1;
+ vtep->waitreg = 1;
}
/* Try to get ifindex of created of pre-existing device. */
@@ -5404,4 +5411,6 @@ flow_tcf_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
struct nlmsghdr *nlh;
struct tcmsg *tcm;
+ uint64_t start = 0;
+ uint64_t twait = 0;
int ret;
@@ -5437,6 +5446,42 @@ flow_tcf_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
*dev_flow->tcf.tunnel->ifindex_ptr =
dev_flow->tcf.tunnel->vtep->ifindex;
+ if (dev_flow->tcf.tunnel->vtep->waitreg) {
+ /* Clear wait flag for VXLAN port registration. */
+ dev_flow->tcf.tunnel->vtep->waitreg = 0;
+ twait = rte_get_timer_hz();
+ assert(twait > MS_PER_S);
+ twait = twait * MLX5_VXLAN_WAIT_PORT_REG_MS;
+ twait = twait / MS_PER_S;
+ start = rte_get_timer_cycles();
+ }
}
- ret = flow_tcf_nl_ack(ctx, nlh, flow_tcf_collect_apply_cb, nlh);
+ /*
+ * Kernel creates the VXLAN devices and registers UDP ports to
+ * be hardware offloaded within the NIC kernel drivers. The
+ * registration process is being performed into context of
+ * working kernel thread and the race conditions might happen.
+ * The VXLAN device is created and success is returned to
+ * calling application, but the UDP port registration process
+ * is not completed yet. The next applied rule may be rejected
+ * by the driver with ENOSUP code. We are going to wait a bit,
+ * allowing registration process to be completed. The waiting
+ * is performed once after device been created.
+ */
+ do {
+ struct timespec onems;
+
+ ret = flow_tcf_nl_ack(ctx, nlh,
+ flow_tcf_collect_apply_cb, nlh);
+ if (!ret || ret != -ENOTSUP || !twait)
+ break;
+ /* Wait one millisecond and try again till timeout. */
+ onems.tv_sec = 0;
+ onems.tv_nsec = NS_PER_S / MS_PER_S;
+ nanosleep(&onems, 0);
+ if ((rte_get_timer_cycles() - start) > twait) {
+ /* Timeout elapsed, try once more and exit. */
+ twait = 0;
+ }
+ } while (true);
if (!ret) {
if (!tcm->tcm_handle) {
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.949187144 +0000
+++ 0058-net-mlx5-fix-VXLAN-port-registration-race-condition.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From 71ab2d64723c8b7192eea01877012de7aa5c2476 Mon Sep 17 00:00:00 2001
+From e207f69599507de39b70b58bad472acf9487c6c4 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Wed, 23 Jan 2019 07:51:18 +0000
Subject: [PATCH] net/mlx5: fix VXLAN port registration race condition
+[ upstream commit 71ab2d64723c8b7192eea01877012de7aa5c2476 ]
+
E-Switch VXLAN tunneling rules require virtual VXLAN network
devices be created. These devices are managed by MLX5 PMD and
created/deleted dynamically.
@@ -21,7 +23,6 @@
applied.
Fixes: 95a464cecc21 ("net/mlx5: add E-switch VXLAN tunnel devices management")
-Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
@@ -30,11 +31,11 @@
1 file changed, 47 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_tcf.c b/drivers/net/mlx5/mlx5_flow_tcf.c
-index 859e99a9a..b8204df63 100644
+index 94421c5a1..e677404cf 100644
--- a/drivers/net/mlx5/mlx5_flow_tcf.c
+++ b/drivers/net/mlx5/mlx5_flow_tcf.c
-@@ -355,4 +355,9 @@ struct tc_tunnel_key {
- #define MLX5_VXLAN_DEFAULT_VNI 1
+@@ -321,4 +321,9 @@ struct tc_tunnel_key {
+ #define MLX5_VXLAN_PORT_MAX 60000
#define MLX5_VXLAN_DEVICE_PFX "vmlx_"
+/**
+ * Timeout in milliseconds to wait VXLAN UDP offloaded port
@@ -43,28 +44,28 @@
+#define MLX5_VXLAN_WAIT_PORT_REG_MS 250
/** Tunnel action type, used for @p type in header structure. */
-@@ -446,5 +451,6 @@ struct tcf_vtep {
- unsigned int ifindex; /**< Own interface index. */
+@@ -404,5 +409,6 @@ struct tcf_vtep {
+ unsigned int ifouter; /**< Index of device attached to. */
uint16_t port;
- uint8_t created;
+ uint32_t created:1; /**< Actually created by PMD. */
+ uint32_t waitreg:1; /**< Wait for VXLAN UDP port registration. */
};
-@@ -5168,4 +5174,5 @@ flow_tcf_vtep_create(struct mlx5_flow_tcf_context *tcf,
+@@ -4889,4 +4895,5 @@ flow_tcf_vtep_create(struct mlx5_flow_tcf_context *tcf,
*/
vtep->created = 1;
+ vtep->waitreg = 1;
}
/* Try to get ifindex of created of pre-existing device. */
-@@ -5649,4 +5656,6 @@ flow_tcf_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
+@@ -5404,4 +5411,6 @@ flow_tcf_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
struct nlmsghdr *nlh;
struct tcmsg *tcm;
+ uint64_t start = 0;
+ uint64_t twait = 0;
int ret;
-@@ -5682,6 +5691,42 @@ flow_tcf_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
+@@ -5437,6 +5446,42 @@ flow_tcf_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
*dev_flow->tcf.tunnel->ifindex_ptr =
dev_flow->tcf.tunnel->vtep->ifindex;
+ if (dev_flow->tcf.tunnel->vtep->waitreg) {
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix statistics' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (56 preceding siblings ...)
2019-02-07 13:26 ` [dpdk-stable] patch 'net/mlx5: fix VXLAN port registration race condition' " Kevin Traynor
@ 2019-02-07 13:26 ` Kevin Traynor
2019-02-07 13:26 ` [dpdk-stable] patch 'net/sfc: fix port ID log' " Kevin Traynor
` (8 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:26 UTC (permalink / raw)
To: Chenmin Sun; +Cc: Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 81714c8347638c6c01b66f1bf8ecd1bb809d421f Mon Sep 17 00:00:00 2001
From: Chenmin Sun <chenmin.sun@intel.com>
Date: Wed, 23 Jan 2019 21:30:03 +0800
Subject: [PATCH] net/i40e: fix statistics
[ upstream commit 866000d94939c44c5e8cbc8d1624300dae16c21a ]
1. Fix the lldp stop condition check - for firmware
versions 6.01(for X710)/3.33(for X722) or later we need stop the lldp
2. deferred stats reset in dev_init to avoid some noise be counted.
3. Document known issue for tx bytes decreasing due to link status change
Fixes: 044846f071cc ("net/i40e: stop LLDP before setting local LLDP MIB")
Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
doc/guides/nics/i40e.rst | 6 ++++++
drivers/net/i40e/i40e_ethdev.c | 37 ++++++++++++++++++++++++++--------
2 files changed, 35 insertions(+), 8 deletions(-)
diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst
index bfacbd117..40bf0f140 100644
--- a/doc/guides/nics/i40e.rst
+++ b/doc/guides/nics/i40e.rst
@@ -696,2 +696,8 @@ See :numref:`figure_intel_perf_test_setup` for the performance test setup.
* Set the Ethernet II type to 0x0800.
+
+Tx bytes affected by the link status change
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+For firmware versions prior to 6.01 for X710 series and 3.33 for X722 series, the tx_bytes statistics data is affected by
+the link down event. Each time the link status changes to down, the tx_bytes decreases 110 bytes.
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index f97cd5348..dca61f03a 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1494,7 +1494,4 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
}
- /* reset all stats of the device, including pf and main vsi */
- i40e_dev_stats_reset(dev);
-
vsi = pf->main_vsi;
@@ -1591,4 +1588,7 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
sizeof(struct i40e_rte_flow_rss_conf));
+ /* reset all stats of the device, including pf and main vsi */
+ i40e_dev_stats_reset(dev);
+
return 0;
@@ -3461,4 +3461,29 @@ i40e_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
}
+/*
+ * When using NVM 6.01(for X710 XL710 XXV710)/3.33(for X722) or later,
+ * the Rx data path does not hang if the FW LLDP is stopped.
+ * return true if lldp need to stop
+ * return false if we cannot disable the LLDP to avoid Rx data path blocking.
+ */
+static bool
+i40e_need_stop_lldp(struct rte_eth_dev *dev)
+{
+ double nvm_ver;
+ char ver_str[64] = {0};
+ struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+
+ i40e_fw_version_get(dev, ver_str, 64);
+ nvm_ver = atof(ver_str);
+ if ((hw->mac.type == I40E_MAC_X722 ||
+ hw->mac.type == I40E_MAC_X722_VF) &&
+ ((uint32_t)(nvm_ver * 1000) >= (uint32_t)(3.33 * 1000)))
+ return true;
+ else if ((uint32_t)(nvm_ver * 1000) >= (uint32_t)(6.01 * 1000))
+ return true;
+
+ return false;
+}
+
static void
i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
@@ -11428,9 +11453,5 @@ i40e_dcb_init_configure(struct rte_eth_dev *dev, bool sw_dcb)
*/
if (sw_dcb == TRUE) {
- /* When using NVM 6.01 or later, the RX data path does
- * not hang if the FW LLDP is stopped.
- */
- if (((hw->nvm.version >> 12) & 0xf) >= 6 &&
- ((hw->nvm.version >> 4) & 0xff) >= 1) {
+ if (i40e_need_stop_lldp(dev)) {
ret = i40e_aq_stop_lldp(hw, TRUE, NULL);
if (ret != I40E_SUCCESS)
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.977694243 +0000
+++ 0059-net-i40e-fix-statistics.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,15 +1,16 @@
-From 866000d94939c44c5e8cbc8d1624300dae16c21a Mon Sep 17 00:00:00 2001
+From 81714c8347638c6c01b66f1bf8ecd1bb809d421f Mon Sep 17 00:00:00 2001
From: Chenmin Sun <chenmin.sun@intel.com>
Date: Wed, 23 Jan 2019 21:30:03 +0800
Subject: [PATCH] net/i40e: fix statistics
+[ upstream commit 866000d94939c44c5e8cbc8d1624300dae16c21a ]
+
1. Fix the lldp stop condition check - for firmware
versions 6.01(for X710)/3.33(for X722) or later we need stop the lldp
2. deferred stats reset in dev_init to avoid some noise be counted.
3. Document known issue for tx bytes decreasing due to link status change
Fixes: 044846f071cc ("net/i40e: stop LLDP before setting local LLDP MIB")
-Cc: stable@dpdk.org
Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -19,10 +20,10 @@
2 files changed, 35 insertions(+), 8 deletions(-)
diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst
-index 53bc02495..9680a92a9 100644
+index bfacbd117..40bf0f140 100644
--- a/doc/guides/nics/i40e.rst
+++ b/doc/guides/nics/i40e.rst
-@@ -705,2 +705,8 @@ See :numref:`figure_intel_perf_test_setup` for the performance test setup.
+@@ -696,2 +696,8 @@ See :numref:`figure_intel_perf_test_setup` for the performance test setup.
* Set the Ethernet II type to 0x0800.
+
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/sfc: fix port ID log' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (57 preceding siblings ...)
2019-02-07 13:26 ` [dpdk-stable] patch 'net/i40e: fix statistics' " Kevin Traynor
@ 2019-02-07 13:26 ` Kevin Traynor
2019-02-07 13:26 ` [dpdk-stable] patch 'net/mlx5: fix VXLAN without decap action for E-Switch' " Kevin Traynor
` (7 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:26 UTC (permalink / raw)
To: Ivan Malov; +Cc: Andrew Rybchenko, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 83f5c28801dbac30d856dd366e11466558c13cc8 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Thu, 24 Jan 2019 15:20:16 +0000
Subject: [PATCH] net/sfc: fix port ID log
[ upstream commit 5a88b9b3f0ca0578779c3efad2e362c8770353b4 ]
Log port ID as 16-bit unsigned integer.
Fixes: f8244c6399d9 ("ethdev: increase port id range")
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
drivers/net/sfc/sfc_log.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/sfc/sfc_log.h b/drivers/net/sfc/sfc_log.h
index d6f343524..b11fbfb0a 100644
--- a/drivers/net/sfc/sfc_log.h
+++ b/drivers/net/sfc/sfc_log.h
@@ -38,5 +38,6 @@ extern uint32_t sfc_logtype_driver;
\
rte_log(level, type, \
- RTE_FMT("PMD: sfc_efx " PCI_PRI_FMT " #%" PRIu8 \
+ RTE_FMT("PMD: sfc_efx " \
+ PCI_PRI_FMT " #%" PRIu16 \
": " RTE_FMT_HEAD(__VA_ARGS__ ,) "\n", \
__sa->pci_addr.domain, \
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:57.014535024 +0000
+++ 0060-net-sfc-fix-port-ID-log.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,12 +1,13 @@
-From 5a88b9b3f0ca0578779c3efad2e362c8770353b4 Mon Sep 17 00:00:00 2001
+From 83f5c28801dbac30d856dd366e11466558c13cc8 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Thu, 24 Jan 2019 15:20:16 +0000
Subject: [PATCH] net/sfc: fix port ID log
+[ upstream commit 5a88b9b3f0ca0578779c3efad2e362c8770353b4 ]
+
Log port ID as 16-bit unsigned integer.
Fixes: f8244c6399d9 ("ethdev: increase port id range")
-Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix VXLAN without decap action for E-Switch' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (58 preceding siblings ...)
2019-02-07 13:26 ` [dpdk-stable] patch 'net/sfc: fix port ID log' " Kevin Traynor
@ 2019-02-07 13:26 ` Kevin Traynor
2019-02-07 13:26 ` [dpdk-stable] patch 'net/ena: fix dev init with multi-process' " Kevin Traynor
` (6 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:26 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Shahaf Shuler, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From efdf095669689eeda02c586665708ccd6f469c8a Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Fri, 25 Jan 2019 15:29:35 +0000
Subject: [PATCH] net/mlx5: fix VXLAN without decap action for E-Switch
[ upstream commit a9c94cc05015f34cd904e7903c698be1ddefbcc6 ]
There is an intention to support VXLAN tunnel match without
hardware offloaded decapsulation, just to redirect ingress
tunnelled frame untouched. This small fix allows to specify
Flows with VXLAN VNI pattern and with or without following
decapsulation action.
Fixes: 251e8d02cf37 ("net/mlx5: add VXLAN to flow translate routine")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_tcf.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow_tcf.c b/drivers/net/mlx5/mlx5_flow_tcf.c
index e677404cf..dd842c896 100644
--- a/drivers/net/mlx5/mlx5_flow_tcf.c
+++ b/drivers/net/mlx5/mlx5_flow_tcf.c
@@ -2572,5 +2572,5 @@ flow_tcf_get_actions_and_size(const struct rte_flow_action actions[],
{
int size = 0;
- uint64_t flags = 0;
+ uint64_t flags = *action_flags;
size += SZ_NLATTR_NEST; /* TCA_FLOWER_ACT. */
@@ -3585,4 +3585,8 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
(mnl_nlmsg_get_payload_tail
(nlh)))->ifindex;
+ } else if (decap.hdr) {
+ assert(dev_flow->tcf.tunnel);
+ dev_flow->tcf.tunnel->ifindex_ptr =
+ (unsigned int *)&tcm->tcm_ifindex;
}
mnl_attr_put(nlh, TCA_MIRRED_PARMS,
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:57.037009829 +0000
+++ 0061-net-mlx5-fix-VXLAN-without-decap-action-for-E-Switch.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From a9c94cc05015f34cd904e7903c698be1ddefbcc6 Mon Sep 17 00:00:00 2001
+From efdf095669689eeda02c586665708ccd6f469c8a Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Fri, 25 Jan 2019 15:29:35 +0000
Subject: [PATCH] net/mlx5: fix VXLAN without decap action for E-Switch
+[ upstream commit a9c94cc05015f34cd904e7903c698be1ddefbcc6 ]
+
There is an intention to support VXLAN tunnel match without
hardware offloaded decapsulation, just to redirect ingress
tunnelled frame untouched. This small fix allows to specify
@@ -10,7 +12,6 @@
decapsulation action.
Fixes: 251e8d02cf37 ("net/mlx5: add VXLAN to flow translate routine")
-Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
@@ -19,17 +20,17 @@
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow_tcf.c b/drivers/net/mlx5/mlx5_flow_tcf.c
-index b8204df63..e132a3482 100644
+index e677404cf..dd842c896 100644
--- a/drivers/net/mlx5/mlx5_flow_tcf.c
+++ b/drivers/net/mlx5/mlx5_flow_tcf.c
-@@ -2684,5 +2684,5 @@ flow_tcf_get_actions_and_size(const struct rte_flow_action actions[],
+@@ -2572,5 +2572,5 @@ flow_tcf_get_actions_and_size(const struct rte_flow_action actions[],
{
int size = 0;
- uint64_t flags = 0;
+ uint64_t flags = *action_flags;
size += SZ_NLATTR_NEST; /* TCA_FLOWER_ACT. */
-@@ -3780,4 +3780,8 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
+@@ -3585,4 +3585,8 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
(mnl_nlmsg_get_payload_tail
(nlh)))->ifindex;
+ } else if (decap.hdr) {
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/ena: fix dev init with multi-process' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (59 preceding siblings ...)
2019-02-07 13:26 ` [dpdk-stable] patch 'net/mlx5: fix VXLAN without decap action for E-Switch' " Kevin Traynor
@ 2019-02-07 13:26 ` Kevin Traynor
2019-02-07 13:26 ` [dpdk-stable] patch 'net/ena: fix errno to positive value' " Kevin Traynor
` (5 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:26 UTC (permalink / raw)
To: Michal Krawczyk; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 200d6555caa87e4f016f6f0a1c593f467f23d54c Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Fri, 25 Jan 2019 09:10:25 +0100
Subject: [PATCH] net/ena: fix dev init with multi-process
[ upstream commit fd9768905870856a2340266d25f8c0100dfccfff ]
The check for proc type in eth_ena_dev_init() should appear before
modyfing adapter structure.
Calling memset on ena_adapter from secondary process context, was
erasing all structure information, and it was causing the crash of the
main process.
Fixes: 1173fca25af9 ("ena: add polling-mode driver")
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
---
drivers/net/ena/ena_ethdev.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 333615700..6d06fcba8 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -1575,17 +1575,18 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
bool wd_state;
- memset(adapter, 0, sizeof(struct ena_adapter));
- ena_dev = &adapter->ena_dev;
-
eth_dev->dev_ops = &ena_dev_ops;
eth_dev->rx_pkt_burst = ð_ena_recv_pkts;
eth_dev->tx_pkt_burst = ð_ena_xmit_pkts;
eth_dev->tx_pkt_prepare = ð_ena_prep_pkts;
+
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return 0;
+
+ memset(adapter, 0, sizeof(struct ena_adapter));
+ ena_dev = &adapter->ena_dev;
+
adapter->rte_eth_dev_data = eth_dev->data;
adapter->rte_dev = eth_dev;
- if (rte_eal_process_type() != RTE_PROC_PRIMARY)
- return 0;
-
pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
adapter->pdev = pci_dev;
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:57.065325823 +0000
+++ 0062-net-ena-fix-dev-init-with-multi-process.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From fd9768905870856a2340266d25f8c0100dfccfff Mon Sep 17 00:00:00 2001
+From 200d6555caa87e4f016f6f0a1c593f467f23d54c Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Fri, 25 Jan 2019 09:10:25 +0100
Subject: [PATCH] net/ena: fix dev init with multi-process
+[ upstream commit fd9768905870856a2340266d25f8c0100dfccfff ]
+
The check for proc type in eth_ena_dev_init() should appear before
modyfing adapter structure.
@@ -11,7 +13,6 @@
main process.
Fixes: 1173fca25af9 ("ena: add polling-mode driver")
-Cc: stable@dpdk.org
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
---
@@ -19,10 +20,10 @@
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
-index fde5fa743..747390bb7 100644
+index 333615700..6d06fcba8 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
-@@ -1716,17 +1716,18 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
+@@ -1575,17 +1575,18 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
bool wd_state;
- memset(adapter, 0, sizeof(struct ena_adapter));
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/ena: fix errno to positive value' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (60 preceding siblings ...)
2019-02-07 13:26 ` [dpdk-stable] patch 'net/ena: fix dev init with multi-process' " Kevin Traynor
@ 2019-02-07 13:26 ` Kevin Traynor
2019-02-07 13:26 ` [dpdk-stable] patch 'crypto/qat: fix digest in wireless auth case' " Kevin Traynor
` (4 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:26 UTC (permalink / raw)
To: Michal Krawczyk; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From b1c6319021c04f2032ceb0de0eb3b7cab3063365 Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Fri, 25 Jan 2019 09:10:26 +0100
Subject: [PATCH] net/ena: fix errno to positive value
[ upstream commit baeed5f404dd1b049118cfec26a2fd3203671572 ]
The rte_errno shouldn't have assigned negative error codes, so it has
to be fixed.
Fixes: b3fc5a1ae10d ("net/ena: add Tx preparation")
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
---
drivers/net/ena/ena_ethdev.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 6d06fcba8..6f424337e 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -2009,5 +2009,5 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
(ol_flags & PKT_TX_L4_MASK) ==
PKT_TX_SCTP_CKSUM) {
- rte_errno = -ENOTSUP;
+ rte_errno = ENOTSUP;
return i;
}
@@ -2016,5 +2016,5 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
ret = rte_validate_tx_offload(m);
if (ret != 0) {
- rte_errno = ret;
+ rte_errno = -ret;
return i;
}
@@ -2029,5 +2029,5 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
ol_flags & ~PKT_TX_TCP_SEG);
if (ret != 0) {
- rte_errno = ret;
+ rte_errno = -ret;
return i;
}
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:57.089813432 +0000
+++ 0063-net-ena-fix-errno-to-positive-value.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,13 +1,14 @@
-From baeed5f404dd1b049118cfec26a2fd3203671572 Mon Sep 17 00:00:00 2001
+From b1c6319021c04f2032ceb0de0eb3b7cab3063365 Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Fri, 25 Jan 2019 09:10:26 +0100
Subject: [PATCH] net/ena: fix errno to positive value
+[ upstream commit baeed5f404dd1b049118cfec26a2fd3203671572 ]
+
The rte_errno shouldn't have assigned negative error codes, so it has
to be fixed.
Fixes: b3fc5a1ae10d ("net/ena: add Tx preparation")
-Cc: stable@dpdk.org
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
---
@@ -15,24 +16,24 @@
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
-index 747390bb7..8bb05caa2 100644
+index 6d06fcba8..6f424337e 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
-@@ -2179,5 +2179,5 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -2009,5 +2009,5 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
(ol_flags & PKT_TX_L4_MASK) ==
PKT_TX_SCTP_CKSUM) {
- rte_errno = -ENOTSUP;
+ rte_errno = ENOTSUP;
return i;
}
-@@ -2186,5 +2186,5 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -2016,5 +2016,5 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
ret = rte_validate_tx_offload(m);
if (ret != 0) {
- rte_errno = ret;
+ rte_errno = -ret;
return i;
}
-@@ -2199,5 +2199,5 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -2029,5 +2029,5 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
ol_flags & ~PKT_TX_TCP_SEG);
if (ret != 0) {
- rte_errno = ret;
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'crypto/qat: fix digest in wireless auth case' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (61 preceding siblings ...)
2019-02-07 13:26 ` [dpdk-stable] patch 'net/ena: fix errno to positive value' " Kevin Traynor
@ 2019-02-07 13:26 ` Kevin Traynor
2019-02-07 13:26 ` [dpdk-stable] patch 'build: mention -march in pkg-config description' " Kevin Traynor
` (3 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:26 UTC (permalink / raw)
To: Fiona Trahe; +Cc: Arek Kusztal, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 74baa223799b27e26347f1949a5509d0b061c5fe Mon Sep 17 00:00:00 2001
From: Fiona Trahe <fiona.trahe@intel.com>
Date: Fri, 25 Jan 2019 16:59:00 +0000
Subject: [PATCH] crypto/qat: fix digest in wireless auth case
[ upstream commit 89da5e006f23dd4ef29b55f5b29a239297eb2f9c ]
When operation calls for auth (digest generation), followed by
encryption of both data plus digest, the digest-in-buffer
flag must be set for QAT.
Fixes: 39e0bee48e81 ("crypto/qat: rework request builder for performance")
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
drivers/crypto/qat/qat_sym.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c
index 10cdf2e10..8801ca567 100644
--- a/drivers/crypto/qat/qat_sym.c
+++ b/drivers/crypto/qat/qat_sym.c
@@ -158,4 +158,5 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
uint64_t src_buf_start = 0, dst_buf_start = 0;
uint8_t do_sgl = 0;
+ uint8_t wireless_auth = 0, in_place = 1;
struct rte_crypto_op *op = (struct rte_crypto_op *)in_op;
struct qat_sym_op_cookie *cookie =
@@ -270,4 +271,5 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
auth_ofs = op->sym->auth.data.offset >> 3;
auth_len = op->sym->auth.data.length >> 3;
+ wireless_auth = 1;
auth_param->u1.aad_adr =
@@ -439,4 +441,5 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
* so as not to overwrite data in dest buffer
*/
+ in_place = 0;
src_buf_start =
rte_pktmbuf_iova_offset(op->sym->m_src, min_ofs);
@@ -531,4 +534,16 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
qat_req->comn_mid.src_data_addr = src_buf_start;
qat_req->comn_mid.dest_data_addr = dst_buf_start;
+ /* handle case of auth-gen-then-cipher with digest encrypted */
+ if (wireless_auth && in_place &&
+ (op->sym->auth.digest.phys_addr ==
+ src_buf_start + auth_ofs + auth_len) &&
+ (auth_ofs + auth_len + ctx->digest_length <=
+ cipher_ofs + cipher_len)) {
+ struct icp_qat_fw_comn_req_hdr *header =
+ &qat_req->comn_hdr;
+ ICP_QAT_FW_LA_DIGEST_IN_BUFFER_SET(
+ header->serv_specif_flags,
+ ICP_QAT_FW_LA_DIGEST_IN_BUFFER);
+ }
}
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:57.113403941 +0000
+++ 0064-crypto-qat-fix-digest-in-wireless-auth-case.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,14 +1,15 @@
-From 89da5e006f23dd4ef29b55f5b29a239297eb2f9c Mon Sep 17 00:00:00 2001
+From 74baa223799b27e26347f1949a5509d0b061c5fe Mon Sep 17 00:00:00 2001
From: Fiona Trahe <fiona.trahe@intel.com>
Date: Fri, 25 Jan 2019 16:59:00 +0000
Subject: [PATCH] crypto/qat: fix digest in wireless auth case
+[ upstream commit 89da5e006f23dd4ef29b55f5b29a239297eb2f9c ]
+
When operation calls for auth (digest generation), followed by
encryption of both data plus digest, the digest-in-buffer
flag must be set for QAT.
Fixes: 39e0bee48e81 ("crypto/qat: rework request builder for performance")
-Cc: stable@dpdk.org
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'build: mention -march in pkg-config description' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (62 preceding siblings ...)
2019-02-07 13:26 ` [dpdk-stable] patch 'crypto/qat: fix digest in wireless auth case' " Kevin Traynor
@ 2019-02-07 13:26 ` Kevin Traynor
2019-02-07 13:26 ` [dpdk-stable] patch 'doc: add dependency for PDF in contributing guide' " Kevin Traynor
` (2 subsequent siblings)
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:26 UTC (permalink / raw)
To: Luca Boccassi; +Cc: Gavin Hu, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 14ae4f0e3b7fe8147a11d5c0f54b4cab04159e9e Mon Sep 17 00:00:00 2001
From: Luca Boccassi <bluca@debian.org>
Date: Thu, 10 Jan 2019 17:28:06 +0000
Subject: [PATCH] build: mention -march in pkg-config description
[ upstream commit ccee5d18a470242ee86c58c9203b40ca112a49b3 ]
Applications need to at least match DPDK's -march option to build
successfully due to some static inline functions in the public headers.
This might cause problems, especially in distributions, so add a note
in the pkg-config description.
Fixes: a25a650be5f0 ("build: add infrastructure for meson and ninja builds")
Signed-off-by: Luca Boccassi <bluca@debian.org>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
meson.build | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 636626ae5..9b3a74a2a 100644
--- a/meson.build
+++ b/meson.build
@@ -84,5 +84,7 @@ pkg.generate(name: meson.project_name(),
libraries_private: dpdk_drivers + dpdk_static_libraries +
['-Wl,-Bdynamic'] + dpdk_extra_ldflags,
- description: 'The Data Plane Development Kit (DPDK)',
+ description: '''The Data Plane Development Kit (DPDK).
+Note that CFLAGS might contain an -march flag higher than typical baseline.
+This is required for a number of static inline functions in the public headers.''',
subdirs: [get_option('include_subdir_arch'), '.'],
extra_cflags: ['-include', 'rte_config.h'] + machine_args
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:57.138396021 +0000
+++ 0065-build-mention-march-in-pkg-config-description.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From ccee5d18a470242ee86c58c9203b40ca112a49b3 Mon Sep 17 00:00:00 2001
+From 14ae4f0e3b7fe8147a11d5c0f54b4cab04159e9e Mon Sep 17 00:00:00 2001
From: Luca Boccassi <bluca@debian.org>
Date: Thu, 10 Jan 2019 17:28:06 +0000
Subject: [PATCH] build: mention -march in pkg-config description
+[ upstream commit ccee5d18a470242ee86c58c9203b40ca112a49b3 ]
+
Applications need to at least match DPDK's -march option to build
successfully due to some static inline functions in the public headers.
@@ -10,7 +12,6 @@
in the pkg-config description.
Fixes: a25a650be5f0 ("build: add infrastructure for meson and ninja builds")
-Cc: stable@dpdk.org
Signed-off-by: Luca Boccassi <bluca@debian.org>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
@@ -20,7 +21,7 @@
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
-index fcc30aba7..68429f850 100644
+index 636626ae5..9b3a74a2a 100644
--- a/meson.build
+++ b/meson.build
@@ -84,5 +84,7 @@ pkg.generate(name: meson.project_name(),
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'doc: add dependency for PDF in contributing guide' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (63 preceding siblings ...)
2019-02-07 13:26 ` [dpdk-stable] patch 'build: mention -march in pkg-config description' " Kevin Traynor
@ 2019-02-07 13:26 ` Kevin Traynor
2019-02-07 13:26 ` [dpdk-stable] patch 'net/mlx5: fix build for armv8' " Kevin Traynor
2019-02-07 13:26 ` [dpdk-stable] patch 'doc: clarify libnuma requirement for NUMA systems' " Kevin Traynor
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:26 UTC (permalink / raw)
To: Rami Rosen; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From d21965318f1913905ae7fca32b466cc18d0607f9 Mon Sep 17 00:00:00 2001
From: Rami Rosen <ramirose@gmail.com>
Date: Sun, 20 Jan 2019 20:29:47 +0200
Subject: [PATCH] doc: add dependency for PDF in contributing guide
[ upstream commit 63a71926e9f498bc121cec30de1ccae6970da612 ]
There is a missing depenency for building docs with "make doc-guides-pdf".
This causes it to break with "make[3]: latexmk: Command not found". This
was observed and reported in https://bugs.dpdk.org/show_bug.cgi?id=182
This patch fixes this issue by adding the latexmk package dependency in
sub-section 4.3.1 of the contributing guide ("Dependencies").
Bugzilla ID: 182
Signed-off-by: Rami Rosen <ramirose@gmail.com>
---
doc/guides/contributing/documentation.rst | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/doc/guides/contributing/documentation.rst b/doc/guides/contributing/documentation.rst
index c28a95c34..c72280a29 100644
--- a/doc/guides/contributing/documentation.rst
+++ b/doc/guides/contributing/documentation.rst
@@ -205,4 +205,17 @@ The main required packages can be installed as follows:
sudo dnf -y install texlive-collection-latexextra
+`Latexmk <http://personal.psu.edu/jcc8/software/latexmk-jcc/>`_ is a perl script
+for running LaTeX for resolving cross references,
+and it also runs auxiliary programs like bibtex, makeindex if necessary, and dvips.
+It has also a number of other useful capabilities (see man 1 latexmk).
+
+.. code-block:: console
+
+ # Ubuntu/Debian.
+ sudo apt-get -y install latexmk
+
+ # Red Hat/Fedora.
+ sudo dnf -y install latexmk
+
Build commands
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:57.159938742 +0000
+++ 0066-doc-add-dependency-for-PDF-in-contributing-guide.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From 63a71926e9f498bc121cec30de1ccae6970da612 Mon Sep 17 00:00:00 2001
+From d21965318f1913905ae7fca32b466cc18d0607f9 Mon Sep 17 00:00:00 2001
From: Rami Rosen <ramirose@gmail.com>
Date: Sun, 20 Jan 2019 20:29:47 +0200
Subject: [PATCH] doc: add dependency for PDF in contributing guide
+[ upstream commit 63a71926e9f498bc121cec30de1ccae6970da612 ]
+
There is a missing depenency for building docs with "make doc-guides-pdf".
This causes it to break with "make[3]: latexmk: Command not found". This
was observed and reported in https://bugs.dpdk.org/show_bug.cgi?id=182
@@ -10,7 +12,6 @@
sub-section 4.3.1 of the contributing guide ("Dependencies").
Bugzilla ID: 182
-Cc: stable@dpdk.org
Signed-off-by: Rami Rosen <ramirose@gmail.com>
---
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix build for armv8' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (64 preceding siblings ...)
2019-02-07 13:26 ` [dpdk-stable] patch 'doc: add dependency for PDF in contributing guide' " Kevin Traynor
@ 2019-02-07 13:26 ` Kevin Traynor
2019-02-07 13:26 ` [dpdk-stable] patch 'doc: clarify libnuma requirement for NUMA systems' " Kevin Traynor
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:26 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Shahaf Shuler, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From ee1b15aff9f3a4ea9c3dcfdcad4529d0f9d74db4 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Mon, 28 Jan 2019 14:22:14 +0000
Subject: [PATCH] net/mlx5: fix build for armv8
[ upstream commit c9e462d17b80394d3eaf8470198afaaa94a6c181 ]
Added <rte_cycles.h> inclusion, was not included on some
building setups (armv8).
Fixes: 71ab2d64723c ("net/mlx5: fix VXLAN port registration race condition")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_tcf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/mlx5/mlx5_flow_tcf.c b/drivers/net/mlx5/mlx5_flow_tcf.c
index dd842c896..96b9dd726 100644
--- a/drivers/net/mlx5/mlx5_flow_tcf.c
+++ b/drivers/net/mlx5/mlx5_flow_tcf.c
@@ -29,4 +29,5 @@
#include <rte_malloc.h>
#include <rte_common.h>
+#include <rte_cycles.h>
#include "mlx5.h"
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:57.184179187 +0000
+++ 0067-net-mlx5-fix-build-for-armv8.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,13 +1,14 @@
-From c9e462d17b80394d3eaf8470198afaaa94a6c181 Mon Sep 17 00:00:00 2001
+From ee1b15aff9f3a4ea9c3dcfdcad4529d0f9d74db4 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Mon, 28 Jan 2019 14:22:14 +0000
Subject: [PATCH] net/mlx5: fix build for armv8
+[ upstream commit c9e462d17b80394d3eaf8470198afaaa94a6c181 ]
+
Added <rte_cycles.h> inclusion, was not included on some
building setups (armv8).
Fixes: 71ab2d64723c ("net/mlx5: fix VXLAN port registration race condition")
-Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
@@ -16,7 +17,7 @@
1 file changed, 1 insertion(+)
diff --git a/drivers/net/mlx5/mlx5_flow_tcf.c b/drivers/net/mlx5/mlx5_flow_tcf.c
-index e132a3482..652270f74 100644
+index dd842c896..96b9dd726 100644
--- a/drivers/net/mlx5/mlx5_flow_tcf.c
+++ b/drivers/net/mlx5/mlx5_flow_tcf.c
@@ -29,4 +29,5 @@
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'doc: clarify libnuma requirement for NUMA systems' has been queued to LTS release 18.11.1
2019-02-07 13:25 [dpdk-stable] patch 'net/mlx5: remove checks for outer tunnel items on E-Switch' has been queued to LTS release 18.11.1 Kevin Traynor
` (65 preceding siblings ...)
2019-02-07 13:26 ` [dpdk-stable] patch 'net/mlx5: fix build for armv8' " Kevin Traynor
@ 2019-02-07 13:26 ` Kevin Traynor
66 siblings, 0 replies; 68+ messages in thread
From: Kevin Traynor @ 2019-02-07 13:26 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: Kevin Traynor, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 39ce967019925bc923a7d0a41b09bfa4f0c106c6 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Thu, 31 Jan 2019 17:05:51 +0000
Subject: [PATCH] doc: clarify libnuma requirement for NUMA systems
[ upstream commit e39d9b63664ae44af6214fa236cd989850a50833 ]
Since 18.05, libnuma is pretty much required on Linux when using
non-legacy mode, because without it, we cannot know where our
hugepages are located [1].
In legacy mode, libnuma is not required because we can still sort
pages by sockets, as we use pagemap lookup method to figure out
socket ID's for pages.
So, document libnuma as required for NUMA systems and non-legacy
mode.
[1] https://mails.dpdk.org/archives/dev/2018-December/120490.html
Fixes: 6b42f75632f0 ("eal: enable non-legacy memory mode")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
---
doc/guides/linux_gsg/sys_reqs.rst | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/doc/guides/linux_gsg/sys_reqs.rst b/doc/guides/linux_gsg/sys_reqs.rst
index 29c5f47a5..1c6f86a20 100644
--- a/doc/guides/linux_gsg/sys_reqs.rst
+++ b/doc/guides/linux_gsg/sys_reqs.rst
@@ -71,4 +71,13 @@ Compilation of the DPDK
* libnuma-dev in Debian/Ubuntu;
+ .. note::
+
+ On systems with NUMA support, `libnuma-dev` (aka `numactl-devel`)
+ is a recommended dependency when `--legacy-mem` switch is used,
+ and a *required* dependency if default memory mode is used.
+ While DPDK will compile and run without `libnuma`
+ even on NUMA-enabled systems,
+ both usability and performance will be degraded.
+
* Python, version 2.7+ or 3.2+, to use various helper scripts included in the DPDK package.
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:57.211345859 +0000
+++ 0068-doc-clarify-libnuma-requirement-for-NUMA-systems.patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From e39d9b63664ae44af6214fa236cd989850a50833 Mon Sep 17 00:00:00 2001
+From 39ce967019925bc923a7d0a41b09bfa4f0c106c6 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Thu, 31 Jan 2019 17:05:51 +0000
Subject: [PATCH] doc: clarify libnuma requirement for NUMA systems
+[ upstream commit e39d9b63664ae44af6214fa236cd989850a50833 ]
+
Since 18.05, libnuma is pretty much required on Linux when using
non-legacy mode, because without it, we cannot know where our
hugepages are located [1].
@@ -17,7 +19,6 @@
[1] https://mails.dpdk.org/archives/dev/2018-December/120490.html
Fixes: 6b42f75632f0 ("eal: enable non-legacy memory mode")
-Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
@@ -26,7 +27,7 @@
1 file changed, 9 insertions(+)
diff --git a/doc/guides/linux_gsg/sys_reqs.rst b/doc/guides/linux_gsg/sys_reqs.rst
-index 8ec3af491..d0cb66f6b 100644
+index 29c5f47a5..1c6f86a20 100644
--- a/doc/guides/linux_gsg/sys_reqs.rst
+++ b/doc/guides/linux_gsg/sys_reqs.rst
@@ -71,4 +71,13 @@ Compilation of the DPDK
^ permalink raw reply [flat|nested] 68+ messages in thread