mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 07:01:23 +00:00
openvswitch: Additional logging for -EINVAL on flow setups.
There are many possible ways that a flow can be invalid so we've added logging for most of them. This adds logs for the remaining possible cases so there isn't any ambiguity while debugging. CC: Federico Iezzi <fiezzi@enter.it> Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Thomas Graf <tgraf@noironetworks.com> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
This commit is contained in:
parent
1b760fb9a8
commit
426cda5cc1
2 changed files with 22 additions and 7 deletions
|
@ -817,10 +817,14 @@ static int ovs_flow_cmd_new(struct sk_buff *skb, struct genl_info *info)
|
|||
|
||||
/* Must have key and actions. */
|
||||
error = -EINVAL;
|
||||
if (!a[OVS_FLOW_ATTR_KEY])
|
||||
if (!a[OVS_FLOW_ATTR_KEY]) {
|
||||
OVS_NLERR("Flow key attribute not present in new flow.\n");
|
||||
goto error;
|
||||
if (!a[OVS_FLOW_ATTR_ACTIONS])
|
||||
}
|
||||
if (!a[OVS_FLOW_ATTR_ACTIONS]) {
|
||||
OVS_NLERR("Flow actions attribute not present in new flow.\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* Most of the time we need to allocate a new flow, do it before
|
||||
* locking.
|
||||
|
@ -979,8 +983,10 @@ static int ovs_flow_cmd_set(struct sk_buff *skb, struct genl_info *info)
|
|||
|
||||
/* Extract key. */
|
||||
error = -EINVAL;
|
||||
if (!a[OVS_FLOW_ATTR_KEY])
|
||||
if (!a[OVS_FLOW_ATTR_KEY]) {
|
||||
OVS_NLERR("Flow key attribute not present in set flow.\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
ovs_match_init(&match, &key, &mask);
|
||||
error = ovs_nla_get_match(&match,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue