From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B94F542C5C; Thu, 8 Jun 2023 13:32:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 45D8D406B5; Thu, 8 Jun 2023 13:32:40 +0200 (CEST) Received: from mail-vk1-f182.google.com (mail-vk1-f182.google.com [209.85.221.182]) by mails.dpdk.org (Postfix) with ESMTP id 8688F40042 for ; Thu, 8 Jun 2023 13:32:38 +0200 (CEST) Received: by mail-vk1-f182.google.com with SMTP id 71dfb90a1353d-463e368a74cso145419e0c.0 for ; Thu, 08 Jun 2023 04:32:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686223958; x=1688815958; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ZQuY3WAARvT+JlXFcNsWAg66rkLpj3Ta1isWi9IvAko=; b=R32J7/ez3t9MThNpWgaDw1KnEb1rzH6RGTweZuTCGslh3/s9tux6zsvUqI5dqQKzQf Lo7CLt6A/qALn/7VLpZLAIdl9tVkeVNRFfOqKIkHejjJ1yK/AuvbTzpRtaUhMxvISdLh v76FwCnGoZhsY6nyUa7MGWp0BMC3qhSZuX52Ja2hil9oIXUItSPYeR6d3a7PaL0ZeFAK 4mi6QVN5GaZ4KfhiRaVBRamKUw9svgyXb7AOQO/QOoPrann+IlRjnPF6m3enjYOLoIHj pAkYU1eXm8SFIWPqRd9ln4q7ZqPfjpxuu/1I5BTPXW8sHAa7HftVkV8y6KmrlNNpptR4 SpKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686223958; x=1688815958; 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=ZQuY3WAARvT+JlXFcNsWAg66rkLpj3Ta1isWi9IvAko=; b=X2RJlZ+ZHuL3om7uPx6EaCMOWrw8IuJoAZvDUi7zrIhq2v1VE6bgT7H0zsE/ietvvV 68LJx8Q0vSd5VvT1gxOwtnD7uSXgKUHih/tRKDXWH764/zjl+u95sTYQ7fOaKd3K+P/q T3wSt0kcgy2KvULF2/J3cxUx5sSAOgSXoTuumWKnJcwRUy/EPONSy9D9LXcNMBWKMe2U RkKgIcWHxDioeuDB0cLeUI1U33EJ/4VM1EVGrwr35A4g2GbHbYo48snYLSNd9MQGjRs2 tz4ir5omzZc3KTLFsckUrwTOJZt0b4CdukMu2OjaZvW50Cw4QaT86zBQdtY+07+GOuxV UgcA== X-Gm-Message-State: AC+VfDxEb3GAQnxv4DWopLghC/zx64kJGm3N4l99G8rZmjV6LXx55OlH BuHh1zbBsK7RN40sp0ST5Ea/ZWb0pJt7+yveRPc= X-Google-Smtp-Source: ACHHUZ71T/NUwpBgYIsaA8hFgb8czWv8vJDD8CM8XaWgW2cgX1KRxKaCN6eC/jwUjiqL/KB0c1pLHnC1PJbdeyTYeSY= X-Received: by 2002:a1f:60c2:0:b0:463:fa22:b835 with SMTP id u185-20020a1f60c2000000b00463fa22b835mr3173055vkb.8.1686223957695; Thu, 08 Jun 2023 04:32:37 -0700 (PDT) MIME-Version: 1.0 References: <20230607210050.107944-1-abdullah.sevincer@intel.com> In-Reply-To: From: Jerin Jacob Date: Thu, 8 Jun 2023 17:02:11 +0530 Message-ID: Subject: Re: [PATCH v1] event/dlb2: add support for disabling PASID To: David Marchand Cc: Abdullah Sevincer , Gaetan Rivet , Thomas Monjalon , dev@dpdk.org, jerinj@marvell.com, mike.ximing.chen@intel.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Thu, Jun 8, 2023 at 12:59=E2=80=AFPM David Marchand wrote: > > On Thu, Jun 8, 2023 at 7:38=E2=80=AFAM Jerin Jacob wrote: > > > > On Thu, Jun 8, 2023 at 2:31=E2=80=AFAM Abdullah Sevincer > > wrote: > > > > > > vfio-pci driver in Linux kernel 6.2 enables PASID by default. > > > In DLB hardware, enabling PASID puts DLB in SIOV mode. This > > > breaks DLB PF-PMD mode. For DLB PF-PMD mode to function properly > > > PASID needs to be disabled for kernel 6.2. > > > > > > In this commit this issue is addressed and PASID is disabled > > > by writing a zero to PASID control register. > > > > > > Signed-off-by: Abdullah Sevincer > > > > > + /* The current Linux kernel vfio driver does not expose PASID= capability to > > > + * users. It also enables PASID by default, which breaks DLB = PF PMD. We have > > > + * to use the hardcoded offset for now to disable PASID. > > > + */ > > > + pasid_cap_offset =3D DLB2_PCI_PASID_CAP_OFFSET; > > > + > > > + off =3D pasid_cap_offset + DLB2_PCI_PASID_CTRL; > > > > +++ additional folks. > > > > Is make sense to move this helper function to PCI common for disabling > > PASID for a PCI device so that other driver can use if needed > > as the implementation is not specific to DLB2. > > Yes, having a helper sounds like a first step (and we probably have > more helpers to add seeing how drivers tend to redefine non vendor > specific pci configs, but that's another story). @Abdullah Sevincer Please move the implementation to code PCI code. > > Now, about PASID being enabled by default with Linux 6.2, is this > breaking of dlb PF something special? Or can we expect many (all?) > other devices to break too? > If so, maybe we should disable it in the pci common code. @Abdullah Sevincer Is implicitly enabling SIOV based on PASID configuration DLB2 behavior or general PCI behavior that may affect other NIC's? > > > -- > David Marchand >