From: Roman Zhukov Date: Thu, 18 Jan 2018 07:32:55 +0000 (+0000) Subject: net/sfc: fix initialization of flow structure X-Git-Tag: spdx-start~70 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=13195b557b3e20bb84fff0f313137125c0cadfde;p=dpdk.git net/sfc: fix initialization of flow structure 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 Signed-off-by: Andrew Rybchenko --- diff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c index c0ef415b56..890b2bbf04 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); }