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: a9825ccf5b
("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>
This commit is contained in:
parent
95ae196ae1
commit
13195b557b
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user