DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yerden Zhumabekov <e_zhumabekov@sts.kz>
To: Thomas Monjalon <thomas.monjalon@6wind.com>,
	Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 00/10] igb_uio related patches
Date: Sun, 20 Jul 2014 14:14:24 +0600	[thread overview]
Message-ID: <53CB7A60.8000202@sts.kz> (raw)
In-Reply-To: <4686312.ASRe2274Vc@xps13>

[-- Attachment #1: Type: text/plain, Size: 775 bytes --]

hi,

Unfortunately the latest 'master' no longer builds on ubuntu 12.04.
Build log attached.
i've also added a patch to fix it. It involves fixing some typos and
reverting pci dev lock/unlock functions from older kernel versions
(maybe I'm not at liberty doing this). Please consider/remark.


19.07.2014 6:16, Thomas Monjalon пишет:
> 2014-07-18 09:14, Stephen Hemminger:
>> Update patches so all are now bisectable, and incorporate comments.
>> Also fix the checkpatch warnings that are fixable.
> I've isolated all MSI additions in the dedicated commit.
>
> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
>
> Applied for version 1.7.1
>
> What are the news about your uio work for kernel.org?
>
> Thanks

-- 
Sincerely,

Yerden Zhumabekov
STS, ACI
Astana, KZ


[-- Attachment #2: build.log --]
[-- Type: text/plain, Size: 3023 bytes --]

================== Installing x86_64-native-linuxapp-gcc
make[5]: Nothing to be done for `depdirs'.
Configuration done
== Build scripts
== Build scripts/testhost
== Build lib
== Build lib/librte_eal
== Build lib/librte_eal/common
== Build lib/librte_eal/linuxapp
== Build lib/librte_eal/linuxapp/igb_uio
  CC [M]  /home/yerden/dpdk/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.o
/home/yerden/dpdk/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.c: In function ‘pci_intx_mask_supported’:
/home/yerden/dpdk/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.c:235:2: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pci_block_user_cfg_access’
/home/yerden/dpdk/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.c:236:23: error: ‘pdev’ undeclared (first use in this function)
/home/yerden/dpdk/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.c:236:23: note: each undeclared identifier is reported only once for each function it appears in
/home/yerden/dpdk/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.c:239:42: error: ‘new’ undeclared (first use in this function)
/home/yerden/dpdk/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.c:249:1: error: no return statement in function returning non-void [-Werror=return-type]
/home/yerden/dpdk/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.c: In function ‘pci_check_and_mask_intx’:
/home/yerden/dpdk/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.c:256:28: error: ‘dev’ undeclared (first use in this function)
/home/yerden/dpdk/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.c:265:7: error: ‘state’ undeclared (first use in this function)
/home/yerden/dpdk/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.c: In function ‘igbuio_pci_irqcontrol’:
/home/yerden/dpdk/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.c:338:2: error: implicit declaration of function ‘pci_cfg_access_lock’ [-Werror=implicit-function-declaration]
/home/yerden/dpdk/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.c:351:2: error: implicit declaration of function ‘pci_cfg_access_unlock’ [-Werror=implicit-function-declaration]
cc1: all warnings being treated as errors
make[10]: *** [/home/yerden/dpdk/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.o] Error 1
make[9]: *** [_module_/home/yerden/dpdk/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio] Error 2
make[8]: *** [sub-make] Error 2
make[7]: *** [igb_uio.ko] Error 2
make[6]: *** [igb_uio] Error 2
make[5]: *** [linuxapp] Error 2
make[4]: *** [librte_eal] Error 2
make[3]: *** [lib] Error 2
make[2]: *** [all] Error 2
make[1]: *** [x86_64-native-linuxapp-gcc_install] Error 2
make: *** [install] Error 2

[-- Attachment #3: dpdk-fix-igb_uio.patch --]
[-- Type: text/plain, Size: 3607 bytes --]

diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
index 05cbe8e..c5dbbe2 100644
--- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
+++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
@@ -148,11 +148,11 @@ store_extended_tag(struct device *dev,
 	else
 		return -EINVAL;
 
-	pci_cfg_access_lock(pci_dev);
+	pci_block_user_cfg_access(pci_dev);
 	pci_bus_read_config_dword(pci_dev->bus, pci_dev->devfn,
 					PCI_DEV_CAP_REG, &val);
 	if (!(val & PCI_DEV_CAP_EXT_TAG_MASK)) { /* Not supported */
-		pci_cfg_access_unlock(pci_dev);
+		pci_unblock_user_cfg_access(pci_dev);
 		return -EPERM;
 	}
 
@@ -165,7 +165,7 @@ store_extended_tag(struct device *dev,
 		val &= ~PCI_DEV_CTRL_EXT_TAG_MASK;
 	pci_bus_write_config_dword(pci_dev->bus, pci_dev->devfn,
 					PCI_DEV_CTRL_REG, val);
-	pci_cfg_access_unlock(pci_dev);
+	pci_block_user_cfg_access(pci_dev);
 
 	return count;
 }
@@ -227,25 +227,26 @@ static const struct attribute_group dev_attr_grp = {
 /* Check if INTX works to control irq's.
  * Set's INTX_DISABLE flag and reads it back
  */
-static bool pci_intx_mask_supported(struct pci_dev *dev)
+static bool pci_intx_mask_supported(struct pci_dev *pdev)
 {
 	bool mask_supported = false;
-	uint16_t orig, new
+	uint16_t orig, new;
 
-	pci_block_user_cfg_access(dev);
+	pci_block_user_cfg_access(pdev);
 	pci_read_config_word(pdev, PCI_COMMAND, &orig);
-	pci_write_config_word(dev, PCI_COMMAND,
+	pci_write_config_word(pdev, PCI_COMMAND,
 			      orig ^ PCI_COMMAND_INTX_DISABLE);
-	pci_read_config_word(dev, PCI_COMMAND, &new);
+	pci_read_config_word(pdev, PCI_COMMAND, &new);
 
 	if ((new ^ orig) & ~PCI_COMMAND_INTX_DISABLE) {
-		dev_err(&dev->dev, "Command register changed from "
+		dev_err(&pdev->dev, "Command register changed from "
 			"0x%x to 0x%x: driver or hardware bug?\n", orig, new);
 	} else if ((new ^ orig) & PCI_COMMAND_INTX_DISABLE) {
 		mask_supported = true;
-		pci_write_config_word(dev, PCI_COMMAND, orig);
+		pci_write_config_word(pdev, PCI_COMMAND, orig);
 	}
-	pci_unblock_user_cfg_access(dev);
+	pci_unblock_user_cfg_access(pdev);
+	return mask_supported;
 }
 
 static bool pci_check_and_mask_intx(struct pci_dev *pdev)
@@ -253,7 +254,7 @@ static bool pci_check_and_mask_intx(struct pci_dev *pdev)
 	bool pending;
 	uint32_t status;
 
-	pci_block_user_cfg_access(dev);
+	pci_block_user_cfg_access(pdev);
 	pci_read_config_dword(pdev, PCI_COMMAND, &status);
 
 	/* interrupt is not ours, goes to out */
@@ -262,7 +263,7 @@ static bool pci_check_and_mask_intx(struct pci_dev *pdev)
 		uint16_t old, new;
 
 		old = status;
-		if (state != 0)
+		if (status != 0)
 			new = old & (~PCI_COMMAND_INTX_DISABLE);
 		else
 			new = old | PCI_COMMAND_INTX_DISABLE;
@@ -270,7 +271,7 @@ static bool pci_check_and_mask_intx(struct pci_dev *pdev)
 		if (old != new)
 			pci_write_config_word(pdev, PCI_COMMAND, new);
 	}
-	pci_unblock_user_cfg_access(dev);
+	pci_unblock_user_cfg_access(pdev);
 
 	return pending;
 }
@@ -335,7 +336,7 @@ igbuio_pci_irqcontrol(struct uio_info *info, s32 irq_state)
 	struct rte_uio_pci_dev *udev = igbuio_get_uio_pci_dev(info);
 	struct pci_dev *pdev = udev->pdev;
 
-	pci_cfg_access_lock(pdev);
+	pci_block_user_cfg_access(pdev);
 	if (udev->mode == RTE_INTR_MODE_LEGACY)
 		pci_intx(pdev, !!irq_state);
 	else if (udev->mode == RTE_INTR_MODE_MSI) {
@@ -348,7 +349,7 @@ igbuio_pci_irqcontrol(struct uio_info *info, s32 irq_state)
 		list_for_each_entry(desc, &pdev->msi_list, list)
 			igbuio_msix_mask_irq(desc, irq_state);
 	}
-	pci_cfg_access_unlock(pdev);
+	pci_unblock_user_cfg_access(pdev);
 
 	return 0;
 }

  reply	other threads:[~2014-07-20  8:13 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-18 16:14 Stephen Hemminger
2014-07-18 16:14 ` [dpdk-dev] [PATCH 01/10] igb_uio: use kernel standard log message Stephen Hemminger
2014-07-18 16:14 ` [dpdk-dev] [PATCH 02/10] igb_uio: use standard uio naming Stephen Hemminger
2014-07-18 16:14 ` [dpdk-dev] [PATCH 03/10] igb_uio: dont wrap pci_num_vf function needlessly Stephen Hemminger
2014-07-23  8:20   ` Thomas Monjalon
2014-07-18 16:14 ` [dpdk-dev] [PATCH 04/10] igb_uio: msix cleanups Stephen Hemminger
2014-07-18 16:14 ` [dpdk-dev] [PATCH 05/10] igb_uio: propogate error numbers in probe code Stephen Hemminger
2014-07-18 16:14 ` [dpdk-dev] [PATCH 06/10] igb_uio: make irq mode param read-only Stephen Hemminger
2014-07-18 16:14 ` [dpdk-dev] [PATCH 07/10] igb_uio: fix IRQ mode handling Stephen Hemminger
2014-07-18 16:14 ` [dpdk-dev] [PATCH 08/10] igb_uio: add missing locking to config access Stephen Hemminger
2014-07-18 16:14 ` [dpdk-dev] [PATCH 09/10] igb_uio: allow msi mode Stephen Hemminger
2014-07-18 16:14 ` [dpdk-dev] [PATCH 10/10] igb_uio: fix check patch warnings Stephen Hemminger
2014-07-19  0:16 ` [dpdk-dev] [PATCH 00/10] igb_uio related patches Thomas Monjalon
2014-07-20  8:14   ` Yerden Zhumabekov [this message]
2014-07-21 10:28     ` Thomas Monjalon
2014-07-21 12:03       ` [dpdk-dev] [igb_uio PATCH 0/3] igb_uio: fixed typos and pci lock/unlock calls Yerden Zhumabekov
2014-07-21 12:03         ` [dpdk-dev] [igb_uio PATCH 1/3] igb_uio: fixed typos Yerden Zhumabekov
2014-07-21 12:03         ` [dpdk-dev] [igb_uio PATCH 2/3] igb_uio: pci_config_lock/pci_config_unlock wrappers Yerden Zhumabekov
2014-07-21 20:42           ` Stephen Hemminger
2014-07-21 20:50             ` Thomas Monjalon
2014-07-22 12:57             ` Thomas Monjalon
2014-07-21 12:03         ` [dpdk-dev] [igb_uio PATCH 3/3] igb_uio: renaming pci config lock/unlock functions Yerden Zhumabekov
2014-07-21 19:51         ` [dpdk-dev] [igb_uio PATCH 0/3] igb_uio: fixed typos and pci lock/unlock calls Thomas Monjalon
2014-07-22 13:07         ` Thomas Monjalon
2014-07-24 21:50           ` Thomas Monjalon
2014-07-25 16:51             ` Stephen Hemminger
2014-07-21 15:38       ` [dpdk-dev] [PATCH " Yerden Zhumabekov
2014-07-21 15:38         ` [dpdk-dev] [PATCH 1/3] igb_uio: fixed typos Yerden Zhumabekov
2014-07-21 15:38         ` [dpdk-dev] [PATCH 2/3] igb_uio: pci_config_lock/pci_config_unlock wrappers Yerden Zhumabekov
2014-07-21 15:38         ` [dpdk-dev] [PATCH 3/3] igb_uio: renaming pci config lock/unlock functions Yerden Zhumabekov
2014-07-21 19:54         ` [dpdk-dev] [PATCH 0/3] igb_uio: fixed typos and pci lock/unlock calls Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53CB7A60.8000202@sts.kz \
    --to=e_zhumabekov@sts.kz \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.org \
    --cc=thomas.monjalon@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).