From patchwork Thu Oct 17 02:06:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hangbin Liu X-Patchwork-Id: 13839306 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) (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 EB6A91F16B; Thu, 17 Oct 2024 02:07:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729130825; cv=none; b=A4RHgDfcBpQ4PRB/F846CvnDTZ6G0jZlyQbbMJ4nJtX5p+kiW2GRlXm6MlwnP+u7ZaEfarvRVJ6DK3XkbfgSX3HyZu7sM0Sow+Xk9WCU8op2svgATUE9anxnXtkIHpHrfmQ0NdPFLzn+HNP+e9JxnPihjDSw+hwAEV4goPuzYT0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729130825; c=relaxed/simple; bh=dMmiM5MqFOe4YenaLoMKJ75vdQmoMXijc1eqvmoL9aw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GrBIB+5k0ahf1igFooC7ZaEmNmcsZfrZ7UAjejCpmWrvp4M4SZS+ifwkx/h6rP22DpL414TvS2B5BvOdhVkqqJeO22e3M9T3RYnUJAn4DidqaZZWecLnvMEJyE+D+t7FV0jPflwYWwUaN586YTF5UMSdynNHeaLFDcmvortfUQ0= 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=JsFSMool; arc=none smtp.client-ip=209.85.215.180 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JsFSMool" Received: by mail-pg1-f180.google.com with SMTP id 41be03b00d2f7-7e6d04f74faso279164a12.1; Wed, 16 Oct 2024 19:07:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729130822; x=1729735622; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gXwhn/Akck4TY2SECOzkvt4kvX/uUN/prTBlY3O1OVs=; b=JsFSMoolnJPn0YU4tLkTiH8V8v1G/FVUuCLVK7lWj5rm20iuCuqAjWgheIJuushIaD IMMx99dd5qZ/JqOq4634R46geSWU/o1ARDk/M6cVLRqOWEStdW1VeEiEDJ1AtOeUovjp GhImP4HGBDeHZ3q8Y41Z+6teGr49UHPM1+mJYg01hn95o+siMBbXaWyRecoaHMuxhJdi 2RImJlmJmbhUlQ0Y9GGfHAQOUfz/WHyHNDxG7Kg64J/C712pYgwMHy57dV6XrDVc2Jfj gF+jJxg+8p+DxUv98/5Lsg0JPFVHCdc7yw+3H3+38K9Oi0wI7R2B5rJToCP1I0W6H6C6 +8jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729130822; x=1729735622; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gXwhn/Akck4TY2SECOzkvt4kvX/uUN/prTBlY3O1OVs=; b=LJgsuJwbVjQQ9ihm1E2urz//XXrYgfT5ss6yjpG+B8zlQsHdhAoAlsqjHeRs0Vqhbo MQ1AaQAxAiPka6kav7wY7i21Ngq/qCahU6uBGs1xc2iJ3zxFP4Qg3kDsCd/so3o7Pswi Z07WUympmGg5Ocr1l6CqcDVfy3YLVTvrLfhb7qloMeLcWGuld91AUZnuKApXIVqGgfvE eRmIjrUnlxN/e6lkTRlMSoixZurxm30d9G34Siey2oaKaONcZEjLiYQ9lkqDawC3g9as 96mOjejlKBXBseYrxJLbghg+D8nW4wvs1okJ9MlAj3kLtHny8Uw/vPTVOeEpvWr8Re7E ASXw== X-Forwarded-Encrypted: i=1; AJvYcCVcNxGuBar1n0s5GA+/4JuhYmr5grIjphieeUS2/GAgdYlWYyXXHJXpYBE/phF3NcFAm5c=@vger.kernel.org, AJvYcCX0HjExiqNLJofBJyZHFAfkYS/e9A/Gb9tqPE/aRX/wVZ02smz+sBtoyG8lTt76zITA+JFA3iAKuTL4B6qY@vger.kernel.org, AJvYcCXvmgWlIArVOuYxW+Uzrj45vEcb8T+l84WlqQvvqALyMdeBvjU1/MnYITgfMZBQPM/JbaLqM3hqn36R@vger.kernel.org X-Gm-Message-State: AOJu0YyrgoR/vfHauR3gxKLNzbdYFcowU8dhhwItfCdOwbT1YuT0jh9o 8J7cVWgk8ZLAX0gWIyM/5P2PhtqVUXkIFV4GPaqCa4AeYjIuHvcU6RWfAF9MnnQ= X-Google-Smtp-Source: AGHT+IHJMIvufmvV9n43VlBMS5SO43jhbf5L+U6H7rNLnMyM6ytxt2D0IVQS1NM4FA2yuo8j6S3FvQ== X-Received: by 2002:a05:6a20:3944:b0:1ce:d403:612d with SMTP id adf61e73a8af0-1d91c6b6e8emr2081270637.13.1729130822111; Wed, 16 Oct 2024 19:07:02 -0700 (PDT) Received: from fedora.dns.podman ([43.228.180.230]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7ea9c868ef6sm3343225a12.65.2024.10.16.19.06.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 19:07:01 -0700 (PDT) From: Hangbin Liu To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Jiri Pirko , Sebastian Andrzej Siewior , Lorenzo Bianconi , Andrii Nakryiko , Jussi Maki , Jay Vosburgh , Andy Gospodarek , Jonathan Corbet , Andrew Lunn , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, Hangbin Liu , Nikolay Aleksandrov Subject: [PATCHv2 net-next 1/3] bonding: return detailed error when loading native XDP fails Date: Thu, 17 Oct 2024 02:06:36 +0000 Message-ID: <20241017020638.6905-2-liuhangbin@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241017020638.6905-1-liuhangbin@gmail.com> References: <20241017020638.6905-1-liuhangbin@gmail.com> Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Bonding only supports native XDP for specific modes, which can lead to confusion for users regarding why XDP loads successfully at times and fails at others. This patch enhances error handling by returning detailed error messages, providing users with clearer insights into the specific reasons for the failure when loading native XDP. Reviewed-by: Nikolay Aleksandrov Signed-off-by: Hangbin Liu Reviewed-by: Toke Høiland-Jørgensen --- drivers/net/bonding/bond_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index b1bffd8e9a95..f0f76b6ac8be 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -5676,8 +5676,11 @@ static int bond_xdp_set(struct net_device *dev, struct bpf_prog *prog, ASSERT_RTNL(); - if (!bond_xdp_check(bond)) + if (!bond_xdp_check(bond)) { + BOND_NL_ERR(dev, extack, + "No native XDP support for the current bonding mode"); return -EOPNOTSUPP; + } old_prog = bond->xdp_prog; bond->xdp_prog = prog; From patchwork Thu Oct 17 02:06:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hangbin Liu X-Patchwork-Id: 13839307 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) (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 5033B1F16B; Thu, 17 Oct 2024 02:07:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729130832; cv=none; b=S2omgaAR/kl582e9Ial0hc+XaC7ZHgA9JLt+phz4sX2yW71E2InMxGGD5q2EQ4HQlSWR9BOHg6asP41y4Ex3uD8jag3yw4R/ARtIRvW55VzPfjSMfNMaInpz07vk8zkqDnrNqHoucU2vjfBwnmyU4w/XPK0RdyfradNFvdH6yVg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729130832; c=relaxed/simple; bh=1jK1zqbxXZ+IbcwlEzbn+aILTiHmg3l0M8DzNP6zKk0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KGu04cRyepj5VR0wUAGA9TfYmVXPqf+622jBEIGN5swHSjYE2IDnJnUgAHpKQdTBMk+klWdIAvn/AzuT8HLR0kQJdmWF9ibVp33Bnk7YNAV7b8qw8mFJoUFmLEOMJnUw4tLAJ2bSbsk36njD3AW5HV+YtaoGbWwMVQUI1wgNKnM= 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=R+pqMI1j; arc=none smtp.client-ip=209.85.214.169 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="R+pqMI1j" Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-20cbcd71012so4076965ad.3; Wed, 16 Oct 2024 19:07:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729130828; x=1729735628; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4iCKLUisoAifEvpM04td+f/cHzG6MtlISMkh2YpMB3M=; b=R+pqMI1jHqk9sagMD0SXtt3A9mjf47EDvwXKCYjaeTfeU5w2vPWQ0o1T6tIt/awNZm 8rflw6NYIkFApFZg4lIH/duE9cQ+yarov7DsATQ8g55+QbkEunAV4n/tS0zXTAN0kqs6 Q9JLHFpVgrhBWlg7DNVRPYq06DBuKXfINVQSC7SVniGYCPh5G80owPnpAPt6M/NdvJRQ riL+tI7jfzoXGpAKUU+kDejGxjBnlHmvKOIMefqj0lnXh5A3eb8hgCPtDkPvdMO5dxhh kqra2Ybv27dhEv8XHG+LCVYR4f5+lbQajGSaYil1RDzQS4m0+qixoAuvpZRt5Kn/A1RR FI9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729130828; x=1729735628; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4iCKLUisoAifEvpM04td+f/cHzG6MtlISMkh2YpMB3M=; b=YobEiux/wxQJccQcvhuv5TjSUMAyOXhgDBYITC4J0fCBLxE3BUYWMJ9U5d5PB0O0A6 IUBBN2xVkAi8fXsrHP7YJavBUSkoaxDyEiC6K8ko30u+nsSGX+ivA0AXok16ursKxQRT 6YtxAVJo8tWuMc+PvFD3FjJUT1H5EZBpAjlicXTcZK5zHF8/tI0Yhkn7+n3x2MG6gss+ iSQI21GfQWfNjnen9gWudt+lYurQQWBh674B2Sp9iwJV9xdgF/YAXBmrtZga7EHqgtPC ajTNZGzUGlHSxGuSYW7Ovph4VZ/EA8aGNEcmwwLpWGzvZAYrseyPIOStz8+Ogx/WE8dc xkqw== X-Forwarded-Encrypted: i=1; AJvYcCWgb8ciPdiYZGzJodIbas8e0YDc/gQ9SvPWuaeBbN6zDUdCalDfLFMgfnoPGqTZz7XtSb0v3ZTEhXBpPq6g@vger.kernel.org, AJvYcCXTgQD6ycCggiw3rjKJORBpEVcNt2T64msiyzbrdfEpzZzE2qFPy+aTm0oKI12sUabMwVonmiQn6WJj@vger.kernel.org, AJvYcCXYrpwtXFKdjkAgMiAXldBdJhi3h4LDKreOhFTJDa283/OAnSR5zgPYX0gJp5Uzf1tjWME=@vger.kernel.org X-Gm-Message-State: AOJu0Yxl3MBppPNCwSFmDmDWzl53cJpUyQKcGG8El9rXTaI5XDG8Y7fN obiQr3ZtdMaofytgD1Tkh9q0GyBhszYqebAkZSpS+yD9jDc1N/BLJf8XLggTRoA= X-Google-Smtp-Source: AGHT+IH8fYeJPsFWMnhDriYvegqE4QYm5mP/9UxGP9jvwBRKWAaWB6e272bXsdk5KFBueqfDqzn8dQ== X-Received: by 2002:a17:903:32c1:b0:20c:9d79:cf82 with SMTP id d9443c01a7336-20cbb2af58dmr215818485ad.58.1729130828441; Wed, 16 Oct 2024 19:07:08 -0700 (PDT) Received: from fedora.dns.podman ([43.228.180.230]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7ea9c868ef6sm3343225a12.65.2024.10.16.19.07.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 19:07:08 -0700 (PDT) From: Hangbin Liu To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Jiri Pirko , Sebastian Andrzej Siewior , Lorenzo Bianconi , Andrii Nakryiko , Jussi Maki , Jay Vosburgh , Andy Gospodarek , Jonathan Corbet , Andrew Lunn , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, Hangbin Liu , Nikolay Aleksandrov Subject: [PATCHv2 net-next 2/3] bonding: use correct return value Date: Thu, 17 Oct 2024 02:06:37 +0000 Message-ID: <20241017020638.6905-3-liuhangbin@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241017020638.6905-1-liuhangbin@gmail.com> References: <20241017020638.6905-1-liuhangbin@gmail.com> Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org When a slave already has an XDP program loaded, the correct return value should be -EEXIST instead of -EOPNOTSUPP. Fixes: 9e2ee5c7e7c3 ("net, bonding: Add XDP support to the bonding driver") Reviewed-by: Nikolay Aleksandrov Signed-off-by: Hangbin Liu --- drivers/net/bonding/bond_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index f0f76b6ac8be..6887a867fe8b 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -5699,7 +5699,7 @@ static int bond_xdp_set(struct net_device *dev, struct bpf_prog *prog, if (dev_xdp_prog_count(slave_dev) > 0) { SLAVE_NL_ERR(dev, slave_dev, extack, "Slave has XDP program loaded, please unload before enslaving"); - err = -EOPNOTSUPP; + err = -EEXIST; goto err; } From patchwork Thu Oct 17 02:06:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hangbin Liu X-Patchwork-Id: 13839308 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.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 2D14213B286; Thu, 17 Oct 2024 02:07:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729130836; cv=none; b=Eor2sF2TjgvzsodPSaEFoXp4HLx0+6xLuSFc4wj+DudSsgcl3mzdARMJAafpsO6H5qG7rjnQcF1AjtBF2OF8tXjT58R5qanaA8UAhsYp7DJkdBjAee87tcoz6BuTq9nKcOsETMz9sqrgnQ+5XXnmLIQx8icv/pmH6sDjZ9wNYVo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729130836; c=relaxed/simple; bh=kWHMkhXoFbE4zr3LNeKQaz/w1kf90KGzTz5eV1SXGb4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CjXhY2PUbsaF5NKrdUuVo/GQ/K6ghEZuGdZqZsE5FAwILoIcgy/MepNbZdYKMdZL0qKlZFtxcUYWUsEadXheqZaIsnuVZPpJzFMKoIHJgHxOfCiuGz9elrQ/r5VqTd+cB9LOGiKlCh8Ld2BJ9pO3kiJo0RjgSbrVvbZs9lrMuAw= 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=Tja51A7Y; arc=none smtp.client-ip=209.85.210.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Tja51A7Y" Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-71e57d89ffaso320897b3a.1; Wed, 16 Oct 2024 19:07:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729130834; x=1729735634; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BlKv0iAW/kK+YzP9Z5U8UE3V4EU3m7I9KuWjM6JEtBQ=; b=Tja51A7YqLPHyHAlihr9RTWti4RCK6yJGfgwDbabutX0LczeiwLJxxiDzdDkqzXfZg F/ntUjLfX9pKQFLf9AmKO7pTA4EdNWUjHfnxp/qRLWVLIxGBE6QEcH3vKEC0kODQwxeC f+YKyG71FqHErcJBsZQIgFxUIqZr0PyOPHzUSSvzuCLzbEP/UIuBTzK5PPkSlpv9/D7m 05JagDTgQK1W1w6lD4YFARITfsa7fGQy1w/bcsyyzIf7AFt2HYj58J3MxKy9CkDuD9YI QSTkiRR7kg9lxWvoHgW0OZm8DH6iu/b1HpM/HJWtCbcyBjetRGLmedlO56EVu9xs2Uqj 5NLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729130834; x=1729735634; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BlKv0iAW/kK+YzP9Z5U8UE3V4EU3m7I9KuWjM6JEtBQ=; b=MV/ych3qs1uQpXPo/NZKhqFiw+fYWrbYdC1PD1Mcr0jMUARY9t4b4jfgC30GAWgTvm eGOIw4dn8ej0W1MABNNZbscC9Ct/N5in4piurIkbAdHUhp8jzlQSpQ9sfTg6FXn2K7SV jWSZveSyfbpc4Emhx/wWXUe8nKXoYVKf4nWTXwQ3dP6l/EkQ3wvSLqRF+nAlQtPrhOkp wOyw677SFrUCZMo4hcBCa9bpVqzAQ76U23CzwZix3HPwZbzbc1XhdQGUfTf1PXHFPYeF nulZfXJl174XdbcWOmsqUf43ilTVF4wFrnLQ1A8ckcUyIayGcIqnnRRO6LAU6oNczDNm oXng== X-Forwarded-Encrypted: i=1; AJvYcCV8Q5fXeSDf71f/YTATK60pbnMatj9po2IPNbv2I4lzWDpH3FgBRXdPRKGir0f1ChWccTo=@vger.kernel.org, AJvYcCVzbFmFPdYH+akpA8tKLqxGxoYcYUGgSAfOWkCP5YwZ3Aul2085C17Ozh3fY/pKefN9UK5Y23fJcLtw@vger.kernel.org, AJvYcCWAks3HuOwB3w1ueECTutvX7cvtuCHWL4AtiFEFh+yjYrj2fzyBAts49jg8J5tcDbZI7jztV+z9xNXhUJB3@vger.kernel.org X-Gm-Message-State: AOJu0YybRdphDUVZ5L1zX3hFjCB2DO+qPfnUKjrK6NzmPMP1LLYFqExd gu1YLJfisyaY2+vSeLJZXFjg9wY6UmK5SMqI/bwEzThAF/Xan8ou4+sSRYZ7SNw= X-Google-Smtp-Source: AGHT+IFF8AOLqYg1TLhhDr0ve9D9Z/luocW4qHrkLB3OZqIC5lPqy4Em44Icdw5lqY9BHs2Kln/bJQ== X-Received: by 2002:a05:6a00:4b53:b0:71e:44f6:6900 with SMTP id d2e1a72fcca58-71e44f66bc4mr26538922b3a.16.1729130834222; Wed, 16 Oct 2024 19:07:14 -0700 (PDT) Received: from fedora.dns.podman ([43.228.180.230]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7ea9c868ef6sm3343225a12.65.2024.10.16.19.07.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 19:07:14 -0700 (PDT) From: Hangbin Liu To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Jiri Pirko , Sebastian Andrzej Siewior , Lorenzo Bianconi , Andrii Nakryiko , Jussi Maki , Jay Vosburgh , Andy Gospodarek , Jonathan Corbet , Andrew Lunn , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, Hangbin Liu Subject: [PATCHv2 net-next 3/3] Documentation: bonding: add XDP support explanation Date: Thu, 17 Oct 2024 02:06:38 +0000 Message-ID: <20241017020638.6905-4-liuhangbin@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241017020638.6905-1-liuhangbin@gmail.com> References: <20241017020638.6905-1-liuhangbin@gmail.com> Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Add document about which modes have native XDP support. Signed-off-by: Hangbin Liu Reviewed-by: Nikolay Aleksandrov --- Documentation/networking/bonding.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Documentation/networking/bonding.rst b/Documentation/networking/bonding.rst index e774b48de9f5..5c4a83005025 100644 --- a/Documentation/networking/bonding.rst +++ b/Documentation/networking/bonding.rst @@ -2916,6 +2916,18 @@ from the bond (``ifenslave -d bond0 eth0``). The bonding driver will then restore the MAC addresses that the slaves had before they were enslaved. +9. What bonding modes support native XDP? +------------------------------------------ + +Currently, only the following bonding modes support native XDP: + * balance-rr (0) + * active-backup (1) + * balance-xor (2) + * 802.3ad (4) + +Note that the vlan+srcmac hash policy does not support native XDP. +For other bonding modes, the XDP program must be loaded with generic mode. + 16. Resources and Links =======================