Netdev List
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: Christian Deacon <gamemann@gflclan.com>,
	bpf@vger.kernel.org, aelior@marvell.com, skalluru@marvell.com,
	netdev@vger.kernel.org
Subject: Re: TC BPF Program Crashing With Bnx2x Drivers
Date: Thu, 9 Apr 2020 12:18:10 -0700	[thread overview]
Message-ID: <20200409121810.26ad70aa@kicinski-fedora-PC1C0HJN> (raw)
In-Reply-To: <54d3af61-8f00-6f65-23a4-0f1d5a9aba8e@iogearbox.net>

On Thu, 9 Apr 2020 01:57:42 +0200 Daniel Borkmann wrote:
> On 4/9/20 1:30 AM, Christian Deacon wrote:
> > Hey Daniel,
> > 
> > 
> > Thank you for your response and I'm glad I'm in the correct area!
> > 
> > 
> > When the individual ran:
> > 
> > 
> > ```
> > 
> > ethtool -K eth0 tso off
> > 
> > ```
> > 
> > 
> > The program started operating without crashing. It has been around 20 minutes so far and no crash. Therefore, I'd assume that stopped the crashing considering it usually crashed 20 - 30 seconds after starting the program each time beforehand. I'm not entirely sure what TSO does with this network driver, but I'll try doing some research.  
> 
> Yep, don't think it should crash anymore after you turned it off and
> it survived since then. ;) I presume GSO is still on in your case,
> right (check via `ethtool -k eth0`)?
> 
> > I was suspecting it may be the 'bpf_skb_adjust_room()' function as
> > well since I'm using a mode that was implemented in later kernels.
> > This function removes the outer IP header in my program from the
> > outgoing IPIP packet. I'm not sure what would be causing the
> > crashing, though.  
> 
> Probably bnx2x folks might be able to help but as mentioned looks
> like the tso handling in there has an issue with the ipip which leads
> to the nic hang eventually.

IMHO this is not a bnx2x problem. The drivers should not have to
re-validate GSO flags..

Let's see if I get this right. We have an IPinIP encap, IPXIP4 GSO skb
comes down and TC bpf pulls the outer header off, but the gso flags
remain unchanged. The driver then sees IPXIP4 GSO but there are no
headers so it implodes. Is this correct?

And we have the ability to add the right gso flags for encap, not decap
(bpf_skb_net_grow() vs bpf_skb_net_shrink()).

       reply	other threads:[~2020-04-09 19:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <853f67f9-6713-a354-07f7-513d654ede91@gflclan.com>
     [not found] ` <c3c44050-132e-44f7-1611-95d30b0b4b47@iogearbox.net>
     [not found]   ` <0a96d4ee-e875-e89c-e6bb-e6b62061abdd@gflclan.com>
     [not found]     ` <54d3af61-8f00-6f65-23a4-0f1d5a9aba8e@iogearbox.net>
2020-04-09 19:18       ` Jakub Kicinski [this message]
2020-04-10  8:15         ` [EXT] Re: TC BPF Program Crashing With Bnx2x Drivers Ariel Elior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200409121810.26ad70aa@kicinski-fedora-PC1C0HJN \
    --to=kuba@kernel.org \
    --cc=aelior@marvell.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=gamemann@gflclan.com \
    --cc=netdev@vger.kernel.org \
    --cc=skalluru@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox