Message ID | 20210423155933.29787-2-vadym.kochan@plvision.eu (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | Marvell Prestera Switchdev initial updates for | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | success | CCed 5 of 5 maintainers |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 8 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
On Fri, Apr 23, 2021 at 06:59:31PM +0300, Vadym Kochan wrote: > From: Vadym Kochan <vkochan@marvell.com> > > New firmware version has some ABI and feature changes like: > > - LAG support > - initial L3 support > - changed events handling logic > > Signed-off-by: Vadym Kochan <vkochan@marvell.com> > --- > drivers/net/ethernet/marvell/prestera/prestera_pci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/marvell/prestera/prestera_pci.c b/drivers/net/ethernet/marvell/prestera/prestera_pci.c > index 298110119272..80fb5daf1da8 100644 > --- a/drivers/net/ethernet/marvell/prestera/prestera_pci.c > +++ b/drivers/net/ethernet/marvell/prestera/prestera_pci.c > @@ -13,7 +13,7 @@ > > #define PRESTERA_MSG_MAX_SIZE 1500 > > -#define PRESTERA_SUPP_FW_MAJ_VER 2 > +#define PRESTERA_SUPP_FW_MAJ_VER 3 > #define PRESTERA_SUPP_FW_MIN_VER 0 I could be reading the code wrong, but it looks like anybody with firmware version 2 on their machine and this new driver version results in the switch not probing? And if the switch does not probe, do they have any networking to go get the new firmware version? I think you need to provide some degree of backwards compatibly to older firmware. Support version 2 and 3. When version 4 comes out, drop support for version 2 in the driver etc. Andrew
Hi Andrew, On Fri, Apr 23, 2021 at 06:49:01PM +0200, Andrew Lunn wrote: > On Fri, Apr 23, 2021 at 06:59:31PM +0300, Vadym Kochan wrote: > > From: Vadym Kochan <vkochan@marvell.com> > > > > New firmware version has some ABI and feature changes like: > > > > - LAG support > > - initial L3 support > > - changed events handling logic > > > > Signed-off-by: Vadym Kochan <vkochan@marvell.com> > > --- > > drivers/net/ethernet/marvell/prestera/prestera_pci.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/net/ethernet/marvell/prestera/prestera_pci.c b/drivers/net/ethernet/marvell/prestera/prestera_pci.c > > index 298110119272..80fb5daf1da8 100644 > > --- a/drivers/net/ethernet/marvell/prestera/prestera_pci.c > > +++ b/drivers/net/ethernet/marvell/prestera/prestera_pci.c > > @@ -13,7 +13,7 @@ > > > > #define PRESTERA_MSG_MAX_SIZE 1500 > > > > -#define PRESTERA_SUPP_FW_MAJ_VER 2 > > +#define PRESTERA_SUPP_FW_MAJ_VER 3 > > #define PRESTERA_SUPP_FW_MIN_VER 0 > > I could be reading the code wrong, but it looks like anybody with > firmware version 2 on their machine and this new driver version > results in the switch not probing? And if the switch does not probe, > do they have any networking to go get the new firmware version? > Existing boards have management port which is separated from the PP. > I think you need to provide some degree of backwards compatibly to > older firmware. Support version 2 and 3. When version 4 comes out, > drop support for version 2 in the driver etc. > > Andrew
On Fri, Apr 23, 2021 at 08:04:37PM +0300, Vadym Kochan wrote: > Hi Andrew, > > On Fri, Apr 23, 2021 at 06:49:01PM +0200, Andrew Lunn wrote: > > On Fri, Apr 23, 2021 at 06:59:31PM +0300, Vadym Kochan wrote: > > > From: Vadym Kochan <vkochan@marvell.com> > > > > > > New firmware version has some ABI and feature changes like: > > > > > > - LAG support > > > - initial L3 support > > > - changed events handling logic > > > > > > Signed-off-by: Vadym Kochan <vkochan@marvell.com> > > > --- > > > drivers/net/ethernet/marvell/prestera/prestera_pci.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/net/ethernet/marvell/prestera/prestera_pci.c b/drivers/net/ethernet/marvell/prestera/prestera_pci.c > > > index 298110119272..80fb5daf1da8 100644 > > > --- a/drivers/net/ethernet/marvell/prestera/prestera_pci.c > > > +++ b/drivers/net/ethernet/marvell/prestera/prestera_pci.c > > > @@ -13,7 +13,7 @@ > > > > > > #define PRESTERA_MSG_MAX_SIZE 1500 > > > > > > -#define PRESTERA_SUPP_FW_MAJ_VER 2 > > > +#define PRESTERA_SUPP_FW_MAJ_VER 3 > > > #define PRESTERA_SUPP_FW_MIN_VER 0 > > > > I could be reading the code wrong, but it looks like anybody with > > firmware version 2 on their machine and this new driver version > > results in the switch not probing? And if the switch does not probe, > > do they have any networking to go get the new firmware version? > > > > Existing boards have management port which is separated from the PP. I don't think that is enough. You have strongly tied the kernel version to the firmware version. Upgrade the kernel without first upgrading linux-firmware, and things break. In Linux distributions these are separate packages, each with their own life cycle. There is no guarantee they will be upgraded together. > > I think you need to provide some degree of backwards compatibly to > > older firmware. Support version 2 and 3. When version 4 comes out, > > drop support for version 2 in the driver etc. The wifi driver i have for my laptop does something like this. It first tries to load the latest version of the firmware the driver supports, and if that fails, it goes back to older versions until it finds a version it can load, or gives up, saying they are all too old. Andrew
Hi Andrew, On Fri, Apr 23, 2021 at 08:01:22PM +0200, Andrew Lunn wrote: > On Fri, Apr 23, 2021 at 08:04:37PM +0300, Vadym Kochan wrote: > > Hi Andrew, > > > > On Fri, Apr 23, 2021 at 06:49:01PM +0200, Andrew Lunn wrote: > > > On Fri, Apr 23, 2021 at 06:59:31PM +0300, Vadym Kochan wrote: > > > > From: Vadym Kochan <vkochan@marvell.com> > > > > > > > > New firmware version has some ABI and feature changes like: > > > > > > > > - LAG support > > > > - initial L3 support > > > > - changed events handling logic > > > > > > > > Signed-off-by: Vadym Kochan <vkochan@marvell.com> > > > > --- > > > > drivers/net/ethernet/marvell/prestera/prestera_pci.c | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/drivers/net/ethernet/marvell/prestera/prestera_pci.c b/drivers/net/ethernet/marvell/prestera/prestera_pci.c > > > > index 298110119272..80fb5daf1da8 100644 > > > > --- a/drivers/net/ethernet/marvell/prestera/prestera_pci.c > > > > +++ b/drivers/net/ethernet/marvell/prestera/prestera_pci.c > > > > @@ -13,7 +13,7 @@ > > > > > > > > #define PRESTERA_MSG_MAX_SIZE 1500 > > > > > > > > -#define PRESTERA_SUPP_FW_MAJ_VER 2 > > > > +#define PRESTERA_SUPP_FW_MAJ_VER 3 > > > > #define PRESTERA_SUPP_FW_MIN_VER 0 > > > > > > I could be reading the code wrong, but it looks like anybody with > > > firmware version 2 on their machine and this new driver version > > > results in the switch not probing? And if the switch does not probe, > > > do they have any networking to go get the new firmware version? > > > > > > > Existing boards have management port which is separated from the PP. > > I don't think that is enough. You have strongly tied the kernel > version to the firmware version. Upgrade the kernel without first > upgrading linux-firmware, and things break. In Linux distributions > these are separate packages, each with their own life cycle. There is > no guarantee they will be upgraded together. > > > > I think you need to provide some degree of backwards compatibly to > > > older firmware. Support version 2 and 3. When version 4 comes out, > > > drop support for version 2 in the driver etc. > > The wifi driver i have for my laptop does something like this. It > first tries to load the latest version of the firmware the driver > supports, and if that fails, it goes back to older versions until it > finds a version it can load, or gives up, saying they are all too old. > > Andrew Your comment is right in cases when there's no management port. However, the all current designs use management port connected directly to the CPU and not via the PP. This promises the Network connectivity will remain functional all the time. As for your comment, we have a plan of designing basic PP ports configuration that will enable recovering the PP ports connectivity in case backward compatibility issue will happen. Regarding the distribution issue when the driver version might be released earlier than the firmware, it looks like that the probability of such case is very low because the distributor of the target Linux system will keep track (actually this is how I see it) that driver and firmware versions are aligned. Thanks, Vadym Kochan
> Regarding the distribution issue when the driver version might be released > earlier than the firmware, it looks like that the probability of such > case is very low because the distributor of the target Linux system will > keep track (actually this is how I see it) that driver and firmware > versions are aligned. You really expect Debian, Redhat, openWRT, SuSE to keep a close eye on your kernel driver and update their packages at a time you suggest? I'm also not sure your management port argument is valid. This is an enterprise switch, not a TOR. It is probably installed in some broom cupboard at a satellite facility. The management port is not likely to have its own dedicated link back to the central management site. Upgrades are going to be applied over the network, and you have a real danger of turning it into a remote brick, needing local access to restore it. I really think you need to support two firmware generations. Andrew
On Wed, Apr 28, 2021 at 04:18:52PM +0200, Andrew Lunn wrote: > > Regarding the distribution issue when the driver version might be released > > earlier than the firmware, it looks like that the probability of such > > case is very low because the distributor of the target Linux system will > > keep track (actually this is how I see it) that driver and firmware > > versions are aligned. > > You really expect Debian, Redhat, openWRT, SuSE to keep a close eye on > your kernel driver and update their packages at a time you suggest? > No, I don't think these distros will keep track it because they are targeted for wider usages). But I think that NOS specifc distro (which may be based on top of which you listed) will do it (sure this is just my assumption). > I'm also not sure your management port argument is valid. This is an > enterprise switch, not a TOR. It is probably installed in some broom > cupboard at a satellite facility. The management port is not likely to > have its own dedicated link back to the central management > site. Upgrades are going to be applied over the network, and you have > a real danger of turning it into a remote brick, needing local access > to restore it. > > I really think you need to support two firmware generations. > > Andrew I am just trying to clarify if it really worth of it because it will lead to the hairy code and keep structs for previous FW version. Ofcourse it may have not a big impact if it will be possible to handle FW differences in prestera_hw.c only. I really appreciate your comments, just sharing some concerns/doubts to discuss. Thanks, Vadym Kochan
On Wed, Apr 28, 2021 at 05:54:34PM +0300, Vadym Kochan wrote: > On Wed, Apr 28, 2021 at 04:18:52PM +0200, Andrew Lunn wrote: > > > Regarding the distribution issue when the driver version might be released > > > earlier than the firmware, it looks like that the probability of such > > > case is very low because the distributor of the target Linux system will > > > keep track (actually this is how I see it) that driver and firmware > > > versions are aligned. > > > > You really expect Debian, Redhat, openWRT, SuSE to keep a close eye on > > your kernel driver and update their packages at a time you suggest? > > > > No, I don't think these distros will keep track it because they are > targeted for wider usages). > But I think that NOS specifc distro (which may be based on top of which > you listed) will do it (sure this is just my assumption). Mellanox/Nvidia says you can just run Debian on their switches. Cumulus linux is Debian based. I've been to a few conferences where data center managers have said they want there switches to be just another linux machine they can upgrade whenever they need, nothing special. So that is the TOR segment of the market. If you look at the opposite end of the market, SOHO switches in Linux, very few are actually used as plain boring switches. They are actually embedded into something else. It is an inflight entertainment system which also has a switch. It is a DSL, 4G, and Ethernet switch placed along the side of a railway track. It is inside a bus controlling the passenger information system, announcements, and also a switch. None of these systems are using a NOS. They are using whatever distribution best supports the range of devices and services the box needs to offer. Now, it could be Prestera will only ever be used as a plain boring switch in a box. It never gets used for anything interesting. And since it is a plain boring device, all it needs is a boring NOS? But do you really want to design your driver aound the assumption nobody will do anything interesting with Prestera? > > I'm also not sure your management port argument is valid. This is an > > enterprise switch, not a TOR. It is probably installed in some broom > > cupboard at a satellite facility. The management port is not likely to > > have its own dedicated link back to the central management > > site. Upgrades are going to be applied over the network, and you have > > a real danger of turning it into a remote brick, needing local access > > to restore it. > > I am just trying to clarify if it really worth of it because it will > lead to the hairy code and keep structs for previous FW version. Well, if you decide you really should support two generations of the firmware, you are likely to throw away 3.0.0 and release a 3.0.1 which is backwards compatible to 2.X.X, but adds additional calls for the new functionality. Go look at how other drivers have handled this in the past. Andrew
diff --git a/drivers/net/ethernet/marvell/prestera/prestera_pci.c b/drivers/net/ethernet/marvell/prestera/prestera_pci.c index 298110119272..80fb5daf1da8 100644 --- a/drivers/net/ethernet/marvell/prestera/prestera_pci.c +++ b/drivers/net/ethernet/marvell/prestera/prestera_pci.c @@ -13,7 +13,7 @@ #define PRESTERA_MSG_MAX_SIZE 1500 -#define PRESTERA_SUPP_FW_MAJ_VER 2 +#define PRESTERA_SUPP_FW_MAJ_VER 3 #define PRESTERA_SUPP_FW_MIN_VER 0 #define PRESTERA_FW_PATH_FMT "mrvl/prestera/mvsw_prestera_fw-v%u.%u.img"