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=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 696BFC169C4 for ; Fri, 8 Feb 2019 16:55:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4217D2146E for ; Fri, 8 Feb 2019 16:55:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727203AbfBHQzR (ORCPT ); Fri, 8 Feb 2019 11:55:17 -0500 Received: from mail-ed1-f68.google.com ([209.85.208.68]:35393 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726679AbfBHQzR (ORCPT ); Fri, 8 Feb 2019 11:55:17 -0500 Received: by mail-ed1-f68.google.com with SMTP id b17so3363624eds.2 for ; Fri, 08 Feb 2019 08:55:16 -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; bh=ZKKZRlZSLL/vrCYRjX8nJ6zFY/Oo9s2C6H8++jY+FSA=; b=G0eTV1jgjc51ROCS+FY2yKiBoZN19VFMyq6CRBuU/C658A+wki3C1VILavMdLBWpl/ r3qQS5wB0z9CZ77Xs1Pc6XzBSqIiZ1zKv/9gDTMitZioQ/AIxg7tQ4PxIqkFfQykXp42 9WgMZXNgPV7jhbsJPTBhUEGpi3kNKxOHsyDN2KOcLnuYfRvT8kgUpJu01WeY8wPW3oaz HZSR61svJNb4ZA2byyd/eFI849KTS4fwzKQ5b7o/KFVdMluCRyUXcozoZmbbo19zGRr5 sZm2mJAm9gOqNL70Mq/u+5VRm12NoUAf2p28TNn2v/EkzxNkSl4WnjQ1rxeCrzhVy+++ ReBg== X-Gm-Message-State: AHQUAubQ9HlaR8Fgx3zar3eISTYC3EladMIdYcbqJtnFDDXDqVzqCCpS 7tyiYJuCb7c8w0VIDVlZnl+hfg== X-Google-Smtp-Source: AHgI3Ias0oL6h1YlYn8oZmm5aTGEbatKfKbaTHr1R+tqaPLIkgYNax5K5N2dSW2tCgl777TWdkKUuQ== X-Received: by 2002:aa7:c4cc:: with SMTP id p12mr3577106edr.179.1549644915846; Fri, 08 Feb 2019 08:55:15 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk (borgediget.toke.dk. [85.204.121.218]) by smtp.gmail.com with ESMTPSA id v1sm386857eds.47.2019.02.08.08.55.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Feb 2019 08:55:14 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 14B4D1825D3; Fri, 8 Feb 2019 17:55:14 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Saeed Mahameed , "brouer\@redhat.com" Cc: "hawk\@kernel.org" , "virtualization\@lists.linux-foundation.org" , "borkmann\@iogearbox.net" , Tariq Toukan , "john.fastabend\@gmail.com" , "mst\@redhat.com" , "jakub.kicinski\@netronome.com" , "dsahern\@gmail.com" , "netdev\@vger.kernel.org" , "jasowang\@redhat.com" , "davem\@davemloft.net" , "makita.toshiaki\@lab.ntt.co.jp" Subject: Re: Resource management for ndo_xdp_xmit (Was: [PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames) In-Reply-To: <9e5e6882566ac67276209b35ec112a824b256bff.camel@mellanox.com> References: <1548934830-2389-1-git-send-email-makita.toshiaki@lab.ntt.co.jp> <20190131101516-mutt-send-email-mst@kernel.org> <20190131.094523.2248120325911339180.davem@davemloft.net> <20190131211555.3b15c81f@carbon> <20190204125307.08492005@redhat.com> <140ecbe1e25f54f90d859cc696c4119aa96bc6eb.camel@mellanox.com> <20190207084815.1e8bd817@carbon> <9e5e6882566ac67276209b35ec112a824b256bff.camel@mellanox.com> X-Clacks-Overhead: GNU Terry Pratchett Date: Fri, 08 Feb 2019 17:55:14 +0100 Message-ID: <87o97mp6dp.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Saeed Mahameed writes: > But: > 2) this won't totally solve our problem, since sometimes the driver can > decide to recreate (change of configuration) hw resources on the fly > while redirect/devmap is already happening, so we need some kind of a > dev_map_notification or a flag with rcu synch, for when the driver want > to make the xdp redirect resources unavailable. Good point, I'll make a note of this. Do you have a pointer to where the mlx5 driver does this kind of change currently? -Toke