[PATCH 2/3] nvmet: expose IEEE OUI to configfs

Aleksandr Miloserdov a.miloserdov at yadro.com
Thu Oct 27 05:48:38 PDT 2022


> On 26.10.2022, 14:49, "Sagi Grimberg" <sagi at grimberg.me> wrote:
>    On 10/26/22 11:31, Aleksandr Miloserdov wrote:
> > Allow user to set OUI for the controller vendor.
> >
> > Reviewed-by: Konstantin Shelekhin <k.shelekhin at yadro.com>
> > Reviewed-by: Dmitriy Bogdanov <d.bogdanov at yadro.com>
> > Signed-off-by: Aleksandr Miloserdov <a.miloserdov at yadro.com>
> > ---
> >   drivers/nvme/target/admin-cmd.c |  9 +++---
> >   drivers/nvme/target/configfs.c  | 49 +++++++++++++++++++++++++++++++++
> >   drivers/nvme/target/core.c      |  2 ++
> >   drivers/nvme/target/nvmet.h     |  1 +
> >   4 files changed, 56 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
> > index c8a061ce3ee5..0b415335bb5f 100644
> > --- a/drivers/nvme/target/admin-cmd.c
> > +++ b/drivers/nvme/target/admin-cmd.c
> > @@ -372,6 +372,10 @@ static void nvmet_execute_identify_ctrl(struct nvmet_req *req)
> >       memcpy_and_pad(id->fr, sizeof(id->fr),
> >                      UTS_RELEASE, strlen(UTS_RELEASE), ' ');
> >
> > +     id->ieee[0] = (subsys->ieee_oui) & 0xff;
> > +     id->ieee[1] = (subsys->ieee_oui >> 8) & 0xff;
> > +     id->ieee[2] = (subsys->ieee_oui >> 16) & 0xff;
> > +
>
>    put_unaligned_24 ?

Seems like a good idea, I'll add it in the second version of the patch.
Did you happen to check out the third patch from the series?



More information about the Linux-nvme mailing list