Message ID | 20210510093854.31652-6-magnus.karlsson@gmail.com |
---|---|
State | New |
Headers | show |
Series | i40e: ice: ixgbe: ixgbevf: igb: igc: add correct exception tracing for XDP | expand |
> -----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 5/6] ixgbevf: 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: 21092e9ce8b1 ("ixgbevf: Add support for XDP_TX action") > Reported-by: Jesper Dangaard Brouer <brouer@redhat.com> > Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com> > --- > drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 3 +++ > 1 file changed, 3 insertions(+) > Tested-by: Vishakha Jambekar<vishakha.jambekar@intel.com>
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c index ba2ed8a43d2d..0e733cc15c58 100644 --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c @@ -1067,11 +1067,14 @@ static struct sk_buff *ixgbevf_run_xdp(struct ixgbevf_adapter *adapter, case XDP_TX: xdp_ring = adapter->xdp_ring[rx_ring->queue_index]; result = ixgbevf_xmit_xdp_ring(xdp_ring, xdp); + if (result == IXGBEVF_XDP_CONSUMED) + goto out_failure; break; default: bpf_warn_invalid_xdp_action(act); fallthrough; case XDP_ABORTED: +out_failure: trace_xdp_exception(rx_ring->netdev, xdp_prog, act); fallthrough; /* handle aborts by dropping packet */ case XDP_DROP: