[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BYAPR18MB2630684FD194F179E718E198B7530@BYAPR18MB2630.namprd18.prod.outlook.com>
Date: Wed, 18 Dec 2019 13:40:39 +0000
From: Igor Russkikh <irusskikh@...vell.com>
To: Antoine Tenart <antoine.tenart@...tlin.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"sd@...asysnail.net" <sd@...asysnail.net>,
"andrew@...n.ch" <andrew@...n.ch>,
"f.fainelli@...il.com" <f.fainelli@...il.com>,
"hkallweit1@...il.com" <hkallweit1@...il.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"thomas.petazzoni@...tlin.com" <thomas.petazzoni@...tlin.com>,
"alexandre.belloni@...tlin.com" <alexandre.belloni@...tlin.com>,
"allan.nielsen@...rochip.com" <allan.nielsen@...rochip.com>,
"camelia.groza@....com" <camelia.groza@....com>,
"Simon.Edelhaus@...antia.com" <Simon.Edelhaus@...antia.com>,
Dmitry Bogdanov <dbogdanov@...vell.com>,
"jakub.kicinski@...ronome.com" <jakub.kicinski@...ronome.com>,
Igor Russkikh <Igor.Russkikh@...antia.com>
Subject: Re: [EXT] [PATCH net-next v3 05/15] net: macsec: hardware offloading
infrastructure
Hi Antoine,
> @@ -2922,7 +3300,27 @@ static int macsec_changelink(struct net_device
> *dev, struct nlattr *tb[],
> data[IFLA_MACSEC_PORT])
> return -EINVAL;
>
> - return macsec_changelink_common(dev, data);
> + /* If h/w offloading is available, propagate to the device */
> + if (macsec_is_offloaded(macsec)) {
> + const struct macsec_ops *ops;
> + struct macsec_context ctx;
> + int ret;
> +
> + ops = macsec_get_ops(netdev_priv(dev), &ctx);
> + if (!ops)
> + return -EOPNOTSUPP;
> +
> + ctx.secy = &macsec->secy;
> + ret = macsec_offload(ops->mdo_upd_secy, &ctx);
> + if (ret)
> + return ret;
> + }
> +
> + ret = macsec_changelink_common(dev, data);
In our mac driver verification we see that propagating upd_secy to device before doing
macsec_changelink_common is actually useless, since in this case underlying device
can't fetch any of the updated parameters from the macsec structures.
Isn't it logical first doing `macsec_changelink_common` and then propagate the event?
--
Regards,
Igor
Powered by blists - more mailing lists