[ Upstream commit f8f4bef322e4600c5856911c7a632c0e3da920d6 ]
When dealing with ingress rule on a netdev, if we did fine through the conventional path, there's no need to continue into the egdev route, and we can stop right there.
Not doing so may cause a 2nd rule to be added by the cls api layer with the ingress being the egdev.
For example, under sriov switchdev scheme, a user rule of VFR A --> VFR B will end up with two HW rules (1) VF A --> VF B and (2) uplink --> VF B
Fixes: 208c0f4b5237 ('net: sched: use tc_setup_cb_call to call per-block callbacks') Signed-off-by: Or Gerlitz ogerlitz@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org ---
Hi Greg,
The commit that introduced the problem dates to 4.15 and the fix made on 4.17. I see the fix was pushed to 4.16-stable but not to 4.15-stable, so sending it now.
Or.
net/sched/cls_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index c2c732a..86d2d59 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -1587,7 +1587,7 @@ int tc_setup_cb_call(struct tcf_block *block, struct tcf_exts *exts, return ret; ok_count = ret;
- if (!exts) + if (!exts || ok_count) return ok_count; ret = tc_exts_setup_cb_egdev_call(exts, type, type_data, err_stop); if (ret < 0)
On Thu, Jul 26, 2018 at 8:45 PM, Or Gerlitz ogerlitz@mellanox.com wrote:
[ Upstream commit f8f4bef322e4600c5856911c7a632c0e3da920d6 ]
When dealing with ingress rule on a netdev, if we did fine through the conventional path, there's no need to continue into the egdev route, and we can stop right there.
Not doing so may cause a 2nd rule to be added by the cls api layer with the ingress being the egdev.
For example, under sriov switchdev scheme, a user rule of VFR A --> VFR B will end up with two HW rules (1) VF A --> VF B and (2) uplink --> VF B
Fixes: 208c0f4b5237 ('net: sched: use tc_setup_cb_call to call per-block callbacks') Signed-off-by: Or Gerlitz ogerlitz@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
Hi Greg,
The commit that introduced the problem dates to 4.15 and the fix made on 4.17. I see the fix was pushed to 4.16-stable but not to 4.15-stable, so sending it now.
Sorry for not marking it on the subject line, but this is for 4.15-stable
Or.
On Thu, Jul 26, 2018 at 08:46:22PM +0300, Or Gerlitz wrote:
On Thu, Jul 26, 2018 at 8:45 PM, Or Gerlitz ogerlitz@mellanox.com wrote:
[ Upstream commit f8f4bef322e4600c5856911c7a632c0e3da920d6 ]
When dealing with ingress rule on a netdev, if we did fine through the conventional path, there's no need to continue into the egdev route, and we can stop right there.
Not doing so may cause a 2nd rule to be added by the cls api layer with the ingress being the egdev.
For example, under sriov switchdev scheme, a user rule of VFR A --> VFR B will end up with two HW rules (1) VF A --> VF B and (2) uplink --> VF B
Fixes: 208c0f4b5237 ('net: sched: use tc_setup_cb_call to call per-block callbacks') Signed-off-by: Or Gerlitz ogerlitz@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
Hi Greg,
The commit that introduced the problem dates to 4.15 and the fix made on 4.17. I see the fix was pushed to 4.16-stable but not to 4.15-stable, so sending it now.
Sorry for not marking it on the subject line, but this is for 4.15-stable
4.15 is long end-of-life, sorry, there's nothing I can do for that kernel anymore. Please always look at the front page of kernel.org for what kernels are still "alive" when doing backports so you don't end up doing work for no reason.
sorry,
greg k-h
On Fri, Jul 27, 2018 at 9:36 AM, Greg KH gregkh@linuxfoundation.org wrote:
On Thu, Jul 26, 2018 at 08:46:22PM +0300, Or Gerlitz wrote:
On Thu, Jul 26, 2018 at 8:45 PM, Or Gerlitz ogerlitz@mellanox.com wrote:
[ Upstream commit f8f4bef322e4600c5856911c7a632c0e3da920d6 ]
When dealing with ingress rule on a netdev, if we did fine through the conventional path, there's no need to continue into the egdev route, and we can stop right there.
Not doing so may cause a 2nd rule to be added by the cls api layer with the ingress being the egdev.
For example, under sriov switchdev scheme, a user rule of VFR A --> VFR B will end up with two HW rules (1) VF A --> VF B and (2) uplink --> VF B
Fixes: 208c0f4b5237 ('net: sched: use tc_setup_cb_call to call per-block callbacks') Signed-off-by: Or Gerlitz ogerlitz@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
Hi Greg,
The commit that introduced the problem dates to 4.15 and the fix made on 4.17. I see the fix was pushed to 4.16-stable but not to 4.15-stable, so sending it now.
Sorry for not marking it on the subject line, but this is for 4.15-stable
4.15 is long end-of-life, sorry, there's nothing I can do for that kernel anymore. Please always look at the front page of kernel.org for what kernels are still "alive" when doing backports so you don't end up doing work for no reason.
I see, so I missed the train... luckily I can tell people that step on the bug to catch the next train/s - long live linux :)
Or.
linux-stable-mirror@lists.linaro.org