Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1216243rbb; Mon, 26 Feb 2024 02:27:13 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVGTp3i1/OfMiTwRY38YT7HeDBvoVN48DDQf98DSCTIRrY0gV8quCKxbaT2MMknAkY0J7zmRLcWqgCc/1FKBYvYWm83FiLQh8bGaK0WIg== X-Google-Smtp-Source: AGHT+IE5847e2x9tHdjuUC6I17eqxhXDqfvyoETAbwAS7+aXkjchJDSwptvhWg5YVe32riLyRNvk X-Received: by 2002:aa7:d384:0:b0:565:b361:ad95 with SMTP id x4-20020aa7d384000000b00565b361ad95mr3395913edq.32.1708943232939; Mon, 26 Feb 2024 02:27:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708943232; cv=pass; d=google.com; s=arc-20160816; b=JCxfDLSISq6/R4NP3UWUxyzcrlZDDJwmBE0cUaUw+CSpq8NhvdCR+tm/e41PXLQKGN igiVq1FNcbY21th6q2IaDZc1hxp2nLGBSwkZy7/znFnA7L3JvaUIzu/h0S8aCkKxfldj FxhwrwlluIzhMfXI9ireyvjQudZTAHo8EOJ3EblDwdTMuKnO/Q+c5G4q/MtMy/LF3CoU f22QQGs0Mi+U0fLkYnJk22TjWOt7R7h7IigvI7zRtUYd8ntNWfNPvKyK9Lyyw4nyJd0Z 23KqTilShh3yAWAX27l2VzhfrWu3nSZ7J+3p47/m3IBXX6rVn7JyIR/yXdMO2wSekNEK t3lw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=KmvSrMWGTpoTLX2/mgE51mXymfz8MKqe8Izfo4yIEPo=; fh=CI7+QhGdHU6hK1wC8vI9JJjrK9GH36VSrSZJQjeaUvU=; b=ZK4ogDUma3PR4TH5CTFtJOVvvinS1Cq6X/pMJkXciJMOglmOAXGoJ65hCPQMSvFAIj VtY2HQ6WdAjR3GvtnmL+F3pBY/w+iSzX4iS2yF70dyxLAfDK6dcg9MjE/WV98nxybP8j RwTgNkbDwKqUSXHBOgL545PdIyyPvuUyL2tLWrxuKJzFGTrpNIekKJcHsNXIg6nreo5K UC0htWd7Scnv5GnIOhWO84INXO9oKVOI3hf7R4kuhT8DIjvZf6agbTCdO4CHwhTMEznP NHKc0JDAfou8aPXgo5a0YKTZimddFag6Te0XngjwKRxt6luDS94WD+Rt/6wwrzKwxmCQ 87QA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=K76OoFLd; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-81132-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81132-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id t22-20020a508d56000000b00565b4b96305si1704367edt.124.2024.02.26.02.27.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 02:27:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81132-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=K76OoFLd; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-81132-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81132-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6FB991F265BA for ; Mon, 26 Feb 2024 10:25:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3AA4658234; Mon, 26 Feb 2024 10:08:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="K76OoFLd" Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D7685813E; Mon, 26 Feb 2024 10:08:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708942107; cv=none; b=o1e4RFE1fJtUBIzPB2gn0fBx/NKtPf1H4AonHZWaJ1Ca1ygQJplkROK0lXJEl6GB/hvnyXWUEe82dbR1rY1HMWtxCCVa5gGakx8VH5z6EeVs4ZlifqvpVN9rEHdV5mUko+5zBzjl+hzJTsv0uwwxOi/5smQVYwUQRH3XJMotYlw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708942107; c=relaxed/simple; bh=lwjbu1Q0/9loDrm+iJepXM7M1HSx/bbkPALcAKCv0Dk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GbjwDEBfuuTnQuHZkQnIb++/Jbx27noFZEVP1Eq4uwVI/nglfeLJ4VKDuEk7/GKdag66DxtWKOm7Y+4IRc3+gnpZwCEGx0El54e0cCPMlC77zvqDS1YQ8tkK650TVV2TlNzBGMSxL+YyTal2DXO4h12V6mmBMv7Me+7EKVgoyLU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=K76OoFLd; arc=none smtp.client-ip=209.85.214.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-1dc98892850so8749385ad.0; Mon, 26 Feb 2024 02:08:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708942105; x=1709546905; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=KmvSrMWGTpoTLX2/mgE51mXymfz8MKqe8Izfo4yIEPo=; b=K76OoFLdKUGGFyDopkci0kJsRRPk6pPseO1p5d0hwd2nHfzBHBHXHGTIbx+OwrJz54 GJ7Eu7q/dzXY/Cy4LkSKcgIQzhlFglj2eGDR1VZ9IaR0VONkXqJdhSX+mXozzEowf/FL m9hU7BMAr+RHXdm4C5wwQEZVj1QvyIZbLA3+vnw/0akP1cUiCOOmPSXlFF0avmt50zFL bn/QpXO362pmziDyMrYitgR0nZJ5UdxxQgShBm/ne3dn5XyYfltsUoWDt1qF4i6mtNQr THjth+ji6oz7aSLC+LOA/0k73WHlFbiuNrCBxUBqFHiwIhvEHqrYKdK8hBvxI6ffOZUw 0Hlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708942105; x=1709546905; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KmvSrMWGTpoTLX2/mgE51mXymfz8MKqe8Izfo4yIEPo=; b=r9ufh98BYHhMjBsc7qE0zP0osPf9ZZ+tozMYl3ZVdunRnRwQ+YFR6ecfHqAjfZuQ5t Ggy5awCeHUTndZ28ai73XzuxDLLbhXlD5wxfducPtE9fuiBZRDiKtXo4cB+NXrCD4NXl aaXTf8RGEJTZWqt+srH1mRL5YW4ZK4P36bGdLiKFBPyVD+QRMXTVQN/qVIKdZeSvmKBm bTUUa1UE/n28VfW8Ov/CHVUSwt8g9S7vx0ks7n8uCqp6Ix+jUMK3ZpTF5u4/avMMgDBC 68YaoX3AD6jKNG5VtPajm1iIaAwXEJyEz3n8BqRVwxV9vbUx7BlWnAoqLTHOcFw4kX49 WNlQ== X-Forwarded-Encrypted: i=1; AJvYcCXm/1pws5utxW664X0nuUaalSCYroS9o8j/7T8RlsamWZ2FJZmpfZwgFjXHrE/WaMmPiUorTTgh6TCpKY81MfhLT7skNSjcYZAdhcZ16tzaytTGCJiHS1IEXDfQNtBlJLN6n1dKIWS/ X-Gm-Message-State: AOJu0YzXkCUrRCW0oSb5ohvhugLhizYbUKkq8ip9CuNxcd7OYEM7ibOu c1SuhPkXKpmVV8tAVmRqKJyDpSdvzwemmxhsVU6n9oDjWYGZQy9V X-Received: by 2002:a17:902:efd6:b0:1dc:affa:5f6c with SMTP id ja22-20020a170902efd600b001dcaffa5f6cmr278239plb.2.1708942105288; Mon, 26 Feb 2024 02:08:25 -0800 (PST) Received: from Laptop-X1 ([43.228.180.230]) by smtp.gmail.com with ESMTPSA id ji22-20020a170903325600b001dc23e877bfsm3578580plb.268.2024.02.26.02.08.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 02:08:24 -0800 (PST) Date: Mon, 26 Feb 2024 18:08:19 +0800 From: Hangbin Liu To: Jones Syue =?utf-8?B?6Jab5oe35a6X?= Cc: "netdev@vger.kernel.org" , "j.vosburgh@gmail.com" , "andy@greyhouse.net" , "davem@davemloft.net" , "edumazet@google.com" , Jakub Kicinski , "pabeni@redhat.com" , "corbet@lwn.net" , Jiri Pirko , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH net-next v3] bonding: 802.3ad replace MAC_ADDRESS_EQUAL with __agg_has_partner Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Mon, Feb 26, 2024 at 02:24:52AM +0000, Jones Syue 薛懷宗 wrote: > Replace macro MAC_ADDRESS_EQUAL() for null_mac_addr checking with inline > function__agg_has_partner(). When MAC_ADDRESS_EQUAL() is verifiying nit: function __agg_has_partner() > aggregator's partner mac addr with null_mac_addr, means that seeing if > aggregator has a valid partner or not. Using __agg_has_partner() makes it > more clear to understand. > > In ad_port_selection_logic(), since aggregator->partner_system and > port->partner_oper.system has been compared first as a prerequisite, it is > safe to replace the upcoming MAC_ADDRESS_EQUAL() for null_mac_addr checking > with __agg_has_partner(). > > Delete null_mac_addr, which is not required anymore in bond_3ad.c, since > all references to it are gone. > > Signed-off-by: Jones Syue Reviewed-by: Hangbin Liu