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=-0.9 required=3.0 tests=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 B2C78C282DD for ; Fri, 10 Jan 2020 15:26:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 81BFE2077C for ; Fri, 10 Jan 2020 15:26:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="CNZGR5jb" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728152AbgAJP0j (ORCPT ); Fri, 10 Jan 2020 10:26:39 -0500 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:24006 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728141AbgAJP0j (ORCPT ); Fri, 10 Jan 2020 10:26:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578669997; 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=3vAXUBzgCVtjH+yaI1yeAUtLpb8LH57sAuY25T356fo=; b=CNZGR5jb4Zk0MrqX8m+xT3pwAIaH21PiaVZctlwkKqTzNkCqbBNCTVUliSKm1QNbwiJh6+ ZzqOsVq8+FWmYf1juyyT3dkdvnPIADhjPCvX+Kfql2BYPTJ6wkIj5BVrB8fDyx3hNB73py GW9UDGfiotQ8IVjHJvX6bb6FocQjahc= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-314-7NTi8WN9PDaGB4kOtBkpNA-1; Fri, 10 Jan 2020 10:26:36 -0500 X-MC-Unique: 7NTi8WN9PDaGB4kOtBkpNA-1 Received: by mail-wr1-f70.google.com with SMTP id f17so1057108wrt.19 for ; Fri, 10 Jan 2020 07:26:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=3vAXUBzgCVtjH+yaI1yeAUtLpb8LH57sAuY25T356fo=; b=HSIizPlLkQhLu2R2kA37OYEXF+DFSLc9tzHnCQZCfOLPSL5UiabquQjTSkvI2phFxQ S46CHjGqMJN70DF0EDM6KPOY07m3+3Lyp/bsgSeqieuafRwU4KFp9M1R3mHnwFdLiNmD 1oN9kOVo5hRjSkrBL8BrzFdNFrT5GTma3aVT9lfl3EGCMWkYdLhsyyH3is+55wDDFn0d Ai+lD2YIbgmoXVzZ4QWdd298g5/1FxNS0LkdXcKlkyLpWtCixSn77C/I7nWOqbWsysee MkeKcbPr0J31ZV+Ne+N/cIfSFmC+eLcCv3ez31xuDrCQhszaIgYTDLgCK2NxHbv7AW2f tllg== X-Gm-Message-State: APjAAAXRMXUigMuVc2E8G+NmUjgErg4GoFN9oPq5nQAdKhhehBCWYiGo fzX/uAhIilmfBlNWfhzRJUAx/vgUAqT5/YinXxMOU7L/vs35jvnX5gpubnyQMFu2fPEhc0/eY0i geVrCV9BZilnO X-Received: by 2002:a05:600c:2549:: with SMTP id e9mr5165911wma.6.1578669994785; Fri, 10 Jan 2020 07:26:34 -0800 (PST) X-Google-Smtp-Source: APXvYqwCp80Y1ye3xZIZjQUNlok/NaqdULkmUuIboYWbtJ3IsHrtrf6OqdtizfN4G8oLhtMR62zp3A== X-Received: by 2002:a05:600c:2549:: with SMTP id e9mr5165885wma.6.1578669994592; Fri, 10 Jan 2020 07:26:34 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2]) by smtp.gmail.com with ESMTPSA id a1sm2487350wmj.40.2020.01.10.07.26.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2020 07:26:33 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 6E5C518009F; Fri, 10 Jan 2020 16:26:33 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= Cc: Netdev , bpf , Daniel Borkmann , Alexei Starovoitov , David Miller , Jesper Dangaard Brouer , John Fastabend Subject: Re: [PATCH bpf-next 1/2] xdp: Move devmap bulk queue into struct net_device In-Reply-To: References: <157866612174.432695.5077671447287539053.stgit@toke.dk> <157866612285.432695.6722430952732620313.stgit@toke.dk> X-Clacks-Overhead: GNU Terry Pratchett Date: Fri, 10 Jan 2020 16:26:33 +0100 Message-ID: <87ftgnxrh2.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: bpf-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org Bj=C3=B6rn T=C3=B6pel writes: > On Fri, 10 Jan 2020 at 15:22, Toke H=C3=B8iland-J=C3=B8rgensen wrote: >> >> From: Toke H=C3=B8iland-J=C3=B8rgensen >> >> Commit 96360004b862 ("xdp: Make devmap flush_list common for all map >> instances"), changed devmap flushing to be a global operation instead of= a >> per-map operation. However, the queue structure used for bulking was sti= ll >> allocated as part of the containing map. >> >> This patch moves the devmap bulk queue into struct net_device. The >> motivation for this is reusing it for the non-map variant of XDP_REDIREC= T, >> which will be changed in a subsequent commit. >> >> We defer the actual allocation of the bulk queue structure until the >> NETDEV_REGISTER notification devmap.c. This makes it possible to check f= or >> ndo_xdp_xmit support before allocating the structure, which is not possi= ble >> at the time struct net_device is allocated. However, we keep the freeing= in >> free_netdev() to avoid adding another RCU callback on NETDEV_UNREGISTER. >> >> Because of this change, we lose the reference back to the map that >> originated the redirect, so change the tracepoint to always return 0 as = the >> map ID and index. Otherwise no functional change is intended with this >> patch. >> > > Nice work, Toke! Thanks! > I'm getting some checkpatch warnings (>80 char lines), other than > that: Oh, right, totally forgot to run checkpatch; will fix and respin :) -Toke