Re: Genetlink per cmd policies
From: Johannes Berg <johannes@sipsolutions.net>
Date: 2020-09-30 19:15:40
From: Johannes Berg <johannes@sipsolutions.net>
Date: 2020-09-30 19:15:40
On Wed, 2020-09-30 at 12:14 -0700, Jakub Kicinski wrote:
quoted
Hm. I guess you could even have both? struct genl_ops *ops; struct genl_ops_ext *extops; and then search both arrays, no need for memcpy/pointer assignment?Yup, both should work quite nicely, too. No reason to force one or the other.
Indeed.
Extra n_ops_ext should be fine, I think I can make n_ops a u8 in the first place, since commands themselves are u8s. And 0 is commonly unused.
True. I'm not really worried about the extra pointer in the *family* though, there aren't really all that many families :) johannes