From patchwork Thu Jun 28 13:15:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafal Kozik X-Patchwork-Id: 41842 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 D2C211B1C3; Thu, 28 Jun 2018 15:16:13 +0200 (CEST) Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) by dpdk.org (Postfix) with ESMTP id C84A51B055 for ; Thu, 28 Jun 2018 15:16:11 +0200 (CEST) Received: by mail-lj1-f196.google.com with SMTP id k20-v6so4475288ljk.9 for ; Thu, 28 Jun 2018 06:16:11 -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=+fL6fuPc8F52ludMma2sKMyIvFsnG1EOxbLEAP6gj/k=; b=z2Hei0Q3vP8fdgIScfAnuEHJZLyi3QCcdenRzN3cmjgRbE8VTQAqdE9SwxPz5XZVV4 6KU5mj2soo8pHFEoZxXCX+YStiRzaVNsbjQQRt2DpCp2lwEcab+/xISK00WpiyWbkUqv ETZ7xn96attqGMhWJFnXBWIyNnUFrMXsN3B6YFX/GHkFQ8IsGFQ+g8eNK/sSOU/Uf5C9 jGSB+4kxzvVwgz0fOzazbGwfp7ZiVIjlfDXHvxWIqMUVrZzwvvMs9sqfuY9gC66u3Xp+ ooAamCIf7MW9+2GCbogl3ETL4rmS+4/Z7+/ZpT+Wyo5RXohlhi1NHyivLXA26UotGweq Ab5Q== 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=+fL6fuPc8F52ludMma2sKMyIvFsnG1EOxbLEAP6gj/k=; b=W3o+eigvhygJHh4CltwI1oaBPFX64xD10ZD7PvQIQ+K1BHgsS93NCzQRw/gaBThMEd hbuRWctR8/VsbREbwr9aqAp6hf1Btf8lTaIrYVp0s1XKMubzo9CPILniffBemgTTir/Q r192ggw/w5QSzf6BDBDGB1KExigruqGoeDiJGKXp45Vz54EgCAkFF+M1nhlOJbUAkGsm ++5t6nFKKvGfTYyoe2p/gr7vAIaoW1RjQzqhp71pHK3psTJzVw4bAoCydICwgzufKlK4 ZyWQQ1JeNJaA/jn9AEiEWzPNFJoy+fSM5Y7j/o3lLrHK67oUs972F4ETlp53wRZ2emEL 6ioQ== X-Gm-Message-State: APt69E3eAu8bVfd3FmtfDldTOSmKw9pBwdMOgSm1/G/DNuRKYtx2mlHS WMydjvi7OpdI7cAnr8F1rOmNg2gvpoklKg== X-Google-Smtp-Source: AAOMgpenmwhPwc+IoD8JGccgt/II8KuLVAqVlHkVikToh3yxPcrEBbu0FIRxV3BSGNtn7Ea+BW5H9A== X-Received: by 2002:a2e:8051:: with SMTP id p17-v6mr7086897ljg.22.1530191771122; Thu, 28 Jun 2018 06:16:11 -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 o196-v6sm1303246lfe.95.2018.06.28.06.16.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Jun 2018 06:16:10 -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, Rafal Kozik Date: Thu, 28 Jun 2018 15:15:50 +0200 Message-Id: <1530191753-18689-2-git-send-email-rk@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530191753-18689-1-git-send-email-rk@semihalf.com> References: <1530191753-18689-1-git-send-email-rk@semihalf.com> Subject: [dpdk-dev] [PATCH v2 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" Write combining (WC) increases NIC performance by making better utilization of PCI bus, but cannot be use by all PMDs. 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 | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/kernel/linux/igb_uio/igb_uio.c b/kernel/linux/igb_uio/igb_uio.c index b3233f1..3382fb1 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; @@ -650,6 +655,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 Thu Jun 28 13:15:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafal Kozik X-Patchwork-Id: 41843 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 D243F1B3A1; Thu, 28 Jun 2018 15:16:16 +0200 (CEST) Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) by dpdk.org (Postfix) with ESMTP id A70D21B058 for ; Thu, 28 Jun 2018 15:16:13 +0200 (CEST) Received: by mail-lj1-f194.google.com with SMTP id u6-v6so4467303lju.13 for ; Thu, 28 Jun 2018 06:16:13 -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=TN5gJIpVgEqZSWIgDyeRZCdFoyvFZ+ZFjuJTVlNon6M=; b=sNZ13QrPJYiBS0V3wFex2Sq6JPMDSWpkxaVSHJ0KWuGWVQ2ijl6TF9jj/4ozxc1cY6 ICaDcoLbIuiD/HrMx1RPgscqCOd3q+3HlwGI2msdcUNkMq3WxLiIHOFvwbD7CIS4Wc+5 GRwl70XWxIJ7CPDv1fiQ2H+7ccj7Bi9jk4IQPTVqrOfI7xvBb/zhOm50l8BWxueUDSZt /Rl/Ewvg/LxeiiWk7z/BUrdbcXgC/HFltaBKoLMeao8zH7vlYckH/daRWS43JU0gfHiQ DOXljlXT+aTl5j6LfcB0eBFk72KvTWV84MS6HkhCAlqeDEEqrK52/hlrwCFB73kILspf uZAg== 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=TN5gJIpVgEqZSWIgDyeRZCdFoyvFZ+ZFjuJTVlNon6M=; b=PvsQ6PXrVfAkmYwbjvB+TssFIXfUg1UVDwdkVSDOq5Zp0Xv4FXLdGXxlNnfOBHLvIy VVUh+hX05MlPVuvR2sx7Q+ZC2VpXNeWckqmVK4EPPo2INxzS9m1HZXwG3StVMteJcUBm 3AU3eQ26V+m6IoIxEy3/KYB2ybrLJydUwXVuqHgckkJXliO+deZ/e1cElco78eM1CQBQ GUj90CZfn6bdz+YgrlHpFeXFeZgC5/GYBQRu114Pem6MsSEqLAiAAUfywxcAeeUsKWMd RbSnhWh3rbDw2nt6DUEOBI0NnDQkuuWB4MQomMA2chz1Rp41WFHicNxTUXbfaJ4qX59w E3RA== X-Gm-Message-State: APt69E23YOsrCo4JvZIbdErKHrLLbidTh8vndTatADFwtLwdZ/EMF1x6 SxxANGEusTcM5jzJO5gJ8tplLsmnhTWQBg== X-Google-Smtp-Source: AAOMgpe+25XYU7JMHruOxCGDj/bdB56fGkj2vRoNBHIU+IEUWFf6XlQr/46lXWhrjGqRp8nM1/KWgw== X-Received: by 2002:a2e:1290:: with SMTP id 16-v6mr5049846ljs.94.1530191773009; Thu, 28 Jun 2018 06:16: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 o196-v6sm1303246lfe.95.2018.06.28.06.16.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Jun 2018 06:16: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, Rafal Kozik Date: Thu, 28 Jun 2018 15:15:51 +0200 Message-Id: <1530191753-18689-3-git-send-email-rk@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530191753-18689-1-git-send-email-rk@semihalf.com> References: <1530191753-18689-1-git-send-email-rk@semihalf.com> Subject: [dpdk-dev] [PATCH v2 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" 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 Thu Jun 28 13:15:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafal Kozik X-Patchwork-Id: 41844 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 3D4B71B3A8; Thu, 28 Jun 2018 15:16:19 +0200 (CEST) Received: from mail-lf0-f67.google.com (mail-lf0-f67.google.com [209.85.215.67]) by dpdk.org (Postfix) with ESMTP id 6DDD28DAF for ; Thu, 28 Jun 2018 15:16:15 +0200 (CEST) Received: by mail-lf0-f67.google.com with SMTP id j26-v6so4178659lfb.11 for ; Thu, 28 Jun 2018 06:16:15 -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=kBGocbdujXKlEP/+cvIvqTMZ+v6g682daABO2jktBhE=; b=YG+t7fyPwIOzegi9LRj4sA82ch6A9fqBTSYg8WpOb2RCJvvHY70UoJ3A0S2rR8dYo1 5aPb8VnsQXY1J6ZS8tmJbvFtvpDWMSl86sadusB2im8da+O9f5+FZHIku7LM/7Nht1B3 4L+kyDhfy2LXpenycTgfAPkCFUrs5mJya2Fk61gK3bm6Juq/hN6BbvE8HzzucF+XMlhA gtHTbQ4sV0HypC9utndc6QBMXumgt9MbGIFpRhhYNN55IfMfMCQexyO3b64YYrf9fvj6 ViMzzsCwT5/3y1yI1gzkH7oaF06Dh5tZqnJPsWdKwm8aeVzTwoHpq7nHYh1wWedxtuG3 RJZA== 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=kBGocbdujXKlEP/+cvIvqTMZ+v6g682daABO2jktBhE=; b=JTa9Zv6wWWenS0A3pkjLLi1k1+WLGdUzn58B7L8qEv8KgNmgc5gAXCJm9SfP3vusAb POP077m8Hy3SXV9FhWWvjqwYvZYt7Hx2L3gAI3+9qB4+t1TjDdFLF0wqQq5A+KjwMER+ 6iTyev1CJQyZ/gaplC9o3j4uYLrHFJRCSG77Zsj2mG9rBNHmsaEmWhowNJ22OK+jqjWo m5adO7kdOHPaH6CCT0hDTrrK03LST3hdyzCaJcnNM200Vx9hBCTQbMBlTKX6XBNm5XSf A33nWulASul4B3eWsZQFBP5um4fVXbAfGYnrpYHWfEvKLcFLtBSihXKI5S+m+wOZK9f8 /tBw== X-Gm-Message-State: APt69E2E7DVZp+6z0MqZcKGt4XQGMBnhJRKP1IQkFlmBPMHMMPKyjct2 ugZQ0zouAq3RJZ4/Dl4GncvBS0SQ2MPB+g== X-Google-Smtp-Source: AAOMgpd/Z54njFqZ3DkX+5zJZURWke/UNgAp8tvhjtK/C8ZkB+jnzmwPnaVBSqumC4dahEMRQXCZmA== X-Received: by 2002:a19:e546:: with SMTP id c67-v6mr7309057lfh.135.1530191774880; Thu, 28 Jun 2018 06:16:14 -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 o196-v6sm1303246lfe.95.2018.06.28.06.16.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Jun 2018 06:16:13 -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, Rafal Kozik Date: Thu, 28 Jun 2018 15:15:52 +0200 Message-Id: <1530191753-18689-4-git-send-email-rk@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530191753-18689-1-git-send-email-rk@semihalf.com> References: <1530191753-18689-1-git-send-email-rk@semihalf.com> Subject: [dpdk-dev] [PATCH v2 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" 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 try to us WC. If it is not supported it will fallback to normal mode. Signed-off-by: Rafal Kozik Acked-by: Bruce Richardson --- drivers/bus/pci/linux/pci_uio.c | 41 +++++++++++++++++++++++++++++------------ drivers/bus/pci/rte_bus_pci.h | 2 ++ 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/drivers/bus/pci/linux/pci_uio.c b/drivers/bus/pci/linux/pci_uio.c index d423e4b..e3947c2 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,31 @@ 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); + + fd = open(devname, O_RDWR); + } + + 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 Thu Jun 28 13:15:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafal Kozik X-Patchwork-Id: 41845 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 4EFFD1B3BA; Thu, 28 Jun 2018 15:16:21 +0200 (CEST) Received: from mail-lf0-f67.google.com (mail-lf0-f67.google.com [209.85.215.67]) by dpdk.org (Postfix) with ESMTP id 627961B3A4 for ; Thu, 28 Jun 2018 15:16:17 +0200 (CEST) Received: by mail-lf0-f67.google.com with SMTP id g21-v6so4188976lfb.4 for ; Thu, 28 Jun 2018 06:16:17 -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=f6yWG44YI6g9KqH5tp/Dp20sb4gCLsQaNH2i9MGPUmQ=; b=hLiwKBn4O8M0bfmTe5nmxUreByMOSqkMOFT8KYfGUWR2rPBj+WE8Ms9qLDemUTQLr7 +GLGr/moIsEnRMlJV89rpkCveXI7EFuK0QM0Y7Do5xbkYG4azahyqFfHgxj8GdfZp6ge Hvn/dXX6RE4my1NpR1rPZOCoBYigO26/0owp0J5up5ssZzmL6k5ldZiOIUn0DLEH7K91 18mFLlwx40brkW4NiZP4M7stcb3xwFtTGHBqlausrBbb7jtEE/br3Ji9KmgQKdQ5A+uA guwxpviTD7Fanvppy49ruIo5xgAu7Qo0DG0Eb7pzUYgxel54RtyAOhNqC3f7q3PWUXfl Aa0g== 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=f6yWG44YI6g9KqH5tp/Dp20sb4gCLsQaNH2i9MGPUmQ=; b=l+hxKOZ/o5GVFLYOaT1hh2Yywk3DMJnuPlR9AE0V4hiHyJcgtpc/AmTWKSjZuWF+Pm Nq0FoOzA0Y1VmHZvU+//kvG8u6Nxj6fvQjnSvisafK2ACRd4VZ+2tBFcYesGpTKagX0Y lHi3i7wP/IBgXoJWuuz4Ahoa1mVRhtDynqTYtH+mQ+PvCZQbTDh6xlPebyaA7IC+Sdsu lk42Umr4d973mIghx0eod+17BtJXT8FVZmijaNhMGss0qY73Z3rzMuw7APOQ2ISNPYq0 qaOlN5VkGeu+QsiKNkJ7KV5QR8vNIWRY5RDraWcvhHxtT1lHcbig2onlxiAXIeFojSuW FGYg== X-Gm-Message-State: APt69E305NABshdmE0Zjn3K3sHsxp4OoCEp1qMAUXG0BreJqhrplUj6d e5uH6LdO2CUobrZyvAww5VQF4mmDFWj04w== X-Google-Smtp-Source: AAOMgpd1f8ObnfxRO+G/5Dkhw0/39vV4n/gK/sIQLNQwaYuFlHOMiQEgb4G/D1mNtDUG6NyTPIyF9g== X-Received: by 2002:a19:cf95:: with SMTP id f143-v6mr6823207lfg.101.1530191776868; Thu, 28 Jun 2018 06:16:16 -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 o196-v6sm1303246lfe.95.2018.06.28.06.16.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Jun 2018 06:16:15 -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, Rafal Kozik Date: Thu, 28 Jun 2018 15:15:53 +0200 Message-Id: <1530191753-18689-5-git-send-email-rk@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530191753-18689-1-git-send-email-rk@semihalf.com> References: <1530191753-18689-1-git-send-email-rk@semihalf.com> Subject: [dpdk-dev] [PATCH v2 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" 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 Acked-by: Michal Krawczyk --- 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, };