I need to analyze this patch but first I need to get the actual commit information and unified diff. Let me retrieve that.
``` git sha: 0d08acdefc7630df9a236f6bf7e731b823b3d1e3 Author: Eelco Chaudron <[email protected]> Subject: dpif-offload: Move the netdev_any_oor() API to dpif-offload. This patch moves the netdev_any_oor() functionality from netdev-offload to dpif-offload as a new dpif_offload_netdevs_out_of_resources() API. > diff --git a/lib/dpif-offload.c b/lib/dpif-offload.c > index 5473dd2ea..0cff74a5d 100644 > --- a/lib/dpif-offload.c > +++ b/lib/dpif-offload.c > @@ -1213,6 +1213,29 @@ dpif_offload_get_netdev_by_port_id(struct dpif *dpif, > return netdev; > } > > +bool > +dpif_offload_netdevs_out_of_resources(struct dpif *dpif) > +{ > + struct dp_offload *dp_offload = dpif_offload_get_dp_offload(dpif); > + struct dpif_offload_port_dump dump; > + struct dpif_offload_port port; > + bool oor = false; > + > + if (!dp_offload || !dpif_offload_is_offload_enabled()) { > + return false; > + } > + > + DPIF_OFFLOAD_PORT_FOR_EACH (&port, &dump, dpif) { > + if (port.netdev->hw_info.oor) { > + oor = true; > + dpif_offload_port_dump_done(&dump); > + break; > + } > + } > + > + return oor; > +} Is the dpif_offload_port_dump_done() call needed when breaking out of DPIF_OFFLOAD_PORT_FOR_EACH? Typically, for_each macros handle cleanup automatically when the loop completes normally, but manual cleanup might be required when breaking early. > [ ... ] > diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c > index b324793f0..666c14da7 100644 > --- a/ofproto/ofproto-dpif-upcall.c > +++ b/ofproto/ofproto-dpif-upcall.c > @@ -974,7 +974,7 @@ udpif_run_flow_rebalance(struct udpif *udpif) > return; > } > > - if (!netdev_any_oor()) { > + if (!dpif_offload_netdevs_out_of_resources(udpif->dpif)) { > return; > } Could this change affect the behavior in udpif_run_flow_rebalance()? The original netdev_any_oor() checked all netdevs globally, while the new function only checks netdevs associated with a specific dpif. ``` _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
