DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] net/sfc: fix initialization of the RTE flow structure
@ 2018-01-18  7:32 Andrew Rybchenko
  2018-01-18  7:32 ` [dpdk-dev] [PATCH 2/2] net/sfc: fix flow RSS check while error handling Andrew Rybchenko
  2018-01-18 15:28 ` [dpdk-dev] [dpdk-stable] [PATCH 1/2] net/sfc: fix initialization of the RTE flow structure Ferruh Yigit
  0 siblings, 2 replies; 3+ messages in thread
From: Andrew Rybchenko @ 2018-01-18  7:32 UTC (permalink / raw)
  To: dev; +Cc: Roman Zhukov, stable

From: Roman Zhukov <Roman.Zhukov@oktetlabs.ru>

The rte_flow is already filled in with zeros in the
case of create. So memset() with zeros is needed only
in validation.

Fixes: a9825ccf5bb8 ("net/sfc: support flow API filters")
Cc: stable@dpdk.org

Signed-off-by: Roman Zhukov <Roman.Zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc_flow.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c
index c0ef415..890b2bb 100644
--- a/drivers/net/sfc/sfc_flow.c
+++ b/drivers/net/sfc/sfc_flow.c
@@ -1104,8 +1104,6 @@ sfc_flow_parse(struct rte_eth_dev *dev,
 	struct sfc_adapter *sa = dev->data->dev_private;
 	int rc;
 
-	memset(&flow->spec, 0, sizeof(flow->spec));
-
 	rc = sfc_flow_parse_attr(attr, flow, error);
 	if (rc != 0)
 		goto fail_bad_value;
@@ -1138,6 +1136,8 @@ sfc_flow_validate(struct rte_eth_dev *dev,
 {
 	struct rte_flow flow;
 
+	memset(&flow, 0, sizeof(flow));
+
 	return sfc_flow_parse(dev, attr, pattern, actions, &flow, error);
 }
 
-- 
2.7.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-18 15:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-18  7:32 [dpdk-dev] [PATCH 1/2] net/sfc: fix initialization of the RTE flow structure Andrew Rybchenko
2018-01-18  7:32 ` [dpdk-dev] [PATCH 2/2] net/sfc: fix flow RSS check while error handling Andrew Rybchenko
2018-01-18 15:28 ` [dpdk-dev] [dpdk-stable] [PATCH 1/2] net/sfc: fix initialization of the RTE flow structure Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).