Message ID | 20210510093854.31652-7-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 | 3 blamed authors not CCed: vedang.patel@intel.com andre.guedes@intel.com jithu.joseph@intel.com; 6 maintainers not CCed: andre.guedes@intel.com jithu.joseph@intel.com vedang.patel@intel.com jesse.brandeburg@intel.com davem@davemloft.net 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: 0 this patch: 0 |
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, 25 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
On 10/05/2021 12:38, Magnus Karlsson wrote: > 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: 73f1071c1d29 ("igc: Add support for XDP_TX action") > Fixes: 4ff320361092 ("igc: Add support for XDP_REDIRECT action") > Reported-by: Jesper Dangaard Brouer <brouer@redhat.com> > Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com> > --- > drivers/net/ethernet/intel/igc/igc_main.c | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > Tested-by: Dvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
On 10/05/2021 12:38, Magnus Karlsson wrote: > 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: 73f1071c1d29 ("igc: Add support for XDP_TX action") > Fixes: 4ff320361092 ("igc: Add support for XDP_REDIRECT action") > Reported-by: Jesper Dangaard Brouer <brouer@redhat.com> > Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com> > --- > drivers/net/ethernet/intel/igc/igc_main.c | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > Tested-by: Dvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c index 069471b7ffb0..f1adf154ec4a 100644 --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -2047,20 +2047,19 @@ static struct sk_buff *igc_xdp_run_prog(struct igc_adapter *adapter, break; case XDP_TX: if (igc_xdp_xmit_back(adapter, xdp) < 0) - res = IGC_XDP_CONSUMED; - else - res = IGC_XDP_TX; + goto out_failure; + res = IGC_XDP_TX; break; case XDP_REDIRECT: if (xdp_do_redirect(adapter->netdev, xdp, prog) < 0) - res = IGC_XDP_CONSUMED; - else - res = IGC_XDP_REDIRECT; + goto out_failure; + res = IGC_XDP_REDIRECT; break; default: bpf_warn_invalid_xdp_action(act); fallthrough; case XDP_ABORTED: +out_failure: trace_xdp_exception(adapter->netdev, prog, act); fallthrough; case XDP_DROP: