On 14 Oct 2025, at 18:58, Rama Shankar Pandey wrote:
> When certain interfaces are selectively excluded > to use TC datapath, flow_modify can fail with EOPNOTSUPP > and since the error value gets explicitly set to 0, > The flows are not deleted from kernel. > > Avoid setting error value to 0 if flow_api and /or flow_del are NULL. > > Signed-off-by: Rama Shankar Pandey <[email protected]> Hi Rama, Can you explain a bit more why this is happening? Which EOPNOTSUPP is being hit? Maybe add a unit test? Also, you mentioned that the flows are not deleted from the kernel, but the flow should have been modified in the kernel, since it was not offloaded earlier. So maybe the fix should be (not sure, as I’d like to understand the root cause first), it also needs the comment updated: 2343 out: 2344 if (err && err != EEXIST && (put->flags & DPIF_FP_MODIFY)) { 2345 /* Modified rule can't be offloaded, try and delete from HW */ 2346 int del_err = 0; 2347 2348 if (!info.tc_modify_flow_deleted) { 2349 del_err = netdev_flow_del(dev, put->ufid, put->stats); 2350 } 2351 --++ if (!del_err || del_err == EOPNOTSUPP) { 2353 /* Delete from hw success, so old flow was offloaded. 2354 * Change flags to create the flow in kernel */ 2355 put->flags &= ~DPIF_FP_MODIFY; 2356 put->flags |= DPIF_FP_CREATE; 2357 } else if (del_err != ENOENT) { 2358 VLOG_ERR_RL(&rl, "failed to delete offloaded flow: %s", 2359 ovs_strerror(del_err)); 2360 /* stop proccesing the flow in kernel */ 2361 err = 0; 2362 } 2363 } Cheers, Eelco > --- > lib/dpif-netlink.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c > index 7587c9c3e..57900cd38 100644 > --- a/lib/dpif-netlink.c > +++ b/lib/dpif-netlink.c > @@ -2354,7 +2354,8 @@ out: > * Change flags to create the flow in kernel */ > put->flags &= ~DPIF_FP_MODIFY; > put->flags |= DPIF_FP_CREATE; > - } else if (del_err != ENOENT) { > + } else if (del_err != ENOENT && > + del_err != EOPNOTSUPP) { > VLOG_ERR_RL(&rl, "failed to delete offloaded flow: %s", > ovs_strerror(del_err)); > /* stop proccesing the flow in kernel */ > -- > 2.51.0 > > _______________________________________________ > dev mailing list > [email protected] > https://mail.openvswitch.org/mailman/listinfo/ovs-dev _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
