DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <arybchenko@solarflare.com>
To: <dev@dpdk.org>
Cc: Roman Zhukov <Roman.Zhukov@oktetlabs.ru>, <stable@dpdk.org>
Subject: [dpdk-dev] [PATCH 1/2] net/sfc: fix initialization of the RTE flow structure
Date: Thu, 18 Jan 2018 07:32:55 +0000	[thread overview]
Message-ID: <1516260776-9717-1-git-send-email-arybchenko@solarflare.com> (raw)

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

             reply	other threads:[~2018-01-18  7:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-18  7:32 Andrew Rybchenko [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1516260776-9717-1-git-send-email-arybchenko@solarflare.com \
    --to=arybchenko@solarflare.com \
    --cc=Roman.Zhukov@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).