From: Yijing Wang <wangyijing@huawei.com>
To: Alex Williamson <alex.williamson@redhat.com>,
Keith Busch <keith.busch@intel.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>, <linux-pci@vger.kernel.org>,
<Jordan_Hargrave@Dell.com>, <jon.mason@intel.com>,
Jon Mason <jdmason@kudzu.us>
Subject: Re: [PATCH] PCI: update device mps when doing pci hotplug
Date: Wed, 30 Jul 2014 11:35:59 +0800 [thread overview]
Message-ID: <53D8681F.6060904@huawei.com> (raw)
In-Reply-To: <1406652178.1011.191.camel@ul30vt.home>
On 2014/7/30 0:42, Alex Williamson wrote:
> On Tue, 2014-07-29 at 10:30 -0600, Keith Busch wrote:
>> On Tue, 29 Jul 2014, Alex Williamson wrote:
>>> On Tue, 2014-07-29 at 16:17 +0800, Yijing Wang wrote:
>>>> Currently we don't update device's mps value when doing
>>>> pci device hot-add. The hot-added device's mps will be set
>>>> to default value (128B). But the upstream port device's mps
>>>> may be larger than 128B which was set by firmware during
>>>> system bootup. In this case the new added device may not
>>>> work normally.
>>>
>>> Apologies if we rehash some previously discussed topics while I try to
>>> cover for Bjorn while he's out. By "normally", do you mean "optimally"?
>>> The device should be functional with a lower mps setting, right?
>>
>> You'd think so, but some platforms don't work. A pci-e trace showed
>> TLPs exceeding MPS when parent device at 256B and the end device left
>> at 128B. Even if that's a platform bug, I think we still want it to work.
>
> But if it's a platform bug for a non-compliant device, should it be
> handled as a quirk rather than standard configuration? Thanks,
This is not a platform bug, in PCIe 3.0 spec 7.8.4, page 618, it said
Software can control this to achieve some purposes.
IMPLEMENTATION NOTE
Use of Max_Payload_Size
The Max_Payload_Size mechanism allows software to control the maximum payload in packets sent
by Endpoints to balance latency versus bandwidth trade-offs, particularly for isochronous traffic.
If software chooses to program the Max_Payload_Size of various System Elements to non-default
values, it must take care to ensure that each packet does not exceed the Max_Payload_Size
parameter of any System Element along the packet's path. Otherwise, the packet will be rejected by 20
the System Element whose Max_Payload_Size parameter is too small.
Discussion of specific algorithms used to configure Max_Payload_Size to meet this requirement is
beyond the scope of this specification, but software should base its algorithm upon factors such as
the following:
the Max_Payload_Size capability of each System Element within a hierarchy 25
awareness of when System Elements are added or removed through Hot-Plug operations
knowing which System Elements send packets to each other, what type of traffic is carried, what
type of transactions are used, or if packet sizes are constrained by other mechanisms
For the case of firmware that configures System Elements in preparation for running legacy
operating system environments, the firmware may need to avoid programming a Max_Payload_Size
above the default of 128 bytes, which is the minimum supported by Endpoints.
For example, if the operating system environment does not comprehend PCI Express, firmware
probably should not program a non-default Max_Payload_Size for a hierarchy that supports Hot- 5
Plug operations. Otherwise, if no software is present to manage Max_Payload_Size settings when a
new element is added, improper operation may result. Note that a newly added element may not
even support a Max_Payload_Size setting as large as the rest of the hierarchy, in which case software
may need to deny enabling the new element or reduce the Max_Payload_Size settings of other
elements.
>
> Alex
>
>
>
> .
>
--
Thanks!
Yijing
next prev parent reply other threads:[~2014-07-30 3:38 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-29 8:17 [PATCH] PCI: update device mps when doing pci hotplug Yijing Wang
2014-07-29 16:18 ` Alex Williamson
2014-07-29 16:30 ` Keith Busch
2014-07-29 16:42 ` Alex Williamson
2014-07-29 19:04 ` Keith Busch
2014-07-30 3:35 ` Yijing Wang [this message]
2014-07-30 3:27 ` Yijing Wang
2014-07-30 3:33 ` Ethan Zhao
2014-07-30 3:42 ` Yijing Wang
2014-07-30 3:58 ` Ethan Zhao
2014-07-30 4:42 ` Yijing Wang
2014-07-30 6:26 ` Ethan Zhao
2014-07-30 6:57 ` Yijing Wang
2014-07-30 7:17 ` Ethan Zhao
2014-07-30 8:13 ` Yijing Wang
2014-07-30 8:38 ` Ethan Zhao
2014-07-30 9:17 ` Yijing Wang
2014-07-30 19:41 ` Jordan_Hargrave
2014-09-03 19:20 ` Bjorn Helgaas
2014-09-03 22:42 ` Bjorn Helgaas
2014-09-04 6:12 ` Yijing Wang
2014-09-04 13:16 ` Bjorn Helgaas
2014-09-05 1:27 ` Yijing Wang
2014-09-05 14:37 ` Keith Busch
2014-09-24 22:41 ` Keith Busch
2014-09-24 23:30 ` Bjorn Helgaas
2014-09-25 1:23 ` Yijing Wang
2014-09-25 16:46 ` Keith Busch
2014-09-26 3:22 ` Yijing Wang
2014-10-02 15:31 ` Jordan_Hargrave
-- strict thread matches above, loose matches on Subject: below --
2014-07-29 8:23 Yijing Wang
2013-02-05 3:55 Yijing Wang
2013-05-28 3:15 ` Yijing Wang
2013-07-29 23:33 ` Bjorn Helgaas
2013-07-30 3:20 ` Yijing Wang
2013-07-30 3:42 ` Bjorn Helgaas
2013-07-30 22:29 ` Bjorn Helgaas
2013-07-31 9:15 ` Yijing Wang
2013-07-31 17:53 ` Bjorn Helgaas
2013-07-31 20:42 ` Bjorn Helgaas
2013-08-01 1:23 ` Yijing Wang
2013-08-01 1:21 ` Yijing Wang
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=53D8681F.6060904@huawei.com \
--to=wangyijing@huawei.com \
--cc=Jordan_Hargrave@Dell.com \
--cc=alex.williamson@redhat.com \
--cc=bhelgaas@google.com \
--cc=jdmason@kudzu.us \
--cc=jon.mason@intel.com \
--cc=keith.busch@intel.com \
--cc=linux-pci@vger.kernel.org \
/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 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.