• Maciej Fijalkowski's avatar
    ixgbe, xsk: Get rid of redundant 'fallthrough' · e130e8d5
    Maciej Fijalkowski authored
    Intel drivers translate actions returned from XDP programs to their own
    return codes that have the following mapping:
    
    XDP_REDIRECT -> IXGBE_XDP_{REDIR,CONSUMED}
    XDP_TX -> IXGBE_XDP_{TX,CONSUMED}
    XDP_DROP -> IXGBE_XDP_CONSUMED
    XDP_ABORTED -> IXGBE_XDP_CONSUMED
    XDP_PASS -> IXGBE_XDP_PASS
    
    Commit c7dd09fd ("ixgbe, xsk: Terminate Rx side of NAPI when XSK Rx
    queue gets full") introduced new translation
    
    XDP_REDIRECT -> IXGBE_XDP_EXIT
    
    which is set when XSK RQ gets full and to indicate that driver should
    stop further Rx processing. This happens for unsuccessful
    xdp_do_redirect() so it is valuable to call trace_xdp_exception() for
    this case. In order to avoid IXGBE_XDP_EXIT -> IXGBE_XDP_CONSUMED
    overwrite, XDP_DROP case was moved above which in turn made the
    'fallthrough' that is in XDP_ABORTED useless as it became the last label
    in the switch statement.
    
    Simply drop this leftover.
    
    Fixes: c7dd09fd
    
     ("ixgbe, xsk: Terminate Rx side of NAPI when XSK Rx queue gets full")
    Signed-off-by: default avatarMaciej Fijalkowski <maciej.fijalkowski@intel.com>
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    Link: https://lore.kernel.org/bpf/20220421132126.471515-2-maciej.fijalkowski@intel.com
    e130e8d5
ixgbe_xsk.c 13.2 KB