[PATCH 2/3] nvmet: expose IEEE OUI to configfs
Konstantin Shelekhin
k.shelekhin at yadro.com
Fri Oct 28 04:33:35 PDT 2022
On Wed, Oct 26, 2022 at 01:49:17PM +0300, Sagi Grimberg 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 ?
While there: we have a little internal bikeshedding on how to actually
name the ConfigFS parameter :D
Weirdly in this part of the spec it's called IEEE instead of OUI,
however in other parts (like EUI64 generation) it's referenced as OUI.
To the end user it makes more sense to call it simply OUI. So basically
we have:
attr_ieee
attr_oui
attr_ieee_oui
Purely a style nitpicking, but what's your stance?
More information about the Linux-nvme
mailing list