From nobody Mon Nov 20 15:36:18 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SYs760tRDz51S91; Mon, 20 Nov 2023 15:36:34 +0000 (UTC) (envelope-from ctuffli@gmail.com) Received: from mail-oa1-f47.google.com (mail-oa1-f47.google.com [209.85.160.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SYs75235Nz4Ryc; Mon, 20 Nov 2023 15:36:33 +0000 (UTC) (envelope-from ctuffli@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of ctuffli@gmail.com designates 209.85.160.47 as permitted sender) smtp.mailfrom=ctuffli@gmail.com; dmarc=none Received: by mail-oa1-f47.google.com with SMTP id 586e51a60fabf-1f5eac85e0eso671649fac.1; Mon, 20 Nov 2023 07:36:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700494592; x=1701099392; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LhhUnoCeID+7E7SJNYHk5yV6X7BOgtBdTWSF6Gf+dy8=; b=JYuawy9hITviDalsvko0DCwT3M9x+qojfdN3cAH7jDD/D22gJpb551zKc7bVJGCXFS M4ZnWBvx+ycfvkWktOkaYIxiRL3SxZE7s4kA7KWu1mRuBlq8DyRyNT3HonqgseTgycPL mjYVjR1d9cOra/NGgOgD8txvseiQvXQVIEUpp98BmcwkTJ9R7s4yRRBtmB1HZ3zMCFRe X/oSxKTRK+eHeQ57iGE9o+mQuiibOQeLOAaCpklAhq/IUp4slAEal1JRj46p08GAmF2i aqBX1kefH+LfCMydUeHUxOpntUpSK9gdzfHLHMyrRkGJpoZvOh7iZPgwWeT6ehWSVuzI /MpQ== X-Gm-Message-State: AOJu0Yz3u028wL2NBgx4VEu8itDV0MNtcS315vwv22a8wCANxT1+uVte vosZh9os/m5u99LkTI5YpzktyxrJ9LI= X-Google-Smtp-Source: AGHT+IFH0OnlPkEJcj+OaClmAxsUeMqL1wl9pDD034SLKyUeB8xV+kgSSMY86LY67SrLIsZG8AQ9Mw== X-Received: by 2002:a05:6870:798c:b0:1f9:602e:7b08 with SMTP id he12-20020a056870798c00b001f9602e7b08mr231790oab.11.1700494590268; Mon, 20 Nov 2023 07:36:30 -0800 (PST) Received: from mail-oa1-f45.google.com (mail-oa1-f45.google.com. [209.85.160.45]) by smtp.gmail.com with ESMTPSA id e2-20020a056870450200b001f4d34ae2ecsm1359433oao.23.2023.11.20.07.36.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Nov 2023 07:36:30 -0800 (PST) Received: by mail-oa1-f45.google.com with SMTP id 586e51a60fabf-1ea98ad294cso2031647fac.3; Mon, 20 Nov 2023 07:36:30 -0800 (PST) X-Received: by 2002:a05:6871:2b16:b0:1e9:b4d1:9bed with SMTP id dr22-20020a0568712b1600b001e9b4d19bedmr7005594oac.40.1700494589790; Mon, 20 Nov 2023 07:36:29 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202311180432.3AI4W3YM029176@gitrepo.freebsd.org> <71162369-66f6-4f08-9ba7-e87236151fee@aetern.org> In-Reply-To: <71162369-66f6-4f08-9ba7-e87236151fee@aetern.org> From: Chuck Tuffli Date: Mon, 20 Nov 2023 07:36:18 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 34a6ad848fbf - main - nvme: Don't use version to listen for events for ns and fw changes To: Yuri Cc: Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-2.96 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.997]; NEURAL_HAM_SHORT(-0.96)[-0.960]; FORGED_SENDER(0.30)[chuck@freebsd.org,ctuffli@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_NONE(0.00)[209.85.160.45:received]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.160.47:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; RCPT_COUNT_FIVE(0.00)[5]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_HAS_DN(0.00)[]; RCVD_TLS_LAST(0.00)[]; TO_DN_SOME(0.00)[]; DMARC_NA(0.00)[freebsd.org]; FROM_NEQ_ENVFROM(0.00)[chuck@freebsd.org,ctuffli@gmail.com] X-Rspamd-Queue-Id: 4SYs75235Nz4Ryc X-Spamd-Bar: -- On Fri, Nov 17, 2023 at 8:53=E2=80=AFPM Yuri wrote: > > Warner Losh wrote: > > The branch main has been updated by imp: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D34a6ad848fbf471773a430a7= e457bf49816e756e > > > > commit 34a6ad848fbf471773a430a7e457bf49816e756e > > Author: Warner Losh > > AuthorDate: 2023-11-18 04:24:00 +0000 > > Commit: Warner Losh > > CommitDate: 2023-11-18 04:25:57 +0000 > > > > nvme: Don't use version to listen for events for ns and fw changes ... > > if (ctrlr->cdata.ver >=3D NVME_REV(1, 2)) > > It seems to be under version check still? Or am I misreading the commit > message? > > > - ctrlr->async_event_config |=3D NVME_ASYNC_EVENT_NS_ATTRIB= UTE | > > - NVME_ASYNC_EVENT_FW_ACTIVATE; > > + ctrlr->async_event_config |=3D > > + ctrlr->cdata.oaes & (NVME_ASYNC_EVENT_NS_ATTRIBUTE | > > + NVME_ASYNC_EVENT_FW_ACTIVATE); I think this logic is correct as the Namespace and Firmware events didn't exist prior to version 1.2. The significant change here (irrespective of the commit message wording) is masking these events if the device doesn't support them. That is, their respective bit in OAES (aka Optional Async Events Supported) will be zero if not supported and then won't be added to the async_event_config. Perhaps the intent was "Don't _only_ use the version to listen for events, but also check they are supported". My $.02 --chuck