From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next v4 2/2] bpf: remove struct bpf_map_type_list Date: Tue, 11 Apr 2017 14:39:16 -0400 (EDT) Message-ID: <20170411.143916.598983200463509517.davem@davemloft.net> References: <20170411133458.26816-1-johannes@sipsolutions.net> <20170411133458.26816-2-johannes@sipsolutions.net> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, alexei.starovoitov@gmail.com, daniel@iogearbox.net, johannes.berg@intel.com To: johannes@sipsolutions.net Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:34850 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753215AbdDKSjS (ORCPT ); Tue, 11 Apr 2017 14:39:18 -0400 In-Reply-To: <20170411133458.26816-2-johannes@sipsolutions.net> Sender: netdev-owner@vger.kernel.org List-ID: From: Johannes Berg Date: Tue, 11 Apr 2017 15:34:58 +0200 > From: Johannes Berg > > There's no need to have struct bpf_map_type_list since > it just contains a list_head, the type, and the ops > pointer. Since the types are densely packed and not > actually dynamically registered, it's much easier and > smaller to have an array of type->ops pointer. Also > initialize this array statically to remove code needed > to initialize it. > > In order to save duplicating the list, move it to the > types header file added by the previous patch and > include it in the same fashion. > > Signed-off-by: Johannes Berg Applied.