• Asbjørn Sloth Tønnesen's avatar
    flow_offload: add control flag checking helpers · d11e6311
    Asbjørn Sloth Tønnesen authored
    
    
    These helpers aim to help drivers, with checking
    for the presence of unsupported control flags.
    
    For drivers supporting at least one control flag:
      flow_rule_is_supp_control_flags()
    
    For drivers using flow_rule_match_control(), but not using flags:
      flow_rule_has_control_flags()
    
    For drivers not using flow_rule_match_control():
      flow_rule_match_has_control_flags()
    
    While primarily aimed at FLOW_DISSECTOR_KEY_CONTROL
    and flow_rule_match_control(), then the first two
    can also be used with FLOW_DISSECTOR_KEY_ENC_CONTROL
    and flow_rule_match_enc_control().
    
    These helpers mirrors the existing check done in sfc:
      drivers/net/ethernet/sfc/tc.c +276
    
    Only compile-tested.
    Signed-off-by: default avatarAsbjørn Sloth Tønnesen <ast@fiberby.net>
    Reviewed-by: default avatarLouis Peens <louis.peens@corigine.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    d11e6311
flow_offload.h 19 KB