From patchwork Fri Sep 18 19:55:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Feldman X-Patchwork-Id: 519565 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 177661401E7 for ; Sat, 19 Sep 2015 05:53:29 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=wsZp6vQ1; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754062AbbIRTxX (ORCPT ); Fri, 18 Sep 2015 15:53:23 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:33066 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753338AbbIRTxP (ORCPT ); Fri, 18 Sep 2015 15:53:15 -0400 Received: by pacex6 with SMTP id ex6so59217481pac.0 for ; Fri, 18 Sep 2015 12:53:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=k6vz6jVEh0w0yHpzlNAoC1o8s5NaJQgPTrSYb4Xvqmk=; b=wsZp6vQ1XA4YRHb22nuEK1kDtCR7R24HTDVkN3RUGSBt+cWL3H582kiA56SHUj36Ob OhXOB2GX8oFBI4mS2I47iQUUgRTSJu6MGoH9oQH4EqBmY7QWNMMAAG19Zc3ZY4OuPZYE rguQd4fYMyCXjnKuigxQpciYnuunGCl4/OXHEWydi+cDZPFTu7T+TaBnr7HLV7PR0MZe FmETtHBRNQuoHzYmPOHgFNFAwQ7hvR9tTPByCz2Bv0oKTtbuH14zMqSw2INzbKXZcdMR JuDfETYf2HVAYd9t6rsLDvaHmauFxPwh/GofhUfzXey/NyzoU4B7r1V4BsrWWuF+N/CT uzDQ== X-Received: by 10.68.68.167 with SMTP id x7mr8867904pbt.140.1442605994532; Fri, 18 Sep 2015 12:53:14 -0700 (PDT) Received: from rocker1.rocker.net ([199.58.98.143]) by smtp.gmail.com with ESMTPSA id fx4sm10458910pbb.92.2015.09.18.12.53.13 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Sep 2015 12:53:14 -0700 (PDT) From: sfeldma@gmail.com To: netdev@vger.kernel.org Cc: jiri@resnulli.us, siva.mannem.lnx@gmail.com, pjonnala@broadcom.com, stephen@networkplumber.org, roopa@cumulusnetworks.com, andrew@lunn.ch, f.fainelli@gmail.com, vivien.didelot@savoirfairelinux.com Subject: [PATCH net-next 7/7] switchdev: update documentation on FDB ageing_time Date: Fri, 18 Sep 2015 12:55:51 -0700 Message-Id: <1442606151-50429-8-git-send-email-sfeldma@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1442606151-50429-1-git-send-email-sfeldma@gmail.com> References: <1442606151-50429-1-git-send-email-sfeldma@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Scott Feldman Signed-off-by: Scott Feldman Reviewed-by: Vivien Didelot Acked-by: Jiri Pirko --- Documentation/networking/switchdev.txt | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Documentation/networking/switchdev.txt b/Documentation/networking/switchdev.txt index 476df04..67e43ee 100644 --- a/Documentation/networking/switchdev.txt +++ b/Documentation/networking/switchdev.txt @@ -239,20 +239,20 @@ The driver should initialize the attributes to the hardware defaults. FDB Ageing ^^^^^^^^^^ -There are two FDB ageing models supported: 1) ageing by the device, and 2) -ageing by the kernel. Ageing by the device is preferred if many FDB entries -are supported. The driver calls call_switchdev_notifiers(SWITCHDEV_FDB_DEL, -...) to age out the FDB entry. In this model, ageing by the kernel should be -turned off. XXX: how to turn off ageing in kernel on a per-port basis or -otherwise prevent the kernel from ageing out the FDB entry? - -In the kernel ageing model, the standard bridge ageing mechanism is used to age -out stale FDB entries. To keep an FDB entry "alive", the driver should refresh -the FDB entry by calling call_switchdev_notifiers(SWITCHDEV_FDB_ADD, ...). The +The bridge will skip ageing FDB entries marked with NTF_EXT_LEARNED and it is +the responsibility of the port driver/device to age out these entries. If the +port device supports ageing, when the FDB entry expires, it will notify the +driver which in turn will notify the bridge with SWITCHDEV_FDB_DEL. If the +device does not support ageing, the driver can simulate ageing using a +garbage collection timer to monitor FBD entries. Expired entries will be +notified to the bridge using SWITCHDEV_FDB_DEL. See rocker driver for +example of driver running ageing timer. + +To keep an NTF_EXT_LEARNED entry "alive", the driver should refresh the FDB +entry by calling call_switchdev_notifiers(SWITCHDEV_FDB_ADD, ...). The notification will reset the FDB entry's last-used time to now. The driver should rate limit refresh notifications, for example, no more than once a -second. If the FDB entry expires, fdb_delete is called to remove entry from -the device. +second. (The last-used time is visible using the bridge -s fdb option). STP State Change on Port ^^^^^^^^^^^^^^^^^^^^^^^^