Message ID | 20210510093854.31652-5-magnus.karlsson@gmail.com (mailing list archive) |
---|---|
State | Awaiting Upstream |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | i40e: ice: ixgbe: ixgbevf: igb: igc: add correct exception tracing for XDP | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | fail | 1 blamed authors not CCed: sven.auhagen@voleatech.de; 4 maintainers not CCed: davem@davemloft.net jesse.brandeburg@intel.com sven.auhagen@voleatech.de kuba@kernel.org |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 11 this patch: 11 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 24 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 11 this patch: 11 |
netdev/header_inline | success | Link |
> -----Original Message----- > From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of > Magnus Karlsson > Sent: Monday, May 10, 2021 3:09 PM > To: Karlsson, Magnus <magnus.karlsson@intel.com>; intel-wired- > lan@lists.osuosl.org; Nguyen, Anthony L <anthony.l.nguyen@intel.com>; > Fijalkowski, Maciej <maciej.fijalkowski@intel.com> > Cc: netdev@vger.kernel.org; brouer@redhat.com > Subject: [Intel-wired-lan] [PATCH intel-net v2 4/6] igb: add correct exception > tracing for XDP > > From: Magnus Karlsson <magnus.karlsson@intel.com> > > Add missing exception tracing to XDP when a number of different errors can > occur. The support was only partial. Several errors where not logged which > would confuse the user quite a lot not knowing where and why the packets > disappeared. > > Fixes: 9cbc948b5a20 ("igb: add XDP support") > Reported-by: Jesper Dangaard Brouer <brouer@redhat.com> > Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com> > --- > drivers/net/ethernet/intel/igb/igb_main.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > Tested-by: Vishakha Jambekar<vishakha.jambekar@intel.com>
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 038a9fd1af44..004a5b15fadb 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -8401,18 +8401,20 @@ static struct sk_buff *igb_run_xdp(struct igb_adapter *adapter, break; case XDP_TX: result = igb_xdp_xmit_back(adapter, xdp); + if (result == IGB_XDP_CONSUMED) + goto out_failure; break; case XDP_REDIRECT: err = xdp_do_redirect(adapter->netdev, xdp, xdp_prog); - if (!err) - result = IGB_XDP_REDIR; - else - result = IGB_XDP_CONSUMED; + if (err) + goto out_failure; + result = IGB_XDP_REDIR; break; default: bpf_warn_invalid_xdp_action(act); fallthrough; case XDP_ABORTED: +out_failure: trace_xdp_exception(rx_ring->netdev, xdp_prog, act); fallthrough; case XDP_DROP: