DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: "Sevincer, Abdullah" <abdullah.sevincer@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	 "jerinj@marvell.com" <jerinj@marvell.com>,
	"Chen, Mike Ximing" <mike.ximing.chen@intel.com>,
	 "stable@dpdk.org" <stable@dpdk.org>,
	David Marchand <david.marchand@redhat.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	"Xia, Chenbo" <chenbo.xia@intel.com>,
	nipun.gupta@amd.com
Subject: Re: [PATCH v3] event/dlb2: fix disable PASID for kernel 6.2
Date: Wed, 1 Nov 2023 10:21:50 +0530	[thread overview]
Message-ID: <CALBAE1Mm+q9K8ftJKPpSST5danLF7m_XPFOdn89Re06B-PAQjw@mail.gmail.com> (raw)
In-Reply-To: <ZUFnJqux75Sqf1SD@bricha3-MOBL.ger.corp.intel.com>

On Wed, Nov 1, 2023 at 2:14 AM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Wed, Nov 01, 2023 at 12:12:02AM +0530, Jerin Jacob wrote:
> > On Tue, Oct 31, 2023 at 10:45 PM Bruce Richardson
> > <bruce.richardson@intel.com> wrote:
> > >
> > > On Tue, Oct 31, 2023 at 10:36:04PM +0530, Jerin Jacob wrote:
> > > > On Tue, Oct 31, 2023 at 8:43 PM Sevincer, Abdullah
> > > > <abdullah.sevincer@intel.com> wrote:
> > > > >
> > > > >
> > > > > > +This patch can be splited as two, +1) Generic PCIe function to
> > > > > > enable/disable PASID +2) Call generic function to disable PASID
> > > > > > in drivers/event/dlb2/. Also mention which Linux kernel commit is
> > > > > > introducing this issue in the git commit log.
> > > > >
> > > > > Hi Jerrin, I think I need to provide more information here, then we
> > > > > can decide which way we will go would be good for now. I agree to
> > > > > having 2 functions in pci common code to enable/disable PASID, but
> > > > > we need to have hardcoded PASID cap offset inside these functions
> > > > > as well since PASID capability is not exposed to user. Hence, to be
> > > > > more specific main reason to have hardcoded PASID is,
> > > > > rte_pci_find_ext_capability() function to retrieve the offset
> > > > > returns '0' since PASID is not exposed to user yet.
> > > > >
> > > > > We can see this is vfio_pci_config.c in kernel code where PASID is
> > > > > not exposed to user.  [PCI_EXT_CAP_ID_PASID]  =       0,      /*
> > > > > not yet */
> > > > >
> > > > > So if it is okay to go with hardcoded offset now in these functions
> > > > > I will move the implementation to pci_common file.
> > > >
> > > > I would suggest, add argument option to API whether to probe the
> > > > capability or not? - 0 means probe and- non zero means specific PASID
> > > > cap offset till Linux VFIO is exposing it.
> > >
> > > That doesn't seem particularly useful to me. The calling-API in the
> > > DPDK PMD (assuming it's PMD who use this), is no more likely to know
> > > whether probing will work. Therefore, I think we just hard-code the
> > > offset for now.
> >
> > I think, there are three things here 1) Whether to have common API for
> > dealing with generic function like enabling PASID or not? - I think, we
> > are in agreement to have common public function(Implementation could be
> > hard-coded or probe) 2) Since it is public PCIe API, I thought of adding
> > probing in API as it is just LINUX limitation now. No strong opinion on
> > inclusion of probe in on this as Linux is main EAL which supports PCIe
> > now.  3) Since it is PCIe capability, In my understanding the offset will
> > change based on the number of capabilities available in PCIe config space
> > for a given device. _if so_, an additional argument for the offset needs
> > to be passed from PMD to common PCI API(I.e it can not be hard-coded in
> > common PCI code)
> >
>
> Given these constraints and how late we are in the release cycle, I
> therefore suggest we take the driver-specific bug fix for now. DLB seems
> the only driver affected right now (and I can confirm the issue having
> encountered it myself when running DPDK on Ubuntu 23.04).
>
> I think a general function is a good thing to have, but it seems that such
> a general function should wait until we really can make it generic in the
> future.

+ PCIe maintainers.

I will leave this up to @David Marchand  / @Thomas as this patch has
common code changes and needs to come via main tree.

Also in this case, The comment was given very early(Back in June 7)
for the same.
https://patches.dpdk.org/project/dpdk/patch/20230607210050.107944-1-abdullah.sevincer@intel.com/

>
> Just my 2c. at this point.
>
> /Bruce

  reply	other threads:[~2023-11-01  4:52 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-07 21:00 [PATCH v1] event/dlb2: add support for disabling PASID Abdullah Sevincer
2023-06-08  5:38 ` Jerin Jacob
2023-06-08  7:22   ` Thomas Monjalon
2023-06-08  7:28   ` David Marchand
2023-06-08 11:32     ` Jerin Jacob
2023-06-08 14:25       ` Chen, Mike Ximing
2023-08-03  7:56     ` David Marchand
2023-08-03 16:57       ` Sevincer, Abdullah
2023-10-26 16:46         ` Sevincer, Abdullah
2023-10-26 16:38 ` [PATCH v2] event/dlb2: disable PASID for kernel 6.2 Abdullah Sevincer
2023-10-30 21:12 ` [PATCH v3] event/dlb2: fix " Abdullah Sevincer
2023-10-31  8:21   ` Jerin Jacob
2023-10-31 15:13     ` Sevincer, Abdullah
2023-10-31 17:06       ` Jerin Jacob
2023-10-31 17:15         ` Bruce Richardson
2023-10-31 18:42           ` Jerin Jacob
2023-10-31 20:44             ` Bruce Richardson
2023-11-01  4:51               ` Jerin Jacob [this message]
2023-11-01 19:05                 ` Sevincer, Abdullah
2023-11-02 10:23                   ` Bruce Richardson
2023-11-02 10:48                     ` Thomas Monjalon
2023-11-02 18:17                       ` Sevincer, Abdullah
2023-10-31  0:10 ` [PATCH v1] event/dlb2: add support for disabling PASID Stephen Hemminger

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=CALBAE1Mm+q9K8ftJKPpSST5danLF7m_XPFOdn89Re06B-PAQjw@mail.gmail.com \
    --to=jerinjacobk@gmail.com \
    --cc=abdullah.sevincer@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=chenbo.xia@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=mike.ximing.chen@intel.com \
    --cc=nipun.gupta@amd.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /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).