From: Alexander Lobakin <[email protected]> Date: Thu, 22 Feb 2024 13:53:25 +0100
> From: Alan Brady <[email protected]> > Date: Wed, 21 Feb 2024 12:16:37 -0800 > >> On 2/21/2024 4:15 AM, Alexander Lobakin wrote: >>> From: Alan Brady <[email protected]> >>> Date: Tue, 20 Feb 2024 16:49:40 -0800 >>> >>>> This starts refactoring how virtchnl messages are handled by adding a >>>> transaction manager (idpf_vc_xn_manager). > > [...] > >>> >>> Sorry for not noticing this before, but this struct can be local to >>> idpf_virtchnl.c. >>> >> >> Nice catch, I can definitely move this. I'm also considering though, all >> of these structs I'm adding here are better suited in idpf_virtchnl.c >> all together. I think the main thing preventing that is the >> idpf_vc_xn_manager field in idpf_adapter. Would it be overkill to make >> the field in idpf_adapter a pointer so I can forward declare and kalloc >> it? I think I can then move everything to idpf_virtchnl.c. Or do you see >> a better alternative? Or is it not worth the effort? Thanks! > > Since it's not hotpath, you can make it a pointer and move everything to > virtchnl.c, sounds nice. Since you're sending v6 anyway, could you maybe move virtchnl function declarations to new idpf_virtchnl.h to make idpf.h a bit less heavy? Something like I did in this commit[0]. > >> >>>> + >>>> +/** >>>> + * struct idpf_vc_xn_manager - Manager for tracking transactions >>>> + * @ring: backing and lookup for transactions >>>> + * @free_xn_bm: bitmap for free transactions >>>> + * @xn_bm_lock: make bitmap access synchronous where necessary >>>> + * @salt: used to make cookie unique every message >>>> + */ >>> >>> [...] [0] https://github.com/alobakin/linux/commit/0c8fae557f4e6ec1ae4353a68c9c5c9c2b70c5e9 Thanks, Olek
