Hi Patrick, Yes! Stop ports is a required decorator because some vendors require that the ports themselves be stopped to change their MTU values during runtime. This is not to be confused with forwarding, which is what my decorator does on top of a given function. That said, I suppose this could be reworked so that forward restarting stops the ports and starts them again as well, but my concern is that there could be other functions created in the future that require forward restarts but also require the ports to be actively started. I'm not 100% sure,
On Sun, Jan 19, 2025 at 8:14 PM Patrick Robb <pr...@iol.unh.edu> wrote: > > > > On Fri, Jan 17, 2025 at 9:58 AM Nicholas Pratte <npra...@iol.unh.edu> wrote: >> >> - @requires_started_ports >> >> + @requires_forwarding_restart >> @requires_stopped_ports >> def set_port_mtu(self, port_id: int, mtu: int, verify: bool = True) -> >> None: >> """Change the MTU of a port using testpmd. > > > Is the requires_stopped_ports decorated still required, or is the > requires_forwarding_restart decorator alone sufficient? > > > Looks good otherwise thanks! > > Reviewed-by: Patrick Robb <pr...@iol.unh.edu>