|
@@ -6989,10 +6989,10 @@ static int niu_class_to_ethflow(u64 class, int *flow_type)
|
|
|
*flow_type = IP_USER_FLOW;
|
|
|
break;
|
|
|
default:
|
|
|
- return 0;
|
|
|
+ return -EINVAL;
|
|
|
}
|
|
|
|
|
|
- return 1;
|
|
|
+ return 0;
|
|
|
}
|
|
|
|
|
|
static int niu_ethflow_to_class(int flow_type, u64 *class)
|
|
@@ -7198,11 +7198,9 @@ static int niu_get_ethtool_tcam_entry(struct niu *np,
|
|
|
class = (tp->key[0] & TCAM_V4KEY0_CLASS_CODE) >>
|
|
|
TCAM_V4KEY0_CLASS_CODE_SHIFT;
|
|
|
ret = niu_class_to_ethflow(class, &fsp->flow_type);
|
|
|
-
|
|
|
if (ret < 0) {
|
|
|
netdev_info(np->dev, "niu%d: niu_class_to_ethflow failed\n",
|
|
|
parent->index);
|
|
|
- ret = -EINVAL;
|
|
|
goto out;
|
|
|
}
|
|
|
|