netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Roland Dreier <roland.dreier@gmail.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	linux-pci@vger.kernel.org,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Emil Tantilov <emil.s.tantilov@intel.com>
Subject: Re: [PATCH] PCI: Update ACS quirk for more Intel 10G NICs
Date: Mon, 24 Jul 2017 14:57:07 -0600	[thread overview]
Message-ID: <20170724145707.00a2e1b9@w520.home> (raw)
In-Reply-To: <CAG4TOxOFVctaGOk=bHo8XZ+Nw4mr_qM+XbhBO2=zPn3uKY-gkg@mail.gmail.com>

On Mon, 24 Jul 2017 12:31:39 -0700
Roland Dreier <roland.dreier@gmail.com> wrote:

> > Is there a misunderstanding of the code flow here?  We're never setting
> > EC.  In the first code block we're just masking out requested
> > capabilities where unimplemented capabilities is the same as
> > implemented + enabled.  We're not adding EC to the request, we're
> > just not removing it based on the implemented capabilities because we
> > don't interpret it the same way.  Thus if someone wants to test a
> > device for EC, it really needs to implement EC, we cannot assume it
> > based on lack of support for EC in the ACS capability.  As you point
> > out, nobody really cares about EC yet though.  
> 
> I guess I find the semantics confusing.  For every other bit,
> pci_acs_enabled() returns true if the bit is either enabled or not
> implemented.  For EC, it returns false if the bit is not implemented.

EC is a bit more complicated than the other bits, it has both an enable
bit and a control vector and I'd need to stare at the spec for a while
to understand it better and likely decide that it needs a separate
interface from the rest of the capabilities within ACS.  Therefore we
take the conservative approach of requiring the device to legitimately
support it if anyone asks for it.

> It's not clear to me what the use case for checking for PCI_ACS_EC
> enabled would be.  Seems like checking for EC in the capabilities
> register would be more useful.

Some sort of interface for manipulating the control vector would be
necessary to fully support it and maybe the interface today just
doesn't make much sense for it.  Thanks,

Alex

  reply	other threads:[~2017-07-24 20:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-20 21:41 [PATCH] PCI: Update ACS quirk for more Intel 10G NICs Roland Dreier
2017-07-20 22:15 ` Alex Williamson
2017-07-20 22:53   ` Roland Dreier
2017-07-24 16:45     ` Alex Williamson
2017-07-24 17:18       ` Roland Dreier
2017-07-24 19:01         ` Alex Williamson
2017-07-24 19:31           ` Roland Dreier
2017-07-24 20:57             ` Alex Williamson [this message]
2017-07-20 22:50 ` Tantilov, Emil S
2017-08-03 21:49 ` Bjorn Helgaas
2017-08-03 22:16   ` Alex Williamson
2017-08-04 21:47     ` Roland Dreier
2017-08-04 13:28   ` David Laight
2017-08-04 14:28     ` Alex Williamson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170724145707.00a2e1b9@w520.home \
    --to=alex.williamson@redhat.com \
    --cc=bhelgaas@google.com \
    --cc=emil.s.tantilov@intel.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=roland.dreier@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).