Linux-PCI Archive on lore.kernel.org
 help / color / Atom feed
From: "Martin Mareš" <mj@ucw.cz>
To: "return.0" <return.0@me.com>
Cc: linux-pci@vger.kernel.org
Subject: Re: pciutils: decoding extended capabilities with variable size based on lane count
Date: Sat, 13 Jul 2019 14:58:56 +0200
Message-ID: <mj+md-20190713.125226.76248.nikam@ucw.cz> (raw)
In-Reply-To: <917430A7-9813-4F54-A135-BB965950EE27@me.com>

Hello!

> I was working on providing a patch for decoding some of the 4.0 extended
> capabilities, but hit a snag.  The Lane Margining and the 16GT/S Physical
> Layer Extended Capabilities only have valid data for the number of lanes (up
> to 32) currently configured. It would be nice to know the width during
> decode without having to re-read and decode, but instead grab it from the
> device structure.

Generally, I like this approach. It however introduces a dependency between
parsing of different capabilities – so far, we did not assume any concrete
order. I think that assuming that extended caps are parsed after all
non-extended ones is OK, but please document it somewhere. Perhaps you can
add a comment to the newly added struct fields explaining when are these set
and when they are used.

				Have a nice fortnight
-- 
Martin `MJ' Mareš                        <mj@ucw.cz>   http://mj.ucw.cz/
United Computer Wizards, Prague, Czech Republic, Europe, Earth, Universe
A sine curve goes off to infinity or at least the end of the blackboard.

      reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-13 10:39 return.0
2019-07-13 12:58 ` Martin Mareš [this message]

Reply instructions:

You may reply publically 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=mj+md-20190713.125226.76248.nikam@ucw.cz \
    --to=mj@ucw.cz \
    --cc=linux-pci@vger.kernel.org \
    --cc=return.0@me.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

Linux-PCI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-pci/0 linux-pci/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-pci linux-pci/ https://lore.kernel.org/linux-pci \
		linux-pci@vger.kernel.org linux-pci@archiver.kernel.org
	public-inbox-index linux-pci


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-pci


AGPL code for this site: git clone https://public-inbox.org/ public-inbox