[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <IA1PR12MB63533E6FD3BE343E78ED60B9AB9F9@IA1PR12MB6353.namprd12.prod.outlook.com>
Date: Sun, 16 Apr 2023 12:18:05 +0000
From: Emeel Hakim <ehakim@...dia.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: "davem@...emloft.net" <davem@...emloft.net>,
"pabeni@...hat.com" <pabeni@...hat.com>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"sd@...asysnail.net" <sd@...asysnail.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"leon@...nel.org" <leon@...nel.org>
Subject: RE: [PATCH net-next v5 5/5] macsec: Don't rely solely on the dst MAC
address to identify destination MACsec device
> -----Original Message-----
> From: Jakub Kicinski <kuba@...nel.org>
> Sent: Friday, 14 April 2023 18:01
> To: Emeel Hakim <ehakim@...dia.com>
> Cc: davem@...emloft.net; pabeni@...hat.com; edumazet@...gle.com;
> sd@...asysnail.net; netdev@...r.kernel.org; leon@...nel.org
> Subject: Re: [PATCH net-next v5 5/5] macsec: Don't rely solely on the dst MAC
> address to identify destination MACsec device
>
> External email: Use caution opening links or attachments
>
>
> On Thu, 13 Apr 2023 13:56:22 +0300 Emeel Hakim wrote:
> > + struct macsec_rx_sc *rx_sc = (md_dst && md_dst->type ==
> METADATA_MACSEC) ?
> > + find_rx_sc(&macsec->secy,
> > + md_dst->u.macsec_info.sci) : NULL;
>
> Just a coding nit, in addition to Subbaraya's question:
> why use a ternary operator if the entire expression ends up being
> 3 lines of code? :| And well above 80 char.
right, maybe this is a better approach?
struct macsec_rx_sc *rx_sc = NULL;
if (md_dst && md_dst->type == METADATA_MACSEC)
rx_sc = find_rx_sc(&macsec->secy, md_dst->u.macsec_info.sci);
what do you think?
Powered by blists - more mailing lists