From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id D42D91BBAF for ; Wed, 11 Apr 2018 16:07:36 +0200 (CEST) Received: by mail-wm0-f65.google.com with SMTP id t67so4526905wmt.0 for ; Wed, 11 Apr 2018 07:07:36 -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=toieLkKuX6jcwuTRGBAFeEuyV2XlmaraZ8MnHopaqwk=; b=dwSCId3KLE2Fp06y/GUvczbU/79RsOvWZc/a1XIMtozUZvZQZCAntrntBZnPZXbY8D g+hJATptqYh9zNWcU8F9IQXTqEQp5sGLHzQMOxKEWiV68NcTNLdv18WiqrNkET1DhO+X AKzMHAZFBOYL4NtzFKzTQ3Z+iPihI7IEHjAjHBsdHop42R2fCN4wXvyObXW/UVmcuC0t n8/0q3wdAq1bzgycnAjrj69P9h4G+JoW2Mg1RjkAHhWvkwn+2kUBVtHiYFQoaZEL1036 UfjznLx1tFjiMMUiTGyY6bgzTF4pM8z+zI0pZtYGsKAOdUJIaIxkC76SSxvAZSmtKx/+ gX0g== 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=toieLkKuX6jcwuTRGBAFeEuyV2XlmaraZ8MnHopaqwk=; b=poPkpWzKTf/YGp2U4Mqr8cIpOqnO0rmahTUjsWONX3zYIsWwzyo2KdVHqRRMUZSm+y Kib0Hk4tPEEj1mHAWtb927MAU761Hr4w5oKjhaIXTgby/YhGrbnD3h8hlwnYZZAmnIc0 3ZShAGCYYeD/jsNy2MhHRqolS/u7YHQYs/WFps0EkQgcNiCr97KSujuYbCcNbi30lOgV 7tXncb0e2hP8I5x499AmVxBvIHzDA/mmIOpAWPo1eWGPmFDHuxRFtVymphh4ZEKr6Nuw j32INFYo4NcX0CRZIkNQfxOmY5bM91PHjVCTaastwKHikNdEKLuH2C57TJ8nujygNEPK 18Ow== X-Gm-Message-State: ALQs6tBXgKZ29vUDrmjx6XV+LJFZ4hKnO5UJcTzDcBvUb9jNnmAZr5wO H04agzU64EWPvhASvi6nByEuRawIUaiEFg== X-Google-Smtp-Source: AIpwx4/qhrroB6uFLxYBE+IDyJ1m9KULlUWi11obsJZ/Fa6sIqRKa4csni3AzhrfyRubZxzNjwlFHw== X-Received: by 10.28.145.139 with SMTP id t133mr2623272wmd.138.1523455656354; Wed, 11 Apr 2018 07:07:36 -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 6sm1607761wmf.31.2018.04.11.07.07.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 Apr 2018 07:07:35 -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, ferruh.yigit@intel.com, Rafal Kozik Date: Wed, 11 Apr 2018 16:07:14 +0200 Message-Id: <1523455637-31719-2-git-send-email-rk@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523455637-31719-1-git-send-email-rk@semihalf.com> References: <1523455637-31719-1-git-send-email-rk@semihalf.com> Subject: [dpdk-dev] [PATCH 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: Wed, 11 Apr 2018 14:07:37 -0000 Write combining (wc) increase NIC performance by making better utilization of PCI bus, but cannot be use by all PMD. Parameter wc_activate add possibility to enable it for those PMD that could support it. Signed-off-by: Rafal Kozik --- 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 4cae4dd..42e3b3f 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; @@ -638,6 +643,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