> > For me struct dp_netdev_pmd_thread is *the* the PMD thread context in > dpif-netdev. I don't really see the benefit of creating a sub-struct > dp_netdev_pmd_thread_ctx and moving certain data into that. Can you > explain your motivation? > > Hello Jan, > > IMHO all other fields in struct dp_netdev_pmd_thread has direct relation > with the > thread itself (like core_id, need_reload) or they are it's direct accessories > (like mutexes, stats, caches, lists of polled ports). From the other hand, > time and > last_cycles has no actual relation with thread and can be moved out of > struct > dp_netdev_pmd_thread wihtout any logical issues. These fields are > characteristics > of the outside environment. For example, 'emc_insert_min' which I'm > introducing in > the next patch is actually the characteristics of the last received packet > (maybe port) > but not the thread itself. >
I see your point. But I am afraid that such classification will continue to be fairly subjective and there is little technical or readability gain, if any, by doing this. Or are we going to pass/copy/zero the entire sub-struct outside the context of the pmd struct at some point? Perhaps it would be enough to group these fields in struct dp_netdev_pmd_thread and head the section with a comment? BR, Jan _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
