From patchwork Mon Feb 1 12:15:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: taoyunxiang X-Patchwork-Id: 1434131 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DTn4q1cW8z9sXV for ; Mon, 1 Feb 2021 23:17:14 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7ABA0855C6; Mon, 1 Feb 2021 12:17:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mbt8ZXdwlB-0; Mon, 1 Feb 2021 12:17:12 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id 021FE85582; Mon, 1 Feb 2021 12:17:12 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id DE66CC0174; Mon, 1 Feb 2021 12:17:11 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 72ABDC013A for ; Mon, 1 Feb 2021 12:17:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6E63F8559B for ; Mon, 1 Feb 2021 12:17:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WmxfMLoaANei for ; Mon, 1 Feb 2021 12:17:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from cmccmta2.chinamobile.com (cmccmta2.chinamobile.com [221.176.66.80]) by fraxinus.osuosl.org (Postfix) with ESMTP id BAD2385582 for ; Mon, 1 Feb 2021 12:17:03 +0000 (UTC) Received: from spf.mail.chinamobile.com (unknown[172.16.121.19]) by rmmx-syy-dmz-app06-12006 (RichMail) with SMTP id 2ee66017f110c87-82aae; Mon, 01 Feb 2021 20:16:18 +0800 (CST) X-RM-TRANSID: 2ee66017f110c87-82aae X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from yun.localdomain (unknown[112.25.154.146]) by rmsmtp-syy-appsvr10-12010 (RichMail) with SMTP id 2eea6017f10db08-9000a; Mon, 01 Feb 2021 20:16:17 +0800 (CST) X-RM-TRANSID: 2eea6017f10db08-9000a From: Tao YunXiang To: ovs-dev@openvswitch.org Date: Mon, 1 Feb 2021 20:15:32 +0800 Message-Id: <20210201121532.2684-1-taoyunxiang@cmss.chinamobile.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <8> References: <8> Cc: Tao YunXiang Subject: [ovs-dev] [PATCH] doc: Add 'faq' about datapath-id X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" This patch populate faq about datapath-id. Author: Tao YunXiang Signed-off-by: Tao YunXiang --- Documentation/faq/configuration.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Documentation/faq/configuration.rst b/Documentation/faq/configuration.rst index 4a98740c5..fd5d2e005 100644 --- a/Documentation/faq/configuration.rst +++ b/Documentation/faq/configuration.rst @@ -281,3 +281,24 @@ the sense of OFPP_LOCAL) A: Open vSwitch does not support such a configuration. Bridges always have their local ports. + +Q: Why the datapath-id choose the minimum non-local MAC address among all of +the ports in bridge? + + A: The reason that this happens is to keep the MAC address of the bridge + steady. + + Here's the use case it was designed to address. It started with + XenServer, but other hypervisors work similarly. Each physical NIC that + might have VMs on it gets put into a bridge, and then the IP address for + that NIC (if any) gets migrated from the pnic to the bridge device. You + want the bridge device to have the same MAC address as the physical NIC, + so taking the minimum MAC address does that. Adding virtual NICs doesn't + change it because OVS ignores random MACs. + + If you want a stable MAC and datapath-id, you could set your own MAC + by ``hwaddr`` in ``other_config`` of bridge. + + :: + + ovs-vsctl set bridge br-int other_config:hwaddr=3a:4d:a7:05:2a:45