Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4397721imm; Tue, 11 Sep 2018 11:12:59 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ78qgmd9eaCD91TUXALsiOiPoHAnWnQ2F3wxw+OS5gfYcWuKFA85aTy43HM25ekk3hsR2+ X-Received: by 2002:a62:dbc5:: with SMTP id f188-v6mr31397234pfg.182.1536689579538; Tue, 11 Sep 2018 11:12:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536689579; cv=none; d=google.com; s=arc-20160816; b=WTW1b7gzLmXBVsIft0mq00d38Gc1AStcf1puuDpH8OqR46CCEh/Jz3eje9fvz8dDxX 5mb2c3MGRNsa9FexL5cE/8MgBcaSXDbPpCw+tsy1ZePbRLhKTypErafylkQfMjtxwCmC FkXNoXWVNhZEx0PR+dn1Hq8gcyXpRzvgxYTaFzbzwbu2A4UaEZcHyLO6RulkoRYGWai9 doP0gIMVky0rcnYLDQDxgxefABD4xJq9qEWYWuAMnvl7IysEktHAVTptUXOkhJahHgdh ruWFVp7K5zJxlAI7Uad+0vFwv0B3AqdelDvIs230UcuJe5I5uxglqmgssRea3DxzYrVh NOiw== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=MVpO1FZJ+pnY6ZJ2WnlooS92Vd3AlTYJ15/2NdHrnPY=; b=NKlQEt92dSPsuqqt3DVrjwDXk9UYtH7UZ31njoUmsFX2NZfpj/GhCkDn/JxLeMAMvU IyrSntiGWSUVc4D4VjF94otUbh7mb3D+rwIj1N+5Da7bM+JrA5axh1ty6eQX7xh/az0t dSQWDydcD+GkOkd2V63rTcMwD9yranBcD2HrjIE9WH3bvIzYho2+5USN2Gssz3KC0uKp CdlE9CFwce5ZAJfgDuy3KxliVC79mCOosMQuLgoucADxMe/8zfmW6C8JosVWiDjGPiJy hW8f0A7BQUQPb/a4kBgm+m5xdIkWMbxf3Z2+PFb5l0udycvtm+odafoqO0Orex9j219P GAdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=zUMxvs2V; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r7-v6si20322137pgh.473.2018.09.11.11.12.40; Tue, 11 Sep 2018 11:12:59 -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=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=zUMxvs2V; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727865AbeIKXMx (ORCPT + 99 others); Tue, 11 Sep 2018 19:12:53 -0400 Received: from mail-pg1-f174.google.com ([209.85.215.174]:38788 "EHLO mail-pg1-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726622AbeIKXMw (ORCPT ); Tue, 11 Sep 2018 19:12:52 -0400 Received: by mail-pg1-f174.google.com with SMTP id t84-v6so10816199pgb.5 for ; Tue, 11 Sep 2018 11:12:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MVpO1FZJ+pnY6ZJ2WnlooS92Vd3AlTYJ15/2NdHrnPY=; b=zUMxvs2VRMIP1s7GoUDGlV9bFhqBV9r2dE50ZP/jXNxBYNrQA5NKy4iJ+W5B4FmsWo N7MlTnZM/dS66k9etXDAffNgMA9ZVg0wZj1oLMTINFxUpa0h09DQgM7kweemKZmBynNB DtinXqmnAT7xFsruLp48YcAY3wGjXlIfmuxvYD5zL/j/g/v3InBsKwheVVn6Jo0JZMKs AMTDTgfhft9aluMIgvGjtzokFWzOy2E7SvJ03diuf0p1Kh3wbXz/hS0QW5QM8mQ23CDq Rc2PSFAxAc1gKUX6AWqD5sMS4ytOwsiJuCx9xqLiCHZloTNdbb/Hl3o982/jtjahSRtA WagA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MVpO1FZJ+pnY6ZJ2WnlooS92Vd3AlTYJ15/2NdHrnPY=; b=PchsFnEx6vZDUkNSNqt/0I9ZJ5t9hpYavbRWMNge+HRq02U+2GW5+CNUWA/sAYWF7U p+DBMxW9gevvBJkDxS+cOoiqg27IvIcx86L8Z0291wMbC8aC1pYX5BdhXsqOMLrm6wdR lMu46MURa0yA/9FrKWD7XD57xBKycbaLrmd/Zu2aejn0ALi6LmfMW+CIrAJWn4MEI78k lLONzvXav5NkvftCukR5KiAN69a2Ag96caMOpl3d5PG2NaYaN5TE2xWbR8+rT2HkxJKM LBKcNP94XqbEg7RAgRwZ8aAsDjRMIAy4EKR3P1BiXggaWmKPXc6qvAcBUVCu7LDZUEYQ xE5w== X-Gm-Message-State: APzg51AcxDCnuIhGQSZ1C9sYC5LVUPTi5/qTI04joh+HPmRXg+m+4eWg PQNd5xiIssVzAgwSui7LHKUAmg== X-Received: by 2002:a63:3dc6:: with SMTP id k189-v6mr29554883pga.191.1536689543931; Tue, 11 Sep 2018 11:12:23 -0700 (PDT) Received: from xeon-e3 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id u13-v6sm25400870pfn.59.2018.09.11.11.12.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 11 Sep 2018 11:12:23 -0700 (PDT) Date: Tue, 11 Sep 2018 11:12:17 -0700 From: Stephen Hemminger To: Vasily Khoruzhick Cc: "David S. Miller" , Roopa Prabhu , Alexey Dobriyan , Eric Dumazet , Jim Westfall , Wolfgang Bumiller , Vasily Khoruzhick , Kees Cook , Ihar Hrachyshka , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] neighbour: confirm neigh entries when ARP packet is received Message-ID: <20180911111217.3e3679c5@xeon-e3> In-Reply-To: <20180911180406.31283-1-vasilykh@arista.com> References: <20180911180406.31283-1-vasilykh@arista.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 11 Sep 2018 11:04:06 -0700 Vasily Khoruzhick wrote: > diff --git a/net/core/neighbour.c b/net/core/neighbour.c > index aa19d86937af..56a554597db5 100644 > --- a/net/core/neighbour.c > +++ b/net/core/neighbour.c > @@ -1180,6 +1180,12 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, > lladdr = neigh->ha; > } > > + /* Update confirmed timestamp for neighbour entry after we > + * received ARP packet even if it doesn't change IP to MAC binding. > + */ > + if (new & NUD_CONNECTED) > + neigh->confirmed = jiffies; You might want to do: if ((new & NUD_CONNECTED) && neigh->confirmed != jiffies) neigh->confirmed = jiffies; This avoid poisoning the cacheline with unnecessary write.