Skip to content

Commit 9f4651e

Browse files
jacob-kelleranguy11
authored andcommitted
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 <[email protected]> Tested-by: Konrad Jankowski <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent f1db020 commit 9f4651e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

drivers/net/ethernet/intel/iavf/iavf_main.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2910,7 +2910,7 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter,
29102910
} else {
29112911
dev_err(&adapter->pdev->dev, "Bad ether dest mask %pM\n",
29122912
match.mask->dst);
2913-
return IAVF_ERR_CONFIG;
2913+
return -EINVAL;
29142914
}
29152915
}
29162916

@@ -2920,7 +2920,7 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter,
29202920
} else {
29212921
dev_err(&adapter->pdev->dev, "Bad ether src mask %pM\n",
29222922
match.mask->src);
2923-
return IAVF_ERR_CONFIG;
2923+
return -EINVAL;
29242924
}
29252925
}
29262926

@@ -2955,7 +2955,7 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter,
29552955
} else {
29562956
dev_err(&adapter->pdev->dev, "Bad vlan mask %u\n",
29572957
match.mask->vlan_id);
2958-
return IAVF_ERR_CONFIG;
2958+
return -EINVAL;
29592959
}
29602960
}
29612961
vf->mask.tcp_spec.vlan_id |= cpu_to_be16(0xffff);
@@ -2979,7 +2979,7 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter,
29792979
} else {
29802980
dev_err(&adapter->pdev->dev, "Bad ip dst mask 0x%08x\n",
29812981
be32_to_cpu(match.mask->dst));
2982-
return IAVF_ERR_CONFIG;
2982+
return -EINVAL;
29832983
}
29842984
}
29852985

@@ -2989,13 +2989,13 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter,
29892989
} else {
29902990
dev_err(&adapter->pdev->dev, "Bad ip src mask 0x%08x\n",
29912991
be32_to_cpu(match.mask->dst));
2992-
return IAVF_ERR_CONFIG;
2992+
return -EINVAL;
29932993
}
29942994
}
29952995

29962996
if (field_flags & IAVF_CLOUD_FIELD_TEN_ID) {
29972997
dev_info(&adapter->pdev->dev, "Tenant id not allowed for ip filter\n");
2998-
return IAVF_ERR_CONFIG;
2998+
return -EINVAL;
29992999
}
30003000
if (match.key->dst) {
30013001
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,
30163016
if (ipv6_addr_any(&match.mask->dst)) {
30173017
dev_err(&adapter->pdev->dev, "Bad ipv6 dst mask 0x%02x\n",
30183018
IPV6_ADDR_ANY);
3019-
return IAVF_ERR_CONFIG;
3019+
return -EINVAL;
30203020
}
30213021

30223022
/* src and dest IPv6 address should not be LOOPBACK
@@ -3026,7 +3026,7 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter,
30263026
ipv6_addr_loopback(&match.key->src)) {
30273027
dev_err(&adapter->pdev->dev,
30283028
"ipv6 addr should not be loopback\n");
3029-
return IAVF_ERR_CONFIG;
3029+
return -EINVAL;
30303030
}
30313031
if (!ipv6_addr_any(&match.mask->dst) ||
30323032
!ipv6_addr_any(&match.mask->src))
@@ -3051,7 +3051,7 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter,
30513051
} else {
30523052
dev_err(&adapter->pdev->dev, "Bad src port mask %u\n",
30533053
be16_to_cpu(match.mask->src));
3054-
return IAVF_ERR_CONFIG;
3054+
return -EINVAL;
30553055
}
30563056
}
30573057

@@ -3061,7 +3061,7 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter,
30613061
} else {
30623062
dev_err(&adapter->pdev->dev, "Bad dst port mask %u\n",
30633063
be16_to_cpu(match.mask->dst));
3064-
return IAVF_ERR_CONFIG;
3064+
return -EINVAL;
30653065
}
30663066
}
30673067
if (match.key->dst) {

0 commit comments

Comments
 (0)