> On 12 Mar 2020, at 10:30, Lijian Zhang <lijian.zh...@arm.com> wrote:
> 
> Hi Damjan,
> We observed a failure when creating avf interfaces on two types of Arm CPUs, 
> both are SMP system, only one numa-id.
>  
> Function vlib_pci_get_device_info() reads ‘/sys/bus/pci/devices/<devices 
> id>/numa_node’ to check which numa_node a NIC device resides in.
> But on SMP system, -1 is returned as below example, and then later VPP uses 
> -1 to access some arrays which causes memory out-of-bound issue.
>  
> It seems that -1 is returned where the kernel doesn’t have NUMA node 
> information, and the kernel ABI documents -1 as a valid return value here:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/ABI/testing/sysfs-bus-pci#n285
>  
> Is it ok to just set di->numa_node to 0, if ‘/sys/bus/pci/devices/<devices 
> id>/numa_node’ returns -1 and there is only one numa node by checking 
> ‘/sys/devices/system/node/online’?

sounds good to me. Please submit patch.

>   if (-1 == di->numa_node

please change to:

if (di->numa_node == -1)

— 
Damjan




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#15744): https://lists.fd.io/g/vpp-dev/message/15744
Mute This Topic: https://lists.fd.io/mt/71898582/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to