[PATCH 2/3] nvmet: expose IEEE OUI to configfs
Sagi Grimberg
sagi at grimberg.me
Wed Oct 26 03:49:17 PDT 2022
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 ?
More information about the Linux-nvme
mailing list