Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1849163imm; Thu, 19 Jul 2018 08:50:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcgC5Wn9EvKa6S+OQWSlv1qJWdmgqGrDQ0zHCEvJ/oYzwkUrft00S8cikKJH5es/dIXYsKJ X-Received: by 2002:a62:5d55:: with SMTP id r82-v6mr10116192pfb.150.1532015415168; Thu, 19 Jul 2018 08:50:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532015415; cv=none; d=google.com; s=arc-20160816; b=kUx3WfM+vWMK8a6Y++b0T4XYxRR44WzwaJ2i9af+UtEh5yKEtOYrypA9L6Q03+oy0r cQrUFctioiPIiS4gCNP0c1y9Oy6DN+4RFGCLH6fO079fUAiufPheBYqmH407Xg6rgdPt ilHEvzfRgAZXop+MTDj3G5lfIq3YL01jDl+4oOymTOndiFzXOLEYuDuNXvi/pNWzu0d5 gAmm+6qQi9IQIlFjt1CCG0wGz9NyPWAVdbthwR+LjdEmDZlf9EkZDiXoT7XEivKyo06D 2JgrAmANPM4jzBXXjDk5lFlawJjuOqGWDDtdMdJfY1BYyI9l5GHhsdOA2lKKCYNhylGN V3LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=vwuCZ6xPTlRJQalzosoTte9tThqGeIAnZeI/2C8NNPI=; b=FzY96clklHUHG1gMQft5l8tSXYllKSImd0J6tPflSnpG0hcOaqxIn8q42hufmZyL0+ hgK+KRzOcsDNFn9muZAxI6RLrZafLBQ2rb3vDDHpSa+FzmcX4q3noqLj2StESMlKDnVo Ec7hAl92xyTE1ylPfrXszB9vtKBxICTyI70D+7KHIlw9mqAVRzTTV9P9kG38DqyNjzyk w3SSfaS/WOz09AiDMOGqx+OB07C24E9GVgLj4t6vBhaDmzU20VuaOpMShQVTrDqOgMl2 aOoAzhTtMvjgSrHjqBBzGVTg+ksoZfo/NsC0tkPwt+so0yVmIEH7W5GF23lXpn/KWyMl iBtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qE9utXiQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l196-v6si5943870pga.38.2018.07.19.08.49.56; Thu, 19 Jul 2018 08:50:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qE9utXiQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731969AbeGSQdA (ORCPT + 99 others); Thu, 19 Jul 2018 12:33:00 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:39010 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730521AbeGSQc7 (ORCPT ); Thu, 19 Jul 2018 12:32:59 -0400 Received: by mail-pg1-f194.google.com with SMTP id g2-v6so4134487pgs.6; Thu, 19 Jul 2018 08:49:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=vwuCZ6xPTlRJQalzosoTte9tThqGeIAnZeI/2C8NNPI=; b=qE9utXiQu4KbCphO1MvzTM1zVJC5Tet0YSIjFqxUvfJfyNDaho6NOeeanI1g0UbOO3 sBCk1SenVWCgMRQL7QhfYJs7MMmO3ekAC/USdfl59NXHPBC9PjRw9hvPQdsu/Ja7VzsP wrOesmKzOiGPPld1cg5IFnMCFSMK60whjxTV9vmT3x7jqe3N6XD1yZrWPLOMjrTSoYq4 xSr7uazsfo4I+3WHbivA+atTInInUnkpijVGcTNDS1neQT9RLZABJ2PDlm4Fwd7F/NjI 6qu94DKlB59ijBdc2N5FnlTwhkFcK3/+97eQdd5feNWZ383vtA2cRlOU5QYAfNrO6PdQ 7ASg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=vwuCZ6xPTlRJQalzosoTte9tThqGeIAnZeI/2C8NNPI=; b=dYuIHc0cOmcbXfsbJejzpk/hSCgY2rx9cbVx8KfORIPsIXRWnUnXmPMIK0nqkxvXy+ IPSwS/OrkbxpKzyntv5P8Wm0zfLhS1ruYi3QqIWH1bUnw7Zv1LZMJMmBH6kfXh248rlI vYX1XFVDOP4G+kn2Fg+M2Pwg0HVTXGmYKgqMaIBHvUVG8ACO43ufhty0tSjufHjJTD7J 9i4KutlUz+8wWwBDym2hgZolfVuDGb7qRlZIDzPFVfvLl1J58pIAasBkWzzo8RHxQiIA jHg8mJR9Q3jS/hBjJjqGqZTXMavNO8xmceDt7u+sD0HbQ3yoKWR/zSaZBvad5LsvnB2o vJOw== X-Gm-Message-State: AOUpUlF7g+3vJap+f9+vck7FwXl8Y3WtxaayOYayv4HOUdxFDWQhIlyz sDj5nYUuWGDsQMgiwBs54NhySYQy X-Received: by 2002:a62:c288:: with SMTP id w8-v6mr10088593pfk.92.1532015352304; Thu, 19 Jul 2018 08:49:12 -0700 (PDT) Received: from dsa-mb.local ([2601:282:800:fd80:41e6:c9c0:c223:a927]) by smtp.googlemail.com with ESMTPSA id f67-v6sm15470912pfe.75.2018.07.19.08.49.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Jul 2018 08:49:11 -0700 (PDT) Subject: Re: [PATCH RFC/RFT net-next 00/17] net: Convert neighbor tables to per-namespace To: Michael Richardson , dsahern@kernel.org Cc: netdev@vger.kernel.org, nikita.leshchenko@oracle.com, roopa@cumulusnetworks.com, stephen@networkplumber.org, idosch@mellanox.com, jiri@mellanox.com, saeedm@mellanox.com, alex.aring@gmail.com, linux-wpan@vger.kernel.org, netfilter-devel@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180717120651.15748-1-dsahern@kernel.org> <15730.1531961643@localhost> From: David Ahern Message-ID: <996fe2a0-391d-d596-dbfd-7d330e3098bf@gmail.com> Date: Thu, 19 Jul 2018 09:49:09 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <15730.1531961643@localhost> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/18/18 6:54 PM, Michael Richardson wrote: >> Remove open use of arp_tbl and nd_tbl in favor of the new >> ipv{4,6}_neigh_table helpers. Since the existence of the IPv6 table >> is managed by the core networking, the IS_ENABLED checks for IPv6 >> can be removed in favor of "is the table non-NULL". > > What's the advantage of changing this check? (I am ignorant) > Just makes the code simpler. The current nd_tbl is a global owned by the ipv6 code (net/ipv6/ndisc.c). If CONFIG_IPV6 is not enabled, then nd_tbl is not defined which leads code referencing it to use if checks like this: #if IS_ENABLED(CONFIG_IPV6) if (!p->dev || (p->tbl != &nd_tbl && p->tbl != &arp_tbl)) #else if (!p->dev || p->tbl != &arp_tbl) #endif With the neigh_find_table approach the IS_ENABLED can be removed in favor of 'if (tbl)'. If tbl is set, then ipv6 is loaded and initialized.