From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: "Drewek, Wojciech" <wojciech.drewek@intel.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"intel-wired-lan@lists.osuosl.org"
<intel-wired-lan@lists.osuosl.org>
Subject: Re: [Intel-wired-lan] [PATCH net-next 09/12] ice: implement bridge port vlan
Date: Tue, 9 May 2023 17:06:40 +0200 [thread overview]
Message-ID: <af492889-6b0d-024d-91e9-a953f99419d8@intel.com> (raw)
In-Reply-To: <MW4PR11MB5776A66941471BB2ABF7E99DFD769@MW4PR11MB5776.namprd11.prod.outlook.com>
From: Wojciech Drewek <wojciech.drewek@intel.com>
Date: Tue, 9 May 2023 13:25:40 +0200
>
>
>> -----Original Message-----
>> From: Lobakin, Aleksander <aleksander.lobakin@intel.com>
>> Sent: piątek, 21 kwietnia 2023 18:35
>> To: Drewek, Wojciech <wojciech.drewek@intel.com>
>> Cc: intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org; Ertman, David M <david.m.ertman@intel.com>;
>> michal.swiatkowski@linux.intel.com; marcin.szycik@linux.intel.com; Chmielewski, Pawel <pawel.chmielewski@intel.com>;
>> Samudrala, Sridhar <sridhar.samudrala@intel.com>
>> Subject: Re: [PATCH net-next 09/12] ice: implement bridge port vlan
[...]
>>> + /* Setting port vlan on uplink isn't supported by hw */
>>> + if (port->type == ICE_ESWITCH_BR_UPLINK_PORT)
>>> + return -EOPNOTSUPP;
>>> +
>>> + if (port->pvid) {
>>> + dev_info(dev,
>>
>> dev_err()?
>
> To me it's not an error, port vlan is already configured
Usually, every user action leading to an errno instead of 0 (success) is
an error, it's the user who is responsible for not doing such things.
A bit more details below, I reply bottom-up this time :z
>
>>
>>> + "Port VLAN (vsi=%u, vid=%u) already exists on the port, remove it before adding new one\n",
>>> + port->vsi_idx, port->pvid);
>>> + return -EEXIST;
>>
>> Hmm, isn't -EBUSY more common for such cases?
>>
>> (below as well)
>
> I don't think so, user is trying to configure something that is already done.
+
>>> @@ -639,14 +697,29 @@ ice_eswitch_br_vlan_create(u16 vid, u16 flags, struct ice_esw_br_port *port)
>>>
>>> vlan->vid = vid;
>>> vlan->flags = flags;
>>> + if ((flags & BRIDGE_VLAN_INFO_PVID) &&
>>> + (flags & BRIDGE_VLAN_INFO_UNTAGGED)) {
>>> + err = ice_eswitch_br_set_pvid(port, vlan);
>>> + if (err)
>>> + goto err_set_pvid;
>>> + } else if ((flags & BRIDGE_VLAN_INFO_PVID) ||
>>> + (flags & BRIDGE_VLAN_INFO_UNTAGGED)) {
>>> + dev_info(dev, "VLAN push and pop are supported only simultaneously\n");
>>
>> (same for dev_err(), as well as below)
>
>
> Again, is this an error really? We just don't support such case.
Well, "not supported" is an error in the kernel usually. It's like,
"user is responsible for checking the capabilities before trying to
configure/use something, if he didn't care, then we don't as well" :D
The main problem here is as follows:
1. Most distros have "quiet" in the default command line, which limits
the default output to errors+.
2. User tries to configure something, which is not supported.
3. Essentially has a bail out with -EOPNOTSUPP.
4. The default kernel output says nothing.
It's not an issue for tools like dmesg, since they usually display the
whole log with every loglevel, but still not really consistent as for
me. Plus, even in such tools, dev_info() will just lost amidst tons of
other nonsensical output, while dev_err() would be marked bold red.
>>
>>> + return ERR_PTR(-EOPNOTSUPP);
>>> + }
[...]
Thanks,
Olek
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
next prev parent reply other threads:[~2023-05-09 15:10 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-17 9:34 [Intel-wired-lan] [PATCH net-next 00/12] ice: switchdev bridge offload Wojciech Drewek
2023-04-17 9:34 ` [Intel-wired-lan] [PATCH net-next 01/12] ice: Minor switchdev fixes Wojciech Drewek
2023-04-19 14:35 ` Alexander Lobakin
2023-04-17 9:34 ` [Intel-wired-lan] [PATCH net-next 02/12] ice: Remove exclusion code for RDMA+SRIOV Wojciech Drewek
2023-04-19 14:38 ` Alexander Lobakin
2023-04-25 15:26 ` Michal Schmidt
2023-04-17 9:34 ` [Intel-wired-lan] [PATCH net-next 03/12] ice: Unset src prune on uplink VSI Wojciech Drewek
2023-04-19 14:49 ` Alexander Lobakin
2023-04-17 9:34 ` [Intel-wired-lan] [PATCH net-next 04/12] ice: Implement basic eswitch bridge setup Wojciech Drewek
2023-04-19 15:23 ` Alexander Lobakin
2023-04-20 9:54 ` Drewek, Wojciech
2023-04-20 10:46 ` Drewek, Wojciech
2023-04-20 16:53 ` Alexander Lobakin
2023-04-20 16:51 ` Alexander Lobakin
2023-04-17 9:34 ` [Intel-wired-lan] [PATCH net-next 05/12] ice: Switchdev FDB events support Wojciech Drewek
2023-04-19 15:38 ` Alexander Lobakin
2023-04-20 11:27 ` Drewek, Wojciech
2023-04-20 16:59 ` Alexander Lobakin
2023-04-21 8:45 ` Drewek, Wojciech
2023-04-17 9:34 ` [Intel-wired-lan] [PATCH net-next 06/12] ice: Add guard rule when creating FDB in switchdev Wojciech Drewek
2023-04-21 14:22 ` Alexander Lobakin
2023-04-25 9:17 ` Drewek, Wojciech
2023-04-26 9:50 ` Drewek, Wojciech
2023-04-26 15:24 ` Alexander Lobakin
2023-04-27 7:24 ` Drewek, Wojciech
2023-04-17 9:34 ` [Intel-wired-lan] [PATCH net-next 07/12] ice: Accept LAG netdevs in bridge offloads Wojciech Drewek
2023-04-21 14:40 ` Alexander Lobakin
2023-04-26 11:31 ` Drewek, Wojciech
2023-04-26 15:31 ` Alexander Lobakin
2023-04-17 9:34 ` [Intel-wired-lan] [PATCH net-next 08/12] ice: Add VLAN FDB support in switchdev mode Wojciech Drewek
2023-04-21 15:25 ` Alexander Lobakin
2023-04-27 10:28 ` Drewek, Wojciech
2023-05-08 14:09 ` Alexander Lobakin
2023-04-17 9:34 ` [Intel-wired-lan] [PATCH net-next 09/12] ice: implement bridge port vlan Wojciech Drewek
2023-04-21 16:35 ` Alexander Lobakin
2023-05-09 11:25 ` Drewek, Wojciech
2023-05-09 15:06 ` Alexander Lobakin [this message]
2023-04-17 9:34 ` [Intel-wired-lan] [PATCH net-next 10/12] ice: implement static version of ageing Wojciech Drewek
2023-04-21 16:22 ` Alexander Lobakin
2023-05-09 10:55 ` Drewek, Wojciech
2023-05-09 14:55 ` Alexander Lobakin
2023-04-17 9:34 ` [Intel-wired-lan] [PATCH net-next 11/12] ice: add tracepoints for the switchdev bridge Wojciech Drewek
2023-04-17 9:34 ` [Intel-wired-lan] [PATCH net-next 12/12] ice: Ethtool fdb_cnt stats Wojciech Drewek
2023-04-21 16:32 ` Alexander Lobakin
2023-05-09 12:52 ` Drewek, Wojciech
2023-05-09 15:14 ` Alexander Lobakin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=af492889-6b0d-024d-91e9-a953f99419d8@intel.com \
--to=aleksander.lobakin@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=netdev@vger.kernel.org \
--cc=wojciech.drewek@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox