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.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,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 5DCB7C433FF for ; Wed, 31 Jul 2019 09:38:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3AE4A20665 for ; Wed, 31 Jul 2019 09:38:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726582AbfGaJig (ORCPT ); Wed, 31 Jul 2019 05:38:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38542 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726169AbfGaJif (ORCPT ); Wed, 31 Jul 2019 05:38:35 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C76BF30C1345; Wed, 31 Jul 2019 09:38:35 +0000 (UTC) Received: from carbon (ovpn-200-29.brq.redhat.com [10.40.200.29]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0CBF95D9C5; Wed, 31 Jul 2019 09:38:31 +0000 (UTC) Date: Wed, 31 Jul 2019 11:38:29 +0200 From: Jesper Dangaard Brouer To: "Daniel T. Lee" Cc: brouer@redhat.com, Daniel Borkmann , Alexei Starovoitov , netdev@vger.kernel.org Subject: Re: [PATCH 1/2] tools: bpftool: add net load command to load XDP on interface Message-ID: <20190731113829.6b0135e3@carbon> In-Reply-To: <20190730184821.10833-2-danieltimlee@gmail.com> References: <20190730184821.10833-1-danieltimlee@gmail.com> <20190730184821.10833-2-danieltimlee@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Wed, 31 Jul 2019 09:38:35 +0000 (UTC) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, 31 Jul 2019 03:48:20 +0900 "Daniel T. Lee" wrote: > diff --git a/tools/bpf/bpftool/net.c b/tools/bpf/bpftool/net.c > index 67e99c56bc88..d3a4f18b5b95 100644 > --- a/tools/bpf/bpftool/net.c > +++ b/tools/bpf/bpftool/net.c > @@ -55,6 +55,35 @@ struct bpf_attach_info { > __u32 flow_dissector_id; > }; > > +enum net_load_type { > + NET_LOAD_TYPE_XDP, > + NET_LOAD_TYPE_XDP_GENERIC, > + NET_LOAD_TYPE_XDP_DRIVE, Why "DRIVE" ? Why not "DRIVER" ? > + NET_LOAD_TYPE_XDP_OFFLOAD, > + __MAX_NET_LOAD_TYPE > +}; > + > +static const char * const load_type_strings[] = { > + [NET_LOAD_TYPE_XDP] = "xdp", > + [NET_LOAD_TYPE_XDP_GENERIC] = "xdpgeneric", > + [NET_LOAD_TYPE_XDP_DRIVE] = "xdpdrv", > + [NET_LOAD_TYPE_XDP_OFFLOAD] = "xdpoffload", > + [__MAX_NET_LOAD_TYPE] = NULL, > +}; -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer