Subject: Re: [PATCH net-next] cxgb4: Add support to flash firmware config image

From: Rahul Lakkireddy <[email-masked]>
Date: Sat, 1 Aug 2020 02:47:38 +0530

On Friday, July 07/31/20, 2020 at 11:00:08 -0700, Jakub Kicinski wrote:
> On Fri, 31 Jul 2020 16:39:04 +0530 Ganji Aravind wrote:
> > On Thursday, July 07/30/20, 2020 at 16:23:35 -0700, Jakub Kicinski wrote:
> > > On Thu, 30 Jul 2020 20:41:38 +0530 Ganji Aravind wrote:  
> > > > Update set_flash to flash firmware configuration image
> > > > to flash region.  
> > > 
> > > And the reason why you need to flash some .ini files separately is?  
> > 
> > Hi Jakub,
> > 
> > The firmware config file contains information on how the firmware
> > should distribute the hardware resources among NIC and
> > Upper Layer Drivers(ULD), like iWARP, crypto, filtering, etc.
> > 
> > The firmware image comes with an in-built default config file that
> > distributes resources among the NIC and all the ULDs. However, in
> > some cases, where we don't want to run a particular ULD, or if we
> > want to redistribute the resources, then we'd modify the firmware
> > config file and then firmware will redistribute those resources
> > according to the new configuration. So, if firmware finds this
> > custom config file in flash, it reads this first. Otherwise, it'll
> > continue initializing the adapter with its own in-built default
> > config file.
> 
> Sounds like something devlink could be extended to do.
> 
> Firmware update interface is not for configuration.

I thought /lib/firmware is where firmware related files need to be
placed and ethtool --flash needs to be used to program them to
their respective locations on adapter's flash.

Note that we don't have devlink support in our driver yet. And, we're
a bit confused here on why this already existing ethtool feature needs
to be duplicated to devlink.

Thanks,
Rahul