On Thu, 2026-04-02 at 13:37 +0200, Sabrina Dubroca wrote:
> 2026-03-30, 16:01:29 +0300, Cosmin Ratiu wrote:
> > +def _get_mac(ifname, host=None):
> > +    """Gets MAC address of an interface."""
> > +    dev = ip(f"-d link show dev {ifname}", json=True, host=host)
> 
> nit: MAC address doesn't need '-d'

Will do.

> 
> I would have used fixed SCI on both ends to avoid this mess with the
> local/remote MAC address, but it's ok as you wrote it.

I guess it would make the test slightly simpler but it would no longer
exercise the manual rx port address creation. I think the MAC stuff is
a small cost to pay for a little extra coverage.


> > +    return dev[0]["address"]
> 
> [...]
> > +def _check_nsim_vid(cfg, vid, expected) -> None:
> > +    """Checks if a VLAN is present. Only works on netdevsim."""
> > +
> > +    nsim = cfg.get_local_nsim_dev()
> > +    if not nsim:
> > +        return
> > +
> > +    vlan_path = nsim.nsims[0].dfs_dir + "vlan"
> 
> nit: os.path.join for consistency with other users

Will do.

Cosmin.

Reply via email to