[spp] Port ID incrementation is changed from DPDK18.02

Yasufumi Ogawa ogawa.yasufumi at lab.ntt.co.jp
Thu Mar 1 10:28:40 CET 2018


Hi all,

Before DPDK 18.02 is fixed, behaviour of rte_eth_dev_get_port_by_name() 
in lib/librte_ether/rte_ethdev.c is changed by this commit.
 > 5b7ba3114 ethdev: add port ownership

This update is a desirable change to fix a problem for synchronization 
of port management. However, this function assigns unexpected port_id 
for SPP.

Previsouly, add command of secondary expected to be assigned port_id 
incrementally and independent among each of other secondary processes. 
For instance, adding ring 0 for sec 1 and 2 results like as

spp > sec 1;status
recv:8:{Client ID 1 Idling
clinet_id:1
port_id:0,on,PHY,outport:none
port_id:1,on,PHY,outport:none
port_id:2,on,RING(0),outport:none
}
spp > sec 2;status
recv:9:{Client ID 2 Idling
clinet_id:2
port_id:0,on,PHY,outport:none
port_id:1,on,PHY,outport:none
port_id:2,on,RING(0),outport:none
}

Both of secondary has port_id:2 for ring 0. However, it is different by 
using DPDK 18.02.

spp > sec 1;status
recv:8:{Client ID 1 Idling
clinet_id:1
port_id:0,on,PHY,outport:none
port_id:1,on,PHY,outport:none
port_id:4,on,RING(0),outport:none
}
spp > sec 2;status
recv:9:{Client ID 2 Idling
clinet_id:2
port_id:0,on,PHY,outport:none
port_id:1,on,PHY,outport:none
port_id:5,on,RING(0),outport:none
}

port_id are different, 4 and 5. It is not a serious problem, but would 
be annoying for users. I would like to fix it.

Luckly, we can patch ports without not port IDs and instead of resource 
IDs by recent update. So, I will change port assignment to not to use 
port ID by removing port_id from status.

Here is an updated message example.

spp > sec 1;status
recv:8:{Client ID 1 Idling
clinet_id:1
PHY(0),outport:none
PHY(1),outport:none
RING(0),outport:none
}

Patching ports with resource IDs is done by

spp > patch phy:0 ring:0

Thanks,
Yasufumi

-- 
Yasufumi Ogawa
NTT Network Service Systems Labs



More information about the spp mailing list