On Wed, Sep 2, 2015 at 9:39 AM, Jiri Pirko <j...@resnulli.us> wrote: > Wed, Sep 02, 2015 at 06:33:34AM CEST, t...@herbertland.com wrote: >>On Tue, Sep 1, 2015 at 9:19 PM, David Miller <da...@davemloft.net> wrote: >>> >>> Signed-off-by: David S. Miller <da...@davemloft.net> >>> --- >>> include/linux/skbuff.h | 8 ++--- >>> include/net/flow.h | 8 ++--- >>> net/core/flow_dissector.c | 79 >>> ++++++++++++++++++++++++----------------------- >>> 3 files changed, 49 insertions(+), 46 deletions(-) >>> > > <snip> > > >>> diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c >>> index 345a040..d79699c 100644 >>> --- a/net/core/flow_dissector.c >>> +++ b/net/core/flow_dissector.c >>> @@ -19,14 +19,14 @@ >>> #include <net/flow_dissector.h> >>> #include <scsi/fc/fc_fcoe.h> >>> >>> -static bool skb_flow_dissector_uses_key(struct flow_dissector >>> *flow_dissector, >>> - enum flow_dissector_key_id key_id) >>> +static bool dissector_uses_key(const struct flow_dissector *flow_dissector, >>> + enum flow_dissector_key_id key_id) >>> { >>> return flow_dissector->used_keys & (1 << key_id); >>> } >>> >>> -static void skb_flow_dissector_set_key(struct flow_dissector >>> *flow_dissector, >>> - enum flow_dissector_key_id key_id) >>> +static void dissector_set_key(struct flow_dissector *flow_dissector, >>> + enum flow_dissector_key_id key_id) >>> { >>> flow_dissector->used_keys |= (1 << key_id); >>> } >>> @@ -51,20 +51,20 @@ void skb_flow_dissector_init(struct flow_dissector >>> *flow_dissector, >> >>I suppose we should drop skb_ from skb_flow_dissector_init and >>skb_flow_dissector_target as well. > > I like to have "namespaces" by function prefixes. Code is easier to read > then...
Right, these functions now are independent of sk_buff. Conceptually someone could use these for a non-skbuff application-- so it's good design! -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html