From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f66.google.com (mail-lf0-f66.google.com [209.85.215.66]) by dpdk.org (Postfix) with ESMTP id 198957CDC for ; Fri, 29 Jun 2018 15:11:57 +0200 (CEST) Received: by mail-lf0-f66.google.com with SMTP id j26-v6so6762541lfb.11 for ; Fri, 29 Jun 2018 06:11:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=J6i/Kdb8w1I0QAVGcZsNOZubwqLEKwbL8JM/bHJJWls=; b=dxYbMNaEvoHgiPymK9D4jh6UCpVgEArmMDpgZ7Ahl+ppE7YzVBGQ1zb6NKiLLr9eRj G5BuE94ekqpJmDHz+labGJSe8WWrmuEZ7NDQHZSvxK0INXFEbsO4gPlXvOAf6A/RZZXY Amuk4QBavPeB+hFFlFj8l1ZRThZI2QoMRzu1HsnrvglhtV9btn9otYtiLuRL44ylv7gf iiW8jEE4PrK3+o9hbFY6Ji5j1+JvkNAk8OhDmRaCe5jr44j7nuNb5k26P60VRJh2pneA 7Yu8GMym6PEd/j9Z03e3d16WuaW6WneyD9V4fH+8Q4TzHbIbeXZs5YvUtP6hEwv1j0+w GRPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=J6i/Kdb8w1I0QAVGcZsNOZubwqLEKwbL8JM/bHJJWls=; b=Z4rLp/UYnircrFxLU0ETN7gpXTg0WU773IDxRQ2pSek9RxLEKeZsv4WU/1obWwZih7 pzBRk+Bw6U7hezEDlAVWb8tFulAqDtqEnrrf/rfMYlRcdv/LnZ+R79UwIKIrvLtDFz3t U1YSQA3Rle3ASiGTrwsGU/0LQDb7vt9HPN40nGqhfmf/aUNcNXvkcIyD2mtpvAXgv+IX dvyW+SaLuviFm1pDIaTjApzZtqzRjLS2H6IkqG5lIeDxszI+y1P9HjaGSRjGntBTatpY zrA4EOJ3K7RzbxnIlugG6RxvxvCiUT/AgE8U5Rwj3+g6QTDK92fXqD5VF/tQpM/z3LGD 7NqQ== X-Gm-Message-State: APt69E3PvTDIDTBjXLhgqpPkRVBDi4u+ZZLDe3YwbPc+pihvZmw59KPh wrdoL4qmkSwm388c3CKKi3Sh8P+0uwZ6XiTdwJwRmXI7EP8Ibw== X-Google-Smtp-Source: AAOMgpfIt1dRJX5KZtwHsv8/MDMxkMkeOmALZbLP0o0zBayV7qPw4hjzd7DPNdvdQHw7aSUuNj8LgMn2iG9Hoeu0hfA= X-Received: by 2002:a19:b24e:: with SMTP id b75-v6mr10282641lff.11.1530277916481; Fri, 29 Jun 2018 06:11:56 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:4a95:0:0:0:0:0 with HTTP; Fri, 29 Jun 2018 06:11:55 -0700 (PDT) In-Reply-To: <1530274637-10156-2-git-send-email-rk@semihalf.com> References: <1530267873-7236-2-git-send-email-rk@semihalf.com> <1530274637-10156-1-git-send-email-rk@semihalf.com> <1530274637-10156-2-git-send-email-rk@semihalf.com> From: =?UTF-8?B?UmFmYcWCIEtvemlr?= Date: Fri, 29 Jun 2018 15:11:55 +0200 Message-ID: To: dev@dpdk.org Cc: Marcin Wojtas , =?UTF-8?Q?Micha=C5=82_Krawczyk?= , "Tzalik, Guy" , "Schmeilin, Evgeny" , "Matushevsky, Alexander" , "Chauskin, Igor" , Thomas Monjalon , Ferruh Yigit , Kozik Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v4 1/4] igb_uio: add wc option X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jun 2018 13:11:57 -0000 > How can I confirm this silently fall-back behavior, is there any log can I turn > on in kernel or anything from proc/sysfs? I cannot find any. I check it by measuring write speed. 2018-06-29 14:17 GMT+02:00 Rafal Kozik : > From: Kozik > > Write combining (WC) increases NIC performance by making better > utilization of PCI bus, but cannot be use by all PMD. > > To get internal_addr memory need to be mapped. But as memory could not be > mapped twice: with and without WC it should be skipped for WC. [1] > > To do not spoil other drivers that potentially could use internal_addr, > parameter wc_activate adds possibility to skip it for those PMDs, > that do not use it. > > [1] https://www.kernel.org/doc/ols/2008/ols2008v2-pages-135-144.pdf > section 5.3 and 5.4 > > Signed-off-by: Rafal Kozik > Acked-by: Bruce Richardson > --- > kernel/linux/igb_uio/igb_uio.c | 18 +++++++++++++++--- > 1 file changed, 15 insertions(+), 3 deletions(-) > > diff --git a/kernel/linux/igb_uio/igb_uio.c b/kernel/linux/igb_uio/igb_uio.c > index b3233f1..e16e760 100644 > --- a/kernel/linux/igb_uio/igb_uio.c > +++ b/kernel/linux/igb_uio/igb_uio.c > @@ -30,6 +30,7 @@ struct rte_uio_pci_dev { > int refcnt; > }; > > +static int wc_activate; > static char *intr_mode; > static enum rte_intr_mode igbuio_intr_mode_preferred = RTE_INTR_MODE_MSIX; > /* sriov sysfs */ > @@ -375,9 +376,14 @@ igbuio_pci_setup_iomem(struct pci_dev *dev, struct uio_info *info, > len = pci_resource_len(dev, pci_bar); > if (addr == 0 || len == 0) > return -1; > - internal_addr = ioremap(addr, len); > - if (internal_addr == NULL) > - return -1; > + if (wc_activate == 0) { > + internal_addr = ioremap(addr, len); > + if (internal_addr == NULL) > + return -1; > + } else { > + internal_addr = NULL; > + pr_info("wc_activate is set\n"); > + } > info->mem[n].name = name; > info->mem[n].addr = addr; > info->mem[n].internal_addr = internal_addr; > @@ -650,6 +656,12 @@ MODULE_PARM_DESC(intr_mode, > " " RTE_INTR_MODE_LEGACY_NAME " Use Legacy interrupt\n" > "\n"); > > +module_param(wc_activate, int, 0); > +MODULE_PARM_DESC(wc_activate, > +"Activate support for write combining (WC) (default=0)\n" > +" 0 - disable\n" > +" other - enable\n"); > + > MODULE_DESCRIPTION("UIO driver for Intel IGB PCI cards"); > MODULE_LICENSE("GPL"); > MODULE_AUTHOR("Intel Corporation"); > -- > 2.7.4 >