[Intel-wired-lan] [PATCH net-next 06/12] ice: Add guard rule when creating FDB in switchdev
Drewek, Wojciech
wojciech.drewek at intel.com
Thu Apr 27 07:24:05 UTC 2023
> -----Original Message-----
> From: Lobakin, Aleksander <aleksander.lobakin at intel.com>
> Sent: środa, 26 kwietnia 2023 17:25
> To: Drewek, Wojciech <wojciech.drewek at intel.com>
> Cc: intel-wired-lan at lists.osuosl.org; netdev at vger.kernel.org; Ertman, David M <david.m.ertman at intel.com>;
> michal.swiatkowski at linux.intel.com; marcin.szycik at linux.intel.com; Chmielewski, Pawel <pawel.chmielewski at intel.com>;
> Samudrala, Sridhar <sridhar.samudrala at intel.com>
> Subject: Re: [PATCH net-next 06/12] ice: Add guard rule when creating FDB in switchdev
>
> From: Wojciech Drewek <wojciech.drewek at intel.com>
> Date: Wed, 26 Apr 2023 11:50:56 +0200
>
> >
> >
> >> -----Original Message-----
> >> From: Drewek, Wojciech
> >> Sent: wtorek, 25 kwietnia 2023 11:18
> >> To: Lobakin, Aleksander <aleksander.lobakin at intel.com>
>
> [...]
>
> >>> guard_rule = ice_eswitch_...
> >>> err = PTR_ERR(guard_rule);
> >>> if (err) {
> >>> ...
> >>>
> >>
> >> I like it, less ptr <-> macros
> >
> > Actually it won't work, PTR_ERR would not convert pointer to 0 in case of success.
>
> Ooops, PTR_ERR_OR_ZERO() then? I forgot there are several macros for
> different cases =\
Cool, this is what we needed :)
>
> >
> >>
> >>>> + dev_err(dev, "Failed to create eswitch bridge %sgress guard rule, err: %d\n",
> >>>> + port_type == ICE_ESWITCH_BR_UPLINK_PORT ? "e" : "in",
> >>>> + err);
> >>>
> >>> You still can print it via "%pe" + @guard_rule instead of @err :p (same
> >>> with @fwd_rule above)
> [...]
>
> Thanks,
> Olek
More information about the Intel-wired-lan
mailing list