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 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 B0B80C43381 for ; Tue, 19 Feb 2019 16:08:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8CE0F2147A for ; Tue, 19 Feb 2019 16:08:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729102AbfBSQIx (ORCPT ); Tue, 19 Feb 2019 11:08:53 -0500 Received: from www62.your-server.de ([213.133.104.62]:43944 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726546AbfBSQIw (ORCPT ); Tue, 19 Feb 2019 11:08:52 -0500 Received: from [78.46.172.3] (helo=sslproxy06.your-server.de) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1gw7wx-0001fp-Cn; Tue, 19 Feb 2019 17:08:51 +0100 Received: from [178.197.248.36] (helo=linux.home) by sslproxy06.your-server.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1gw7wx-000MGh-6p; Tue, 19 Feb 2019 17:08:51 +0100 Subject: Re: [PATCH bpf-next] bpf: add skb->queue_mapping write access from tc clsact To: Jesper Dangaard Brouer Cc: netdev@vger.kernel.org, Daniel Borkmann , Alexei Starovoitov References: <155057184028.20935.11848804617158437103.stgit@firesoul> <11d2572e-3ff5-2fc0-8f05-c50dd0fb1d6d@iogearbox.net> <20190219165745.676097a3@carbon> From: Daniel Borkmann Message-ID: Date: Tue, 19 Feb 2019 17:08:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20190219165745.676097a3@carbon> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.100.2/25365/Tue Feb 19 11:36:48 2019) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 02/19/2019 04:57 PM, Jesper Dangaard Brouer wrote: > On Tue, 19 Feb 2019 12:46:57 +0100 > Daniel Borkmann wrote: > >>> Due to lack of TC examples, lets show howto attach clsact BPF programs: >>> >>> # tc qdisc add dev ixgbe2 clsact >>> # tc filter replace dev ixgbe2 egress bpf da obj XXX_kern.o sec tc_qmap2cpu >>> # tc filter list dev ixgbe2 egress > > Recommending the "replace" is wrong is seems, as does not replace the > existing, but keeps adding more filter entries. > > What is the recommended procedure for unloading and loading a newer > version of the BPF TC program? You would need to specify prio / handle in order to select a particular instance for atomic replacement: tc filter replace dev foo {e,in}gress prio 1 handle 1 bpf da obj foo.o