From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f68.google.com ([209.85.160.68]:46220 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932590AbeCNBPf (ORCPT ); Tue, 13 Mar 2018 21:15:35 -0400 Received: by mail-pl0-f68.google.com with SMTP id f5-v6so826213plj.13 for ; Tue, 13 Mar 2018 18:15:35 -0700 (PDT) Subject: Re: BUG_ON triggered in skb_segment From: Eric Dumazet To: Alexei Starovoitov , Yonghong Song , Steffen Klassert Cc: Daniel Borkmann , netdev , Martin Lau , saeedm@mellanox.com, diptanu@fb.com References: <9265b93f-253d-6b8c-f2b8-4b54eff1835c@fb.com> <875f59f2-d1ec-c47c-cdd7-2ce4985c5143@gmail.com> <20180313084444.5hyu7kteswh6v5li@gauss3.secunet.de> <06bef27e-60f6-0fb4-e926-cb7ff3666a3c@fb.com> <4c0d599e-95a3-be7d-bfeb-e51a16648cc8@gmail.com> <39a56b2c-6ea8-02f7-9e9c-968b16b9aa7a@gmail.com> <50906fd5-9834-d41a-c132-86f64be38606@gmail.com> <84dc788d-eedd-acc2-64dc-d51e909bb663@gmail.com> Message-ID: Date: Tue, 13 Mar 2018 18:15:33 -0700 MIME-Version: 1.0 In-Reply-To: <84dc788d-eedd-acc2-64dc-d51e909bb663@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org List-ID: On 03/13/2018 05:35 PM, Eric Dumazet wrote: > > > On 03/13/2018 05:26 PM, Eric Dumazet wrote: >> >> >> On 03/13/2018 05:04 PM, Alexei Starovoitov wrote: >>> On 3/13/18 4:27 PM, Eric Dumazet wrote: >>>> >>>> >>>> On 03/13/2018 04:09 PM, Alexei Starovoitov wrote: >>>> >>>>> we have bpf_skb_proto_6_to_4() that was used by cilium for long time. >>>>> It's not clear why it's not crashing there, but we cannot just >>>>> reject changing proto in bpf programs now. >>>>> We have to fix whatever needs to be fixed in skb_segment >>>>> (if bug is there) or fix whatever necessary on mlx5 side. >>>>> In bpf helper we mark it as SKB_GSO_DODGY just like packets coming >>>>> through virtio would do, so if skb_segment() needs to do something >>>>> special with skb the SKB_GSO_DODGY flag is already there. >>>> >>>> 'Fixing' skb_segment(), I did that a long time ago and Herbert Xu was >>>> not happy with the fix and provided something else. >>> >>> any link to your old patches and discussion? >>> >>> I think since mlx4 can do tso on them and the packets came out >>> correct on the wire, there is nothing fundamentally wrong with >>> changing gso_size. Just tricky to teach skb_segment. >>> >> >> The world is not mlx4 only. Some NIC will ask skb_segment() fallback >> segmentation for various reasons (like skb->len above a given limit >> like 16KB) >> >> Maybe https://www.spinics.net/lists/netdev/msg255549.html > > > Herbert patch : > > commit 9d8506cc2d7ea1f911c72c100193a3677f6668c3 > Author: Herbert Xu > Date:   Thu Nov 21 11:10:04 2013 -0800 > >     gso: handle new frag_list of frags GRO packets > I found my initial patch. https://www.spinics.net/lists/netdev/msg255452.html