iavf: return errno code instead of status code
The iavf_parse_cls_flower function returns an integer error code, and not an iavf_status enumeration. Fix the function to use the standard errno value EINVAL as its return instead of using IAVF_ERR_CONFIG. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
This commit is contained in:
parent
f1db020ba4
commit
9f4651ea3e
1 changed files with 10 additions and 10 deletions
|
|
@ -2910,7 +2910,7 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter,
|
|||
} else {
|
||||
dev_err(&adapter->pdev->dev, "Bad ether dest mask %pM\n",
|
||||
match.mask->dst);
|
||||
return IAVF_ERR_CONFIG;
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2920,7 +2920,7 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter,
|
|||
} else {
|
||||
dev_err(&adapter->pdev->dev, "Bad ether src mask %pM\n",
|
||||
match.mask->src);
|
||||
return IAVF_ERR_CONFIG;
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2955,7 +2955,7 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter,
|
|||
} else {
|
||||
dev_err(&adapter->pdev->dev, "Bad vlan mask %u\n",
|
||||
match.mask->vlan_id);
|
||||
return IAVF_ERR_CONFIG;
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
vf->mask.tcp_spec.vlan_id |= cpu_to_be16(0xffff);
|
||||
|
|
@ -2979,7 +2979,7 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter,
|
|||
} else {
|
||||
dev_err(&adapter->pdev->dev, "Bad ip dst mask 0x%08x\n",
|
||||
be32_to_cpu(match.mask->dst));
|
||||
return IAVF_ERR_CONFIG;
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2989,13 +2989,13 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter,
|
|||
} else {
|
||||
dev_err(&adapter->pdev->dev, "Bad ip src mask 0x%08x\n",
|
||||
be32_to_cpu(match.mask->dst));
|
||||
return IAVF_ERR_CONFIG;
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
if (field_flags & IAVF_CLOUD_FIELD_TEN_ID) {
|
||||
dev_info(&adapter->pdev->dev, "Tenant id not allowed for ip filter\n");
|
||||
return IAVF_ERR_CONFIG;
|
||||
return -EINVAL;
|
||||
}
|
||||
if (match.key->dst) {
|
||||
vf->mask.tcp_spec.dst_ip[0] |= cpu_to_be32(0xffffffff);
|
||||
|
|
@ -3016,7 +3016,7 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter,
|
|||
if (ipv6_addr_any(&match.mask->dst)) {
|
||||
dev_err(&adapter->pdev->dev, "Bad ipv6 dst mask 0x%02x\n",
|
||||
IPV6_ADDR_ANY);
|
||||
return IAVF_ERR_CONFIG;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* src and dest IPv6 address should not be LOOPBACK
|
||||
|
|
@ -3026,7 +3026,7 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter,
|
|||
ipv6_addr_loopback(&match.key->src)) {
|
||||
dev_err(&adapter->pdev->dev,
|
||||
"ipv6 addr should not be loopback\n");
|
||||
return IAVF_ERR_CONFIG;
|
||||
return -EINVAL;
|
||||
}
|
||||
if (!ipv6_addr_any(&match.mask->dst) ||
|
||||
!ipv6_addr_any(&match.mask->src))
|
||||
|
|
@ -3051,7 +3051,7 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter,
|
|||
} else {
|
||||
dev_err(&adapter->pdev->dev, "Bad src port mask %u\n",
|
||||
be16_to_cpu(match.mask->src));
|
||||
return IAVF_ERR_CONFIG;
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3061,7 +3061,7 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter,
|
|||
} else {
|
||||
dev_err(&adapter->pdev->dev, "Bad dst port mask %u\n",
|
||||
be16_to_cpu(match.mask->dst));
|
||||
return IAVF_ERR_CONFIG;
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
if (match.key->dst) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue