All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hw/nvme: force nvme-ns param 'shared' to false if no nvme-subsys node
@ 2022-06-28 12:22 Niklas Cassel via
  2022-06-28 12:43 ` Niklas Cassel via
  2022-07-07  6:02 ` Klaus Jensen
  0 siblings, 2 replies; 3+ messages in thread
From: Niklas Cassel via @ 2022-06-28 12:22 UTC (permalink / raw)
  To: kbusch, its; +Cc: qemu-block, qemu-devel, hch, Niklas Cassel

Since commit 916b0f0b5264 ("hw/nvme: change nvme-ns 'shared' default")
the default value of nvme-ns param 'shared' is set to true, regardless
if there is a nvme-subsys node or not.

On a system without a nvme-subsys node, a namespace will never be able
to be attached to more than one controller, so for this configuration,
it is counterintuitive for this parameter to be set by default.

Force the nvme-ns param 'shared' to false for configurations where
there is no nvme-subsys node, as the namespace will never be able to
attach to more than one controller anyway.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
---
 hw/nvme/ns.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/nvme/ns.c b/hw/nvme/ns.c
index 870c3ca1a2..62a1f97be0 100644
--- a/hw/nvme/ns.c
+++ b/hw/nvme/ns.c
@@ -546,6 +546,8 @@ static void nvme_ns_realize(DeviceState *dev, Error **errp)
     int i;
 
     if (!n->subsys) {
+        /* If no subsys, the ns cannot be attached to more than one ctrl. */
+        ns->params.shared = false;
         if (ns->params.detached) {
             error_setg(errp, "detached requires that the nvme device is "
                        "linked to an nvme-subsys device");
-- 
2.36.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] hw/nvme: force nvme-ns param 'shared' to false if no nvme-subsys node
  2022-06-28 12:22 [PATCH] hw/nvme: force nvme-ns param 'shared' to false if no nvme-subsys node Niklas Cassel via
@ 2022-06-28 12:43 ` Niklas Cassel via
  2022-07-07  6:02 ` Klaus Jensen
  1 sibling, 0 replies; 3+ messages in thread
From: Niklas Cassel via @ 2022-06-28 12:43 UTC (permalink / raw)
  To: kbusch, its, qemu-block, qemu-devel, hch, peter.maydell; +Cc: Damien Le Moal

On Tue, Jun 28, 2022 at 02:22:09PM +0200, Niklas Cassel via wrote:

Hello Peter,

It seems that mailman configuration on qemu-devel is rewriting the
"From:" field to "From: Niklas Cassel via <qemu-devel@nongnu.org>"

If found this old thread about the same issue:
https://qemu-devel.nongnu.narkive.com/6hm8Fbvz/mailing-list-vs-dmarc-and-microsoft-com-s-p-reject-policy

Which says that this can happen when using p=reject policy.

However, doing a bcc to another of my personal addresses,
it looks like the SKIM/SPF/DMARC is all passing,
and non of them seem to have p=reject:

ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@wdc.com header.s=dkim.wdc.com header.b=TTwPBUcS;
       spf=pass (google.com: domain of prvs=171ad38db=niklas.cassel@wdc.com designates 216.71.153.141 as permitted sender) smtp.mailfrom="prvs=171ad38db=niklas.cassel@wdc.com";
       dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wdc.com
Return-Path: <prvs=171ad38db=niklas.cassel@wdc.com>
Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com. [216.71.153.141])
        by mx.google.com with ESMTPS id sd33-20020a1709076e2100b00711f20051f2si13306645ejc.697.2022.06.28.05.22.25
        for <nks.gnu@gmail.com>
        (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 28 Jun 2022 05:22:26 -0700 (PDT)
Received-SPF: pass (google.com: domain of prvs=171ad38db=niklas.cassel@wdc.com designates 216.71.153.141 as permitted sender) client-ip=216.71.153.141;
Authentication-Results: mx.google.com;
       dkim=pass header.i=@wdc.com header.s=dkim.wdc.com header.b=TTwPBUcS;
       spf=pass (google.com: domain of prvs=171ad38db=niklas.cassel@wdc.com designates 216.71.153.141 as permitted sender) smtp.mailfrom="prvs=171ad38db=niklas.cassel@wdc.com";
       dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE)


Any idea why mailmain is rewriting the "From:" field for my messages?


Kind regards,
Niklas

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] hw/nvme: force nvme-ns param 'shared' to false if no nvme-subsys node
  2022-06-28 12:22 [PATCH] hw/nvme: force nvme-ns param 'shared' to false if no nvme-subsys node Niklas Cassel via
  2022-06-28 12:43 ` Niklas Cassel via
@ 2022-07-07  6:02 ` Klaus Jensen
  1 sibling, 0 replies; 3+ messages in thread
From: Klaus Jensen @ 2022-07-07  6:02 UTC (permalink / raw)
  To: Niklas Cassel; +Cc: kbusch, qemu-block, qemu-devel, hch

[-- Attachment #1: Type: text/plain, Size: 1391 bytes --]

On Jun 28 14:22, Niklas Cassel wrote:
> Since commit 916b0f0b5264 ("hw/nvme: change nvme-ns 'shared' default")
> the default value of nvme-ns param 'shared' is set to true, regardless
> if there is a nvme-subsys node or not.
> 
> On a system without a nvme-subsys node, a namespace will never be able
> to be attached to more than one controller, so for this configuration,
> it is counterintuitive for this parameter to be set by default.
> 
> Force the nvme-ns param 'shared' to false for configurations where
> there is no nvme-subsys node, as the namespace will never be able to
> attach to more than one controller anyway.
> 
> Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
> ---
>  hw/nvme/ns.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/hw/nvme/ns.c b/hw/nvme/ns.c
> index 870c3ca1a2..62a1f97be0 100644
> --- a/hw/nvme/ns.c
> +++ b/hw/nvme/ns.c
> @@ -546,6 +546,8 @@ static void nvme_ns_realize(DeviceState *dev, Error **errp)
>      int i;
>  
>      if (!n->subsys) {
> +        /* If no subsys, the ns cannot be attached to more than one ctrl. */
> +        ns->params.shared = false;
>          if (ns->params.detached) {
>              error_setg(errp, "detached requires that the nvme device is "
>                         "linked to an nvme-subsys device");
> -- 
> 2.36.1
> 

Thanks Niklas,

Applied to nvme-next.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-07  6:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-28 12:22 [PATCH] hw/nvme: force nvme-ns param 'shared' to false if no nvme-subsys node Niklas Cassel via
2022-06-28 12:43 ` Niklas Cassel via
2022-07-07  6:02 ` Klaus Jensen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.