[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <db91e3b3-5282-7172-a9e5-8a0425bbc7d5@intel.com>
Date: Thu, 20 Apr 2023 18:53:46 +0200
From: Alexander Lobakin <aleksander.lobakin@...el.com>
To: "Drewek, Wojciech" <wojciech.drewek@...el.com>
CC: "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"Ertman, David M" <david.m.ertman@...el.com>,
"michal.swiatkowski@...ux.intel.com"
<michal.swiatkowski@...ux.intel.com>,
"marcin.szycik@...ux.intel.com" <marcin.szycik@...ux.intel.com>,
"Chmielewski, Pawel" <pawel.chmielewski@...el.com>,
"Samudrala, Sridhar" <sridhar.samudrala@...el.com>
Subject: Re: [PATCH net-next 04/12] ice: Implement basic eswitch bridge setup
From: Wojciech Drewek <wojciech.drewek@...el.com>
Date: Thu, 20 Apr 2023 12:46:31 +0200
>
>
>> -----Original Message-----
>> From: Drewek, Wojciech
>> Sent: czwartek, 20 kwietnia 2023 11:54
>> To: Lobakin, Aleksander <aleksander.lobakin@...el.com>
>> Cc: intel-wired-lan@...ts.osuosl.org; netdev@...r.kernel.org; Ertman, David M <david.m.ertman@...el.com>;
>> michal.swiatkowski@...ux.intel.com; marcin.szycik@...ux.intel.com; Chmielewski, Pawel <pawel.chmielewski@...el.com>;
>> Samudrala, Sridhar <sridhar.samudrala@...el.com>
>> Subject: RE: [PATCH net-next 04/12] ice: Implement basic eswitch bridge setup
>>
>> Thanks for review Olek!
>>
>> Most of the comments sound reasonable to me (and I will include them) with some exceptions.
[...]
>>>> +static struct ice_esw_br_port *
>>>> +ice_eswitch_br_netdev_to_port(struct net_device *dev)
>>>
>>> Also const?
>
> This function changes a bit in "ice: Accept LAG netdevs in bridge offloads"
> With the changes introduced in this commit, I think that @dev as constant is not a good option.
>
>>>
>>>> +{
>>>> + if (ice_is_port_repr_netdev(dev)) {
>>>> + struct ice_repr *repr = ice_netdev_to_repr(dev);
>>>> +
>>>> + return repr->br_port;
>>>> + } else if (netif_is_ice(dev)) {
>>>> + struct ice_pf *pf = ice_netdev_to_pf(dev);
>>>
>>> Both @repr and @pf can also be const :p
>
> Repr makes sense to me, the second part will change later and I think that
> there is no point in making it const
+ for both, not a problem, esp. given that the subsequent patches
require them to be non-constant.
>
>>>
>>>> +
>>>> + return pf->br_port;
>>>> + }
>>>> +
>>>> + return NULL;
>>>> +}
[...]
Thanks,
Olek
Powered by blists - more mailing lists