[dpdk-dev,v2,1/5] eal: Set numa node value for system which not support NUMA.

Message ID 1483617709-7088-1-git-send-email-nic@opencloud.tech (mailing list archive)
State Changes Requested, archived
Delegated to: Thomas Monjalon
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel compilation success Compilation OK

Commit Message

nickcooper-zhangtonghao Jan. 5, 2017, 12:01 p.m. UTC
  The NUMA node information for PCI devices provided through
sysfs is invalid for AMD Opteron(TM) Processor 62xx and 63xx
on Red Hat Enterprise Linux 6, and VMs on some hypervisors.

Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech>
---
 lib/librte_eal/linuxapp/eal/eal_pci.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
  

Comments

Ferruh Yigit Jan. 5, 2017, 2:23 p.m. UTC | #1
On 1/5/2017 12:01 PM, nickcooper-zhangtonghao wrote:
> The NUMA node information for PCI devices provided through
> sysfs is invalid for AMD Opteron(TM) Processor 62xx and 63xx
> on Red Hat Enterprise Linux 6, and VMs on some hypervisors.
> 
> Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech>

Hi nickcooper-zhangtonghao,

The patches in the patchset are individual patches, right? Is there any
dependency between them?

And CC'ed vmxnet3 driver maintainer: Yong Wang <yongwang@vmware.com>

Thanks,
ferruh

> ---
>  lib/librte_eal/linuxapp/eal/eal_pci.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c
> index 4350134..5dfdbe9 100644
> --- a/lib/librte_eal/linuxapp/eal/eal_pci.c
> +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c
> @@ -317,7 +317,13 @@
>  			free(dev);
>  			return -1;
>  		}
> -		dev->device.numa_node = tmp;
> +		/* The NUMA node information for PCI devices provided through
> +		 * sysfs is invalid for AMD Opteron(TM) Processor 62xx and 63xx
> +		 * on Red Hat Enterprise Linux 6, and VMs on some hypervisors.
> +		 * In the upstream linux kernel, the numa_node is an integer,
> +		 * which data type is int, not unsigned long.
> +		 */
> +		dev->device.numa_node = (int)tmp > 0 ? (int)tmp : 0;
>  	}
>  
>  	/* parse resources */
>
  
Stephen Hemminger Jan. 5, 2017, 4:17 p.m. UTC | #2
On Thu,  5 Jan 2017 04:01:45 -0800
nickcooper-zhangtonghao <nic@opencloud.tech> wrote:

> The NUMA node information for PCI devices provided through
> sysfs is invalid for AMD Opteron(TM) Processor 62xx and 63xx
> on Red Hat Enterprise Linux 6, and VMs on some hypervisors.
> 
> Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech>

That name seems a bit unusual. Is that your legal name or a partnership?

The Signed-off-by line has legal significance and it is important that
you use your legal name. Please use the name you would use when
signing a legal document (like buying a house or renting).
  
Yong Wang Jan. 6, 2017, 12:01 a.m. UTC | #3
> -----Original Message-----
> From: Ferruh Yigit [mailto:ferruh.yigit@intel.com]
> Sent: Thursday, January 5, 2017 6:24 AM
> To: nickcooper-zhangtonghao <nic@opencloud.tech>; dev@dpdk.org; Yong
> Wang <yongwang@vmware.com>
> Subject: Re: [dpdk-dev] [PATCH v2 1/5] eal: Set numa node value for system
> which not support NUMA.
> 
> On 1/5/2017 12:01 PM, nickcooper-zhangtonghao wrote:
> > The NUMA node information for PCI devices provided through
> > sysfs is invalid for AMD Opteron(TM) Processor 62xx and 63xx
> > on Red Hat Enterprise Linux 6, and VMs on some hypervisors.
> >
> > Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech>
> 
> Hi nickcooper-zhangtonghao,
> 
> The patches in the patchset are individual patches, right? Is there any
> dependency between them?
> 
> And CC'ed vmxnet3 driver maintainer: Yong Wang <yongwang@vmware.com>

Can you add the exact steps to reproduce the vmxnet3 issues to help the review and the verification. My guess is that you have stopped the device, changed some ring parameters (to something larger than the previous settings) and restarted the device. Such info should be included into the commit description in addition to just saying what the patch does.

> Thanks,
> ferruh
> 
> > ---
> >  lib/librte_eal/linuxapp/eal/eal_pci.c | 8 +++++++-
> >  1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c
> b/lib/librte_eal/linuxapp/eal/eal_pci.c
> > index 4350134..5dfdbe9 100644
> > --- a/lib/librte_eal/linuxapp/eal/eal_pci.c
> > +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c
> > @@ -317,7 +317,13 @@
> >  			free(dev);
> >  			return -1;
> >  		}
> > -		dev->device.numa_node = tmp;
> > +		/* The NUMA node information for PCI devices provided
> through
> > +		 * sysfs is invalid for AMD Opteron(TM) Processor 62xx and
> 63xx
> > +		 * on Red Hat Enterprise Linux 6, and VMs on some
> hypervisors.
> > +		 * In the upstream linux kernel, the numa_node is an integer,
> > +		 * which data type is int, not unsigned long.
> > +		 */
> > +		dev->device.numa_node = (int)tmp > 0 ? (int)tmp : 0;
> >  	}
> >
> >  	/* parse resources */
> >
  
nickcooper-zhangtonghao Jan. 9, 2017, 2:06 a.m. UTC | #4
> On Jan 6, 2017, at 8:01 AM, Yong Wang <yongwang@vmware.com> wrote:
> 
> Can you add the exact steps to reproduce the vmxnet3 issues to help the review and the verification. My guess is that you have stopped the device, changed some ring parameters (to something larger than the previous settings) and restarted the device.


Thanks for your reply. Your guess is right. I run the openvswitch+dpdk with vmxnet3. 
First,I set the nb_desc of rx queue to 2048, and then stop the device, change nb_desc to 4096.
When I start the device again, I get the openvswitch crash caused by dpdk. Writing a sample program based on dpdk, I also get a crash.
The e1000 dpdk driver allocates RX ring for max possible mumber of hardware descriptors. I guess vmxnet3 should be in the same case.
I will submit v3.

Thanks.
  
nickcooper-zhangtonghao Jan. 9, 2017, 2:20 a.m. UTC | #5
I submitted the patches for first time. 
The first one is an individual patch for eal, others is for vmxnet3 interdependently.


Thanks.
Nick

> On Jan 5, 2017, at 10:23 PM, Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> 
> Hi nickcooper-zhangtonghao,
> 
> The patches in the patchset are individual patches, right? Is there any
> dependency between them?
> 
> And CC'ed vmxnet3 driver maintainer: Yong Wang <yongwang@vmware.com <mailto:yongwang@vmware.com>>
> 
> Thanks,
> ferruh
  

Patch

diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c
index 4350134..5dfdbe9 100644
--- a/lib/librte_eal/linuxapp/eal/eal_pci.c
+++ b/lib/librte_eal/linuxapp/eal/eal_pci.c
@@ -317,7 +317,13 @@ 
 			free(dev);
 			return -1;
 		}
-		dev->device.numa_node = tmp;
+		/* The NUMA node information for PCI devices provided through
+		 * sysfs is invalid for AMD Opteron(TM) Processor 62xx and 63xx
+		 * on Red Hat Enterprise Linux 6, and VMs on some hypervisors.
+		 * In the upstream linux kernel, the numa_node is an integer,
+		 * which data type is int, not unsigned long.
+		 */
+		dev->device.numa_node = (int)tmp > 0 ? (int)tmp : 0;
 	}
 
 	/* parse resources */