From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from m15-13.126.com (m15-13.126.com [220.181.15.13]) by dpdk.org (Postfix) with ESMTP id A857E8D36 for ; Thu, 10 Sep 2015 15:54:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=Date:From:Subject:MIME-Version:Message-ID; bh=60+el mpdv1u//tLZIRS2aZGTCR2g+LVvbtwi/UMSIRk=; b=DUV/t5Vvi3UlI86tNrClY QZInlfcngne+gzkJJWY2Ji0gQ2LKp+g9rTJQ4SWAkk9cJYPxZHLi8ssf/oqMI08R Msph947rwm3yon0r1zF0zwrFh/d/CmeiZgCL6b9cCHRAjwM7lxgQTnjEvmWpZmpZ 1ZMfuqM6/GKn82ns3r/FNo= Received: from zhangwqh$126.com ( [161.253.119.97, 54.215.2.217, 10.144.1.72] ) by ajax-webmail-wmsvr13 (Coremail) ; Thu, 10 Sep 2015 21:54:26 +0800 (CST) X-Originating-IP: [161.253.119.97, 54.215.2.217, 10.144.1.72] Date: Thu, 10 Sep 2015 21:54:26 +0800 (CST) From: =?GBK?B?1cXOsA==?= To: dev@dpdk.org X-Priority: 3 X-Mailer: Coremail Webmail Server Version SP_ntes V3.5 build 20150828(73956.7811) Copyright (c) 2002-2015 www.mailtech.cn 126com X-CM-CTRLDATA: QIh5oGZvb3Rlcl9odG09MjM1Nzo1Ng== MIME-Version: 1.0 Message-ID: <278d006e.109ef.14fb78933fa.Coremail.zhangwqh@126.com> X-CM-TRANSID: DcqowAB3hieTi_FVhFYnAA--.3213W X-CM-SenderInfo: x2kd0wxztkqiyswou0bp/1tbiHRNx6VUwzR6+igAAsU X-Coremail-Antispam: 1U5529EdanIXcx71UUUUU7vcSsGvfC2KfnxnUU== Content-Type: text/plain; charset=GBK Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] dpdk 1.8.0 disable burst problem X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Sep 2015 13:54:34 -0000 SGkgYWxsLCAKCgpJIGFtIHVzaW5nIHRoZSBkcGRrIGV4YW1wbGUgZHBkay0xLjguMC9leGFtcGxl cy9tdWx0aV9wcm9jZXNzL2NsaWVudF9zZXJ2ZXJfbXAgb24gdWJ1bnR1IDE0LjA0LiAgSSBuZWVk IHRvIGRpc2FibGUgdGhlIGJhdGNoLiBBdCBmaXJzdCwgSSBqdXN0IGNoYW5nZSB0aGUgbWFjcm8g IGluIG1wX3NlcnZlci9tYWluLmMgYW5kIG1wX2NsaWVudC9jbGllbnQuYwojZGVmaW5lIFBBQ0tF VF9SRUFEX1NJWkUgMzIgdG8gMSAKVGhlIHNlcnZlciBhbmQgdGhlIGNsaWVudCBjYW4gbm90IHJl Y2VpdmUgYW55IHBhY2tldHMuICBBbG1vc3Qgb2YgdGhlIHBhY2tldHMgYXJlIGNvdW50ZWQgdG8g ZXJyIGZyb20gdGhlIHBvcnQgc3RhdC4KClBvcnQ6MCwgcng6NTExLCByeF9lcnI6MzMwMTE4ODIs IHJ4X25vbWJ1ZjowLCB0eDowLCB0eF9lcnI6MAoKUG9ydDowLCByeF9yYXRlOjAsIHJ4X2Vycl9y YXRlOjc4MjI1MyxyeF9ub21idWZfcmF0ZTowLCB0eF9yYXRlOjAsIHR4X2Vycl9yYXRlOjAKCkhv d2V2ZXIsIERQREsgMS40LjEgd29ya3Mgb25seSBjaGFuZ2luZyB0aGUgYmF0Y2ggc2l6ZSBmcm9t IDMyIHRvIDEgaW4gc2VydmVyIGFuZCBjbGllbnQuIAoKV2hhdCBJIGRpZCBpbiB0aGUgbmV4dCBz dGVwIGlzIAoKZGlzYWJsZSB0aGUgdmVjdG9yIFBNRCBidXJzdCBvbiBEUERLIDEuOC4wIHZlcnNp b24uIAoKZGlzYWJsZSB0aGUgbWFjcm8gZnJvbSBjb25maWcgZmlsZSAKCkNPTkZJR19SVEVfSVhH QkVfSU5DX1ZFQ1RPUj1uCgpIb3dldmVyLCBub3RoaW5nIGlzIGNoYW5nZWQuIFBvcnQgc3RpbGwg cmVwb3J0cyBwYWNrZXRzIGVycnMuIAoKQ2FuIGFueW9uZSBoZWxwIHRvIGxvb2sgYXQgdGhpcyBw cm9ibGVtPyBJIHdpbGwgYmUgdmVyeSBhcHByZWNpYXRlZC4gCgpCVFcsIHdoeSBEUERLIDEuNC4x IGNhbiBub3QgYmUgY29tcGlsZWQgb24gdWJ1bnR1IDE0LjA0PyA= >From fyigit@ecsmtp.ir.intel.com Thu Sep 10 18:01:40 2015 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id EEB955681 for ; Thu, 10 Sep 2015 18:01:39 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 10 Sep 2015 09:01:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,505,1437462000"; d="scan'208";a="802392891" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga002.fm.intel.com with ESMTP; 10 Sep 2015 09:01:37 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t8AG1aZ3021520; Thu, 10 Sep 2015 17:01:36 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id t8AG1aOK029640; Thu, 10 Sep 2015 17:01:36 +0100 Received: (from fyigit@localhost) by sivswdev02.ir.intel.com with id t8AG1aJi029633; Thu, 10 Sep 2015 17:01:36 +0100 From: Ferruh Yigit To: dev@dpdk.org Date: Thu, 10 Sep 2015 17:01:31 +0100 Message-Id: <1441900891-27736-1-git-send-email-ferruh.yigit@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] igb_uio: remove unnecessary igbuio_get_uio_pci_dev() X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Sep 2015 16:01:40 -0000 Return value of igbuio_get_uio_pci_dev() is already kept in priv variable Signed-off-by: Ferruh Yigit --- lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c index 865a276..87293b8 100644 --- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c +++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c @@ -61,12 +61,6 @@ struct rte_uio_pci_dev { static char *intr_mode = NULL; static enum rte_intr_mode igbuio_intr_mode_preferred = RTE_INTR_MODE_MSIX; -static inline struct rte_uio_pci_dev * -igbuio_get_uio_pci_dev(struct uio_info *info) -{ - return container_of(info, struct rte_uio_pci_dev, info); -} - /* sriov sysfs */ static ssize_t show_max_vfs(struct device *dev, struct device_attribute *attr, @@ -244,7 +238,7 @@ igbuio_msix_mask_irq(struct msi_desc *desc, int32_t state) static int igbuio_pci_irqcontrol(struct uio_info *info, s32 irq_state) { - struct rte_uio_pci_dev *udev = igbuio_get_uio_pci_dev(info); + struct rte_uio_pci_dev *udev = (struct rte_uio_pci_dev *)info->priv; struct pci_dev *pdev = udev->pdev; pci_cfg_access_lock(pdev); @@ -269,7 +263,7 @@ igbuio_pci_irqcontrol(struct uio_info *info, s32 irq_state) static irqreturn_t igbuio_pci_irqhandler(int irq, struct uio_info *info) { - struct rte_uio_pci_dev *udev = igbuio_get_uio_pci_dev(info); + struct rte_uio_pci_dev *udev = (struct rte_uio_pci_dev *)info->priv; /* Legacy mode need to mask in hardware */ if (udev->mode == RTE_INTR_MODE_LEGACY && @@ -564,12 +558,13 @@ static void igbuio_pci_remove(struct pci_dev *dev) { struct uio_info *info = pci_get_drvdata(dev); - struct rte_uio_pci_dev *udev = igbuio_get_uio_pci_dev(info); + struct rte_uio_pci_dev *udev; if (info->priv == NULL) { pr_notice("Not igbuio device\n"); return; } + udev = (struct rte_uio_pci_dev *)info->priv; sysfs_remove_group(&dev->dev.kobj, &dev_attr_grp); uio_unregister_device(info); -- 1.9.3