slave:
On 10/20/2015 15:41, Stuart Haslam wrote:
+ /* recv() rings */
>+ pktio_entry->s.ipc.recv.r = pktio_entry->s.ipc.m.prod;
>+ pktio_entry->s.ipc.recv.r_p = pktio_entry->s.ipc.m.cons;
>+ /* tx() rings */
>+ pktio_entry->s.ipc.tx.r = pktio_entry->s.ipc.s.prod;
>+ pktio_entry->s.ipc.tx.r_p = pktio_entry->s.ipc.s.cons;
>+
This isn't exactly what I had in mind, can't you just use these names
directly in the first place in the code above? Is there any reason to
retain two copies of the pointers?
master:
+ /* recv() rings */
+ pktio_entry->s.ipc.recv.r = pktio_entry->s.ipc.s.prod;
+ pktio_entry->s.ipc.recv.r_p = pktio_entry->s.ipc.s.cons;
+ /* tx() rings */
+ pktio_entry->s.ipc.tx.r = pktio_entry->s.ipc.m.prod;
+ pktio_entry->s.ipc.tx.r_p = pktio_entry->s.ipc.m.cons;
+
They are crossed. Instead of implementing 2 function slave_recv()
master_recv()
I add added one and this links.
But I can rename rings something like:
pktio_entry->s.ipc.local.prod
pktio_entry->s.ipc.local.cons
pktio_entry->s.ipc.remote.prod
pktio_entry->s.ipc.remote.cons
local - will reflect local pool/ring mappings;
remote - for remote process poll/ring mappings;
Maxim.
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp