[ovs-dev] [PATCH v3 2/2] netdev-dpdk: Add option to configure VF MAC address.
Gaëtan Rivet
grive at u256.net
Fri Oct 30 16:00:21 UTC 2020
On 28/10/20 02:58 +0100, Gaëtan Rivet wrote:
[...]
> > >
> > >> + }
> > >> }
> > >> ovs_mutex_unlock(&dev->mutex);
> > >>
> > >> @@ -1898,6 +1918,7 @@ netdev_dpdk_set_config(struct netdev *netdev, const struct smap *args,
> > >> {RTE_FC_RX_PAUSE, RTE_FC_FULL }
> > >> };
> > >> const char *new_devargs;
> > >> + const char *vf_mac;
> > >> int err = 0;
> > >>
> > >> ovs_mutex_lock(&dpdk_mutex);
> > >> @@ -1968,6 +1989,36 @@ netdev_dpdk_set_config(struct netdev *netdev, const struct smap *args,
> > >> goto out;
> > >> }
> > >>
> > >> + vf_mac = smap_get(args, "dpdk-vf-mac");
> > >> + if (vf_mac) {
> > >> + struct eth_addr mac;
> > >> +
> > >> + err = EINVAL;
> > >> +
> > >> + if (!dpdk_port_is_representor(dev)) {
> > >> + VLOG_ERR_BUF(errp, "'%s' is trying to set the VF MAC '%s' "
> > >> + "but 'options:dpdk-vf-mac' is only supported for "
> > >> + "VF representors.",
> > >> + netdev_get_name(netdev), vf_mac);
> > >
> > > Warnings here seems more in line with the other configs that cannot be
> > > applied.
> >
> > I agree, if it's not a representor we could just issue a warning and continue.
> >
>
> Your phrasing seems to limit the (err -> warn) change to the
> representor filtering part. Should the MAC sanitizing messages below remain
> errors?
>
I've sent a v4 that followed Kevin's suggestions, let me know if you'd
prefer if I did as I outlined above.
Cheers,
--
Gaëtan
More information about the dev
mailing list