From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 772B7C43461 for ; Thu, 10 Sep 2020 17:51:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1893C20BED for ; Thu, 10 Sep 2020 17:51:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="CAiDn31T" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727837AbgIJRuk (ORCPT ); Thu, 10 Sep 2020 13:50:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:22521 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727083AbgIJRuf (ORCPT ); Thu, 10 Sep 2020 13:50:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599760233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Oc9SSvuXxYHkBDg1JbnZA739FJDROj6mx8oujVN34Go=; b=CAiDn31T0Waf0jLLLyyhsBuV+q8q2JaOZ/0+yqLLycGKGbTldr/jw3yGJWJQ724wAx5pvJ g49UjBgo59faUPNorRWGyRV/uXRClv1N5RZuX2360KFRYLs/9JYRGlYmPrZlmrOGzbE+/O +5oFzBhqhZ5k0zFQRvpvdpIzlm00KK8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-587-qlFLwe6bPgaMKD8d8SVWJw-1; Thu, 10 Sep 2020 13:50:30 -0400 X-MC-Unique: qlFLwe6bPgaMKD8d8SVWJw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 923341007479; Thu, 10 Sep 2020 17:50:28 +0000 (UTC) Received: from carbon (unknown [10.40.208.42]) by smtp.corp.redhat.com (Postfix) with ESMTP id D1BA27E8EB; Thu, 10 Sep 2020 17:50:15 +0000 (UTC) Date: Thu, 10 Sep 2020 19:50:14 +0200 From: Jesper Dangaard Brouer To: Toke =?UTF-8?B?SMO4aWxhbmQtSsO4cmdlbnNlbg==?= Cc: Alexei Starovoitov , David Ahern , Hangbin Liu , bpf , Network Development , Jiri Benc , Eelco Chaudron , Alexei Starovoitov , Daniel Borkmann , Lorenzo Bianconi , Andrii Nakryiko , brouer@redhat.com Subject: Re: [PATCHv11 bpf-next 2/5] xdp: add a new helper for dev map multicast support Message-ID: <20200910195014.13ff24e4@carbon> In-Reply-To: <87o8mearu5.fsf@toke.dk> References: <20200903102701.3913258-1-liuhangbin@gmail.com> <20200907082724.1721685-1-liuhangbin@gmail.com> <20200907082724.1721685-3-liuhangbin@gmail.com> <20200909215206.bg62lvbvkmdc5phf@ast-mbp.dhcp.thefacebook.com> <20200910023506.GT2531@dhcp-12-153.nay.redhat.com> <87o8mearu5.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Sender: bpf-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On Thu, 10 Sep 2020 11:44:50 +0200 Toke H=C3=B8iland-J=C3=B8rgensen wrote: > Alexei Starovoitov writes: >=20 > > On Wed, Sep 9, 2020 at 8:30 PM David Ahern wrote: = =20 > >> > > >> > I think the packets modification (edit dst mac, add vlan tag, etc) s= hould be > >> > done on egress, which rely on David's XDP egress support. =20 > >> > >> agreed. The DEVMAP used for redirect can have programs attached that > >> update the packet headers - assuming you want to update them. =20 > > > > Then you folks have to submit them as one set. > > As-is the programmer cannot achieve correct behavior. =20 >=20 > The ability to attach a program to devmaps is already there. See: >=20 > fbee97feed9b ("bpf: Add support to attach bpf program to a devmap entry") >=20 > But now that you mention it, it does appear that this series is skipping > the hook that will actually run such a program. Didn't realise that was > in the caller of bq_enqueue() and not inside bq_enqueue() itself... In the first revisions of Ahern's patchset (before fully integrated in devmap), this was the case, but it changed in some of the last revisions. (This also lost the sort-n-bulk effect in the process, that optimize I-cache). In these earlier revisions it operated on xdp_frame's. It would have been a lot easier for Hangbin's patch if the devmap-prog operated on these xdp_frame's. Maybe we should change the devmap-prog approach, and run this on the xdp_frame's (in bq_xmit_all() to be precise) . Hangbin's patchset clearly shows that we need this "layer" between running the xdp_prog and the devmap-prog.=20 --=20 Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer