Commit 82f92fa5 authored by Guobin Zhang's avatar Guobin Zhang Committed by Unsuk Jung
Browse files

Adapt to netlink changes introduced in kernel v3.8



Bug: 13516920

The kernel assigns nt_pid(portid) the process ID to the first netlink socket.
For subsequent netlink socket that the process creates, it assigns value
between 0xFFFFFFFFFFFFEFFF(-4097) and 0x8000000000000000(-2147483648).

pre-v3.8 netlink presents portid in procfs as signed int.
v3.8 changes presentation of portid to unsigned.
This change has no impact for the portid which was assigned the process id.
But in other cases, it causes trouble for Java Integer to decode these values,
because they are larger than the Integer.MAX_VALUE.
To decode these unsigned int values, we have to use Java Long type.

Signed-off-by: default avatarGuobin Zhang <guobin.zhang@intel.com>
Signed-off-by: default avatarJack Ren <jack.ren@intel.com>
Signed-off-by: default avatarBruce Beare <bruce.j.beare@intel.com>

(cherry picked from commit e777c2e4)

Change-Id: If5051369661c3109de80beacfb912bc0ac4e358c
parent 02c2d643
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment