[dpdk-dev] [PATCH v3 2/2] eal: handle compressed firmwares

David Marchand david.marchand at redhat.com
Mon Jul 5 08:54:10 CEST 2021


On Mon, Jul 5, 2021 at 8:35 AM Wang, Haiyue <haiyue.wang at intel.com> wrote:
> > +int
> > +rte_firmware_read(const char *name, void **buf, size_t *bufsz)
> > +{
> > +     char path[PATH_MAX];
> > +     int ret;
> > +
> > +     ret = firmware_read(name, buf, bufsz);
> > +     if (ret < 0) {
> > +             snprintf(path, sizeof(path), "%s.xz", name);
> > +             path[PATH_MAX - 1] = '\0';
> > +#ifndef RTE_HAS_LIBARCHIVE
> > +             if (access(path, F_OK) == 0) {
> > +                     RTE_LOG(WARNING, EAL, "libarchive not available, %s cannot be decompressed\n",
> > +                             path);
> > +             }
> > +#else
> > +             ret = firmware_read(path, buf, bufsz);
> > +#endif
> > +     }
> > +     return ret;
> > +}
>
>
> Since ice PMD needs to check if the firmware file with different name can be accessed
> by some kind of order, before doing the final firmware selection. Should we also add
> the firmware access API for handling this ?

I don't see the need.
Is the behavior changed for net/ice with this patch?


-- 
David Marchand



More information about the dev mailing list