Hi, gnrc_netreg_register() registers a thread in the registry "netreg" indicating (i) the packet type (protocol) and (ii) an additional de-multiplex context [1] (for example a UDP port) it wants to receive.
An additional RTT by the factor three seems extremely huge to me. Did you measure this between boards under the same conditions, multiple times? However, I guess a certain overhead is introduced by the dispatch mechanism. Please have a more detailed look at the implementation of gnrc_netapi_dispatch() [2]. Best Peter [1] https://riot-os.org/api/group__net__gnrc__netreg.html#ga1a6359efa13b3bfed70af55deacde7ae [2] https://github.com/RIOT-OS/RIOT/blob/master/sys/net/gnrc/netapi/gnrc_netapi.c#L94 Am 01.11.18 um 23:27 schrieb Navneet Pandey: > Hello, > > > > What is the difference between the following ways of subscribing to > receive a UDP Packet. > > > > /* initialize and register pktdump to print received packets */ > > gnrc_netreg_entry_t server = GNRC_NETREG_ENTRY_INIT_PID(8888, > sched_active_pid); > > gnrc_netreg_register(GNRC_NETTYPE_UDP, &server); > > > > vs > > > > /* initialize and register pktdump to print received packets */ > > gnrc_netreg_entry_t server = > GNRC_NETREG_ENTRY_INIT_PID(GNRC_NETREG_DEMUX_CTX_ALL, > > sched_active_pid); > > gnrc_netreg_register(GNRC_NETTYPE_UDP, &server); > > > > I was curious because, the value of ‘Round Trip Time’ triples If I use > the 2nd way (bottom one). > > > > Thank you > > > > Regards, > > Navneet Pandey > > > > > _______________________________________________ > users mailing list > [email protected] > https://lists.riot-os.org/mailman/listinfo/users > -- Peter Kietzmann Hamburg University of Applied Sciences Dept. Informatik, Internet Technologies Group Berliner Tor 7, 20099 Hamburg, Germany Fon: +49-40-42875-8426 Web: http://www.haw-hamburg.de/inet _______________________________________________ users mailing list [email protected] https://lists.riot-os.org/mailman/listinfo/users
