From patchwork Fri Jun 29 13:54:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafal Kozik X-Patchwork-Id: 41969 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1AD301B4DD; Fri, 29 Jun 2018 15:54:18 +0200 (CEST) Received: from mail-lf0-f66.google.com (mail-lf0-f66.google.com [209.85.215.66]) by dpdk.org (Postfix) with ESMTP id 2D2711B4BA for ; Fri, 29 Jun 2018 15:54:14 +0200 (CEST) Received: by mail-lf0-f66.google.com with SMTP id m12-v6so6298393lfc.10 for ; Fri, 29 Jun 2018 06:54:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bb0WXuTybfPE5wmSh4PlFqB0LfNZw9JYypanDyzqf/o=; b=lkMyXEYtSsLQCwMjwqeGjVgRY4CerMYHjDfRISjRG5IDJjl02ONfeb6QvEG3DOzmkp fLcvZiLLCoOFjZmINxWVNjUpdLtBoAfYn7hkpJDpIIPaipRGllTWEG5sCpmy4CTqpSQr V+Ev2QDFLWzPVMpCy4dNlxygad5bRMZdsJj6dqEnUk2UAROLrisIwXEzS6PALF6VTsqo x09u8gBuhOFAwOX+7vvzzCYF2l3/p7skRJwch57Ew+/ju9uHUtzrNy1C0PG/gdNZFJXz mHF3nR3eQOPk0XC3jYwtD94fnP1LIC5ij066lI2ZTSVE24rRIg71BkxmbnQfFBbhU0So 7KuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bb0WXuTybfPE5wmSh4PlFqB0LfNZw9JYypanDyzqf/o=; b=qMkrCUF+L3dbQsueh9cy5jdCNe4XjY2cEPT2D0C8FoKmjIhxV950IJEba9b5EbvktW J67Cm5A/Cum2QPS78Z9+553zzVqqm7o+yHVsWFaFt4LpRrPhW9765l15h00QkvOFTfV5 cI0XB5UBYV9Kwd15lP4aFgBenwOvRzhrMFlEOUJR2loKrp7J/BzgrTjaKEGj+//YZBkd 8jwuZhnnyD0bmSYskNIhB3YMnMu47bCmLXbrGOIM+jXF9+GFZtndd0mdYo8trtsPZn4v HSjZevEJVoEdeJHkhJYOIVKMbmxwPkggiVeiTN/BaLG4k2Yovf/j5fZ8WNMGK/MJ1SGe lrcA== X-Gm-Message-State: APt69E3UNR+wmJRo05b+oXr4LO92MN1glxEZ/slBS8j9+gzNsStgdcIO R6khH89E+X4JO3r4voNyYU4PdCnucHZiPg== X-Google-Smtp-Source: AAOMgpcfQggiy2r5WdQrpQgMZQ6AU03fAFXvcr0N0hxh1vazbm7ek5XhtrrWwVhOREnzAUjOiKBdhw== X-Received: by 2002:a19:4e06:: with SMTP id c6-v6mr10384821lfb.30.1530280453631; Fri, 29 Jun 2018 06:54:13 -0700 (PDT) Received: from rafalkozik.semihalf.local (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id v136-v6sm114122lfa.10.2018.06.29.06.54.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Jun 2018 06:54:12 -0700 (PDT) From: Rafal Kozik To: dev@dpdk.org Cc: mw@semihalf.com, mk@semihalf.com, gtzalik@amazon.com, evgenys@amazon.com, matua@amazon.com, igorch@amazon.com, thomas@monjalon.net, ferruh.yigit@intel.com, Kozik Date: Fri, 29 Jun 2018 15:54:05 +0200 Message-Id: <1530280448-12920-2-git-send-email-rk@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530280448-12920-1-git-send-email-rk@semihalf.com> References: <1530267873-7236-2-git-send-email-rk@semihalf.com> <1530280448-12920-1-git-send-email-rk@semihalf.com> Subject: [dpdk-dev] [PATCH v5 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Acked-by: Ferruh Yigit --- kernel/linux/igb_uio/igb_uio.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/kernel/linux/igb_uio/igb_uio.c b/kernel/linux/igb_uio/igb_uio.c index b3233f1..3398eac 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,13 @@ 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; + } info->mem[n].name = name; info->mem[n].addr = addr; info->mem[n].internal_addr = internal_addr; @@ -626,6 +631,9 @@ igbuio_pci_init_module(void) return -EINVAL; } + if (wc_activate != 0) + pr_info("wc_activate is set\n"); + ret = igbuio_config_intr_mode(intr_mode); if (ret < 0) return ret; @@ -650,6 +658,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"); From patchwork Fri Jun 29 13:54:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafal Kozik X-Patchwork-Id: 41970 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7F7991B4E2; Fri, 29 Jun 2018 15:54:19 +0200 (CEST) Received: from mail-lf0-f68.google.com (mail-lf0-f68.google.com [209.85.215.68]) by dpdk.org (Postfix) with ESMTP id 120B71B4D1 for ; Fri, 29 Jun 2018 15:54:16 +0200 (CEST) Received: by mail-lf0-f68.google.com with SMTP id i15-v6so6863005lfc.2 for ; Fri, 29 Jun 2018 06:54:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=K2dHxLVizsecchLPAUNv+n6dRKmElQ/u1z1COViFIVA=; b=nhJW3xkW6ucmrZ1kGG+RWGUAatD65eSlxXFz1Bv2HbmWfmQYAAoffI9cim0AYKwY4k lqN43NLlYC5sc9ntBXbrXzvBZM9jVDcQuHxZAZU7xL/tHQ9tw1Ddesg4iN+5RK9NTC6y +np39VLSigZkBwb5nI1fO2eoUErXQXg0p/4Qg1TNkl40l3eXjBj1tUXv9xeWp52n9pRk lVBw1pR8aT03FG+xRLyH6/MeZ0JTmEXJEBTDk00Jk0N3L/NrWTSygJGadvSPJf67Ppbu M+BZaLBoZbp3Jbuyef/bv43/63eYNHT+iLfx7p75RYo8D1QWaZSwZ62U7tbcgwnRw7oU sTNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=K2dHxLVizsecchLPAUNv+n6dRKmElQ/u1z1COViFIVA=; b=mmdZnQkm63o5VtlXNioQHr0xCtq2x2n+9Iye2e4Jfyb41bHgPUwLMSh0r4TGbv/Wi+ 1+0ev9s6a+QgU2qO2DDDy2FDAb4nTi//VHArqJlUBtJ7Zc4Am6rsCWYmWCMSSgIlcj7Y 6tr4m3qeqRAq1dEcIWWCjOgFM2ufHxaG7MRHRa/y6NlhNYddGMf+VPGgVbYwllddO/JR wY6qpgU3jhc8ssb/1RAVU+VF85FhElo6YSd544bTXboi63T/hymxxwBBRn/2FOkWmr1I ZAaykBpLKdnoXCZ46JO6s4m9egHp88zBg3VZurWdON+IYUY4lFtggu4GdGZVOdIbt7kP 0HGg== X-Gm-Message-State: APt69E09UqxpZyh+ImMMe7ckeaFVnRLonPqOzoX3utl1gIIsW2jwozY/ R9EbE9nfBKq9h5j4g3wy2Qi/3rc1sKJuwg== X-Google-Smtp-Source: AAOMgpe0llPvBuAthWD7ybmDawiDSEf5M7MVottVqZN/HEzjxx+PWC7Nyi81DHEeP7dw/ggUZXVqJQ== X-Received: by 2002:a19:53cc:: with SMTP id h73-v6mr9707096lfl.110.1530280455545; Fri, 29 Jun 2018 06:54:15 -0700 (PDT) Received: from rafalkozik.semihalf.local (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id v136-v6sm114122lfa.10.2018.06.29.06.54.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Jun 2018 06:54:14 -0700 (PDT) From: Rafal Kozik To: dev@dpdk.org Cc: mw@semihalf.com, mk@semihalf.com, gtzalik@amazon.com, evgenys@amazon.com, matua@amazon.com, igorch@amazon.com, thomas@monjalon.net, ferruh.yigit@intel.com, Kozik Date: Fri, 29 Jun 2018 15:54:06 +0200 Message-Id: <1530280448-12920-3-git-send-email-rk@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530280448-12920-1-git-send-email-rk@semihalf.com> References: <1530267873-7236-2-git-send-email-rk@semihalf.com> <1530280448-12920-1-git-send-email-rk@semihalf.com> Subject: [dpdk-dev] [PATCH v5 2/4] bus/pci: reference driver structure 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Kozik Add pointer to driver structure before calling rte_pci_map_device. It allows to use driver flags for adjusting configuration. Signed-off-by: Rafal Kozik Acked-by: Bruce Richardson --- drivers/bus/pci/pci_common.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c index d8151b0..8f5d77f 100644 --- a/drivers/bus/pci/pci_common.c +++ b/drivers/bus/pci/pci_common.c @@ -158,17 +158,24 @@ rte_pci_probe_one_driver(struct rte_pci_driver *dr, RTE_LOG(INFO, EAL, " probe driver: %x:%x %s\n", dev->id.vendor_id, dev->id.device_id, dr->driver.name); + /* + * reference driver structure + * This need to be before rte_pci_map_device(), as it enable to use + * driver flags for adjusting configuration. + */ + dev->driver = dr; + dev->device.driver = &dr->driver; + if (dr->drv_flags & RTE_PCI_DRV_NEED_MAPPING) { /* map resources for devices that use igb_uio */ ret = rte_pci_map_device(dev); - if (ret != 0) + if (ret != 0) { + dev->driver = NULL; + dev->device.driver = NULL; return ret; + } } - /* reference driver structure */ - dev->driver = dr; - dev->device.driver = &dr->driver; - /* call the driver probe() function */ ret = dr->probe(dr, dev); if (ret) { From patchwork Fri Jun 29 13:54:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafal Kozik X-Patchwork-Id: 41971 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 56E951B4F0; Fri, 29 Jun 2018 15:54:21 +0200 (CEST) Received: from mail-lf0-f65.google.com (mail-lf0-f65.google.com [209.85.215.65]) by dpdk.org (Postfix) with ESMTP id 11C061B4A4 for ; Fri, 29 Jun 2018 15:54:18 +0200 (CEST) Received: by mail-lf0-f65.google.com with SMTP id m13-v6so6848538lfb.12 for ; Fri, 29 Jun 2018 06:54:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bCyk0WZ4THRNJ/IBJn0I/XHc1heLtjSlv0e9RSFQ5H0=; b=m0FU+4Tard0CexGQRZiHYlLpUoyfMOsHY2s+u7qqtIueC1Nqgus0Tt3KGZMtLe/zhk BZ0LLKHjlVmfOk7dqqiRXUO6nIEttQk50cjq1j1l8PjXqjcWk7U8/aMjny3j7/1nbLR6 Naz6bWmc7ntpvuMPKMMZ55+Gca+DMXe8Jmq37lBUGWddLkKvf25PRP817KE/cavkPaeF znvBUK31bgL8EXvDbdAM2tL6P+3/9fJM0IdWbNf4l+ZNoXUMThTfE9gg2BVkUBEAhnDK PTB22bNt19iFTe+yWQJ4w8C9mdwSb9UQ8TUvnuW2s9zWKIDvSiRvtrZ6noImX/eP9iqg z9FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bCyk0WZ4THRNJ/IBJn0I/XHc1heLtjSlv0e9RSFQ5H0=; b=jLfaOx51ZD7EhZzcObcbXCvTP75tsP0W73qsYNVQwYYcJkHdvVbY9DlUbBHJ8YKCzy 1cyQs4yRD+imDfyjhAqPLiM/o5/HJfimG+L8cSuJH/oh8CGIqItbl/oAzEjUrtQxxoX1 FmfW3GGg86EJsl8nbN0zTo4LE/D61R6fsfW4cNTCsVEXrWRjFY7bXfAYzenyT8BToPhR v3e96279aou8rDFSJrKusbtzeI6YEAbO1HbtjMljCW8F5KiZHEx9DGzl+VTXcEfjkZ26 lFceFHUxoHcSIF/VOIimbpA79JuER2/alkJoib0v+AIL0UqFxgd0j13zElI7FkZTrjYV C90A== X-Gm-Message-State: APt69E3CLcv8dhgEEt1P8bFFp+RBW9n/52qxtx0tf+wDeGAHC/HpqMIp FrCa2fjqcOQfxfBzJWJSgOs7+7ar4+TJZA== X-Google-Smtp-Source: AAOMgpfuLHoW7z88ZRdA8GvGa/iPl6S+jGzwrdbjtmHj8KlA3dmgXpgV2OTKotrGt61svrQPisCmzA== X-Received: by 2002:a19:e1cc:: with SMTP id l73-v6mr9608022lfk.102.1530280457471; Fri, 29 Jun 2018 06:54:17 -0700 (PDT) Received: from rafalkozik.semihalf.local (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id v136-v6sm114122lfa.10.2018.06.29.06.54.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Jun 2018 06:54:16 -0700 (PDT) From: Rafal Kozik To: dev@dpdk.org Cc: mw@semihalf.com, mk@semihalf.com, gtzalik@amazon.com, evgenys@amazon.com, matua@amazon.com, igorch@amazon.com, thomas@monjalon.net, ferruh.yigit@intel.com, Kozik Date: Fri, 29 Jun 2018 15:54:07 +0200 Message-Id: <1530280448-12920-4-git-send-email-rk@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530280448-12920-1-git-send-email-rk@semihalf.com> References: <1530267873-7236-2-git-send-email-rk@semihalf.com> <1530280448-12920-1-git-send-email-rk@semihalf.com> Subject: [dpdk-dev] [PATCH v5 3/4] eal: enable WC during resources mapping 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Kozik Write combining (WC) increases NIC performance by making better utilization of PCI bus, but cannot be used by all PMDs. It will be enabled only if RTE_PCI_DRV_WC_ACTIVATE will be set in drivers flags. For proper work also igb_uio driver must be loaded with wc_activate set to 1. When mapping PCI resources, firstly check if it support WC and then try to us it. In case of failure, it will fallback to normal mode. Signed-off-by: Rafal Kozik Acked-by: Bruce Richardson --- drivers/bus/pci/linux/pci_uio.c | 47 ++++++++++++++++++++++++++++++----------- drivers/bus/pci/rte_bus_pci.h | 2 ++ 2 files changed, 37 insertions(+), 12 deletions(-) diff --git a/drivers/bus/pci/linux/pci_uio.c b/drivers/bus/pci/linux/pci_uio.c index d423e4b..a7c1442 100644 --- a/drivers/bus/pci/linux/pci_uio.c +++ b/drivers/bus/pci/linux/pci_uio.c @@ -282,22 +282,19 @@ int pci_uio_map_resource_by_index(struct rte_pci_device *dev, int res_idx, struct mapped_pci_resource *uio_res, int map_idx) { - int fd; + int fd = -1; char devname[PATH_MAX]; void *mapaddr; struct rte_pci_addr *loc; struct pci_map *maps; + int wc_activate = 0; + + if (dev->driver != NULL) + wc_activate = dev->driver->drv_flags & RTE_PCI_DRV_WC_ACTIVATE; loc = &dev->addr; maps = uio_res->maps; - /* update devname for mmap */ - snprintf(devname, sizeof(devname), - "%s/" PCI_PRI_FMT "/resource%d", - rte_pci_get_sysfs_path(), - loc->domain, loc->bus, loc->devid, - loc->function, res_idx); - /* allocate memory to keep path */ maps[map_idx].path = rte_malloc(NULL, strlen(devname) + 1, 0); if (maps[map_idx].path == NULL) { @@ -309,11 +306,37 @@ pci_uio_map_resource_by_index(struct rte_pci_device *dev, int res_idx, /* * open resource file, to mmap it */ - fd = open(devname, O_RDWR); - if (fd < 0) { - RTE_LOG(ERR, EAL, "Cannot open %s: %s\n", + if (wc_activate) { + /* update devname for mmap */ + snprintf(devname, sizeof(devname), + "%s/" PCI_PRI_FMT "/resource%d_wc", + rte_pci_get_sysfs_path(), + loc->domain, loc->bus, loc->devid, + loc->function, res_idx); + + if (access(devname, R_OK|W_OK) != -1) { + fd = open(devname, O_RDWR); + if (fd < 0) + RTE_LOG(INFO, EAL, "%s cannot be mapped. " + "Fall-back to non prefetchable mode.\n", + devname); + } + } + + if (!wc_activate || fd < 0) { + snprintf(devname, sizeof(devname), + "%s/" PCI_PRI_FMT "/resource%d", + rte_pci_get_sysfs_path(), + loc->domain, loc->bus, loc->devid, + loc->function, res_idx); + + /* then try to map resource file */ + fd = open(devname, O_RDWR); + if (fd < 0) { + RTE_LOG(ERR, EAL, "Cannot open %s: %s\n", devname, strerror(errno)); - goto error; + goto error; + } } /* try mapping somewhere close to the end of hugepages */ diff --git a/drivers/bus/pci/rte_bus_pci.h b/drivers/bus/pci/rte_bus_pci.h index 458e6d0..828acc5 100644 --- a/drivers/bus/pci/rte_bus_pci.h +++ b/drivers/bus/pci/rte_bus_pci.h @@ -135,6 +135,8 @@ struct rte_pci_bus { /** Device needs PCI BAR mapping (done with either IGB_UIO or VFIO) */ #define RTE_PCI_DRV_NEED_MAPPING 0x0001 +/** Device needs PCI BAR mapping with enabled write combining (wc) */ +#define RTE_PCI_DRV_WC_ACTIVATE 0x0002 /** Device driver supports link state interrupt */ #define RTE_PCI_DRV_INTR_LSC 0x0008 /** Device driver supports device removal interrupt */ From patchwork Fri Jun 29 13:54:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafal Kozik X-Patchwork-Id: 41972 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 167A01B4FE; Fri, 29 Jun 2018 15:54:26 +0200 (CEST) Received: from mail-lf0-f68.google.com (mail-lf0-f68.google.com [209.85.215.68]) by dpdk.org (Postfix) with ESMTP id E432A1B4E9 for ; Fri, 29 Jun 2018 15:54:19 +0200 (CEST) Received: by mail-lf0-f68.google.com with SMTP id y127-v6so6854363lfc.8 for ; Fri, 29 Jun 2018 06:54:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AwNrRX1Landx1JIqow4Cyk+bUOdJqBZtnQCgn5pVDtM=; b=w2DsJL5731Qr7XMfJn3A72u3rF/u81X8mw2acjyT714tLnD2PedIfivjSpF96cMwk7 HDybz/tmK+NGIVMFA7ZO1QkWSmtJWAt2LYNSGP+05gifGu6YZCnjCKbY5RtE6APMrSvZ f0cYj7c/4+xyjUmK8R9ytzqOhSA/sEcjrCoUWOvXHi/+xIgAXJuq0SjvVDU+0dTPjjss V/oriuPb+mNDUJiHeS5TrISpc/LkLc0sMqNL74cmmWubp4nkXT7Zns4lCX36Yy7XAWhB cWFjTE03AZQh9zx7q92rW3O3FvKxQ0CIbC/rmrszB8RtBMBU1phQwBugOyHcJTOeviTS sTtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=AwNrRX1Landx1JIqow4Cyk+bUOdJqBZtnQCgn5pVDtM=; b=NSFFskFx/SvVYFiA3UEE6pd7l6JLzZV5bKYj5E+aKVZpoj2OiSTAxsQqAUa05bjVHR nNENiB/oMQOnz0dL8kqFW0ZcGsqZfcWBfmfWjS2AUJvWhAmkexX2J7aARrJQ9RveIdLv +nL9OCjn5F+otc3pyanMnj6EpfIk+s6vfRQy9MrL76Z0N9qYa4xLi4ksTr289XdasBiC 2MupkRaHBcqd0RXQWfAYRRQw8S/ILz+pwFsaBd4ZGKvJWKj7KkUySAiSdt9dedM4Ih/3 ciAqby4eHj0B6sVpEmbTaUoiI82aYMKIi+UVqrdTYwRiPDXGbn6V/01d6x5swb0t50d0 8mZw== X-Gm-Message-State: APt69E1A9zOATHs+oWUZjjLN30jl+H2jP3WKfzn+J01tdi/fGjdtx0d9 1Mdc8qFc6KFxVe8dUr1HAgWMVyEQGMjJXg== X-Google-Smtp-Source: AAOMgpdwH/Rf7Ch2n/XvGWEQbkrJ1a2YXXmmCpPmtX2K507gb0emnPxFTimB/Q2QxvgJmiG7k2iI6w== X-Received: by 2002:a19:120d:: with SMTP id h13-v6mr10304600lfi.13.1530280459423; Fri, 29 Jun 2018 06:54:19 -0700 (PDT) Received: from rafalkozik.semihalf.local (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id v136-v6sm114122lfa.10.2018.06.29.06.54.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Jun 2018 06:54:18 -0700 (PDT) From: Rafal Kozik To: dev@dpdk.org Cc: mw@semihalf.com, mk@semihalf.com, gtzalik@amazon.com, evgenys@amazon.com, matua@amazon.com, igorch@amazon.com, thomas@monjalon.net, ferruh.yigit@intel.com, Kozik Date: Fri, 29 Jun 2018 15:54:08 +0200 Message-Id: <1530280448-12920-5-git-send-email-rk@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530280448-12920-1-git-send-email-rk@semihalf.com> References: <1530267873-7236-2-git-send-email-rk@semihalf.com> <1530280448-12920-1-git-send-email-rk@semihalf.com> Subject: [dpdk-dev] [PATCH v5 4/4] net/ena: enable WC 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Kozik Write combining (WC) increases NIC performance by making better utilization of PCI bus. ENA PMD may make usage of this feature. To enable it load igb_uio driver with wc_activate set to 1. Signed-off-by: Rafal Kozik Acked-by: Bruce Richardson --- drivers/net/ena/ena_ethdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index 9ae73e3..1870edf 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -2210,7 +2210,8 @@ static int eth_ena_pci_remove(struct rte_pci_device *pci_dev) static struct rte_pci_driver rte_ena_pmd = { .id_table = pci_id_ena_map, - .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC, + .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC | + RTE_PCI_DRV_WC_ACTIVATE, .probe = eth_ena_pci_probe, .remove = eth_ena_pci_remove, };