From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH net-next v5 03/11] igc: Add support for receiving frames with all zeroes address
Date: Thu, 19 May 2022 18:15:30 -0700 [thread overview]
Message-ID: <20220520011538.1098888-4-vinicius.gomes@intel.com> (raw)
In-Reply-To: <20220520011538.1098888-1-vinicius.gomes@intel.com>
The frame preemption verification (as defined by IEEE 802.3-2018
Section 99.4.3) handshake is done by the driver, the default
configuration of the driver is to only receive frames with the driver
address.
So, in preparation for that add a second address to the list of
acceptable addresses.
Because the frame preemption "disable verify" toggle only affects the
transmission of verification frames, this needs to always be enabled.
As that address is invalid, the impact in practical scenarios should
be minimal. But still a bummer that we have to do this.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
---
drivers/net/ethernet/intel/igc/igc.h | 2 ++
drivers/net/ethernet/intel/igc/igc_main.c | 7 +++++++
drivers/net/ethernet/intel/igc/igc_tsn.c | 7 +++++++
3 files changed, 16 insertions(+)
diff --git a/drivers/net/ethernet/intel/igc/igc.h b/drivers/net/ethernet/intel/igc/igc.h
index 1e7e7071f64d..31e7b4c72894 100644
--- a/drivers/net/ethernet/intel/igc/igc.h
+++ b/drivers/net/ethernet/intel/igc/igc.h
@@ -622,6 +622,8 @@ struct igc_nfc_rule *igc_get_nfc_rule(struct igc_adapter *adapter,
int igc_add_nfc_rule(struct igc_adapter *adapter, struct igc_nfc_rule *rule);
void igc_del_nfc_rule(struct igc_adapter *adapter, struct igc_nfc_rule *rule);
+int igc_enable_empty_addr_recv(struct igc_adapter *adapter);
+
void igc_ptp_init(struct igc_adapter *adapter);
void igc_ptp_reset(struct igc_adapter *adapter);
void igc_ptp_suspend(struct igc_adapter *adapter);
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index ae17af44fe02..bcbf35b32ef3 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -3586,6 +3586,13 @@ static int igc_uc_unsync(struct net_device *netdev, const unsigned char *addr)
return 0;
}
+int igc_enable_empty_addr_recv(struct igc_adapter *adapter)
+{
+ u8 empty[ETH_ALEN] = { };
+
+ return igc_add_mac_filter(adapter, IGC_MAC_FILTER_TYPE_DST, empty, -1);
+}
+
/**
* igc_set_rx_mode - Secondary Unicast, Multicast and Promiscuous mode set
* @netdev: network interface device structure
diff --git a/drivers/net/ethernet/intel/igc/igc_tsn.c b/drivers/net/ethernet/intel/igc/igc_tsn.c
index 0fce22de2ab8..270a08196f49 100644
--- a/drivers/net/ethernet/intel/igc/igc_tsn.c
+++ b/drivers/net/ethernet/intel/igc/igc_tsn.c
@@ -235,6 +235,13 @@ int igc_tsn_reset(struct igc_adapter *adapter)
unsigned int new_flags;
int err = 0;
+ /* Frame preemption verification requires that packets with
+ * the all zeroes MAC address are allowed to be received. Add
+ * the all zeroes destination address to the list of
+ * acceptable addresses.
+ */
+ igc_enable_empty_addr_recv(adapter);
+
new_flags = igc_tsn_new_flags(adapter);
if (!(new_flags & IGC_FLAG_TSN_ANY_ENABLED))
--
2.35.3
next prev parent reply other threads:[~2022-05-20 1:15 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-20 1:15 [Intel-wired-lan] [PATCH net-next v5 00/11] ethtool: Add support for frame preemption Vinicius Costa Gomes
2022-05-20 1:15 ` [Intel-wired-lan] [PATCH net-next v5 01/11] ethtool: Add support for configuring " Vinicius Costa Gomes
2022-05-20 9:06 ` Vladimir Oltean
2022-05-20 1:15 ` [Intel-wired-lan] [PATCH net-next v5 02/11] ethtool: Add support for Frame Preemption verification Vinicius Costa Gomes
2022-05-20 9:16 ` Vladimir Oltean
2022-05-20 1:15 ` Vinicius Costa Gomes [this message]
2022-05-20 1:15 ` [Intel-wired-lan] [PATCH net-next v5 04/11] igc: Set the RX packet buffer size for TSN mode Vinicius Costa Gomes
2022-05-20 1:15 ` [Intel-wired-lan] [PATCH net-next v5 05/11] igc: Optimze TX buffer sizes for TSN Vinicius Costa Gomes
2022-05-20 9:33 ` Vladimir Oltean
2022-05-20 1:15 ` [Intel-wired-lan] [PATCH net-next v5 06/11] igc: Add support for receiving errored frames Vinicius Costa Gomes
2022-05-20 9:19 ` Vladimir Oltean
2022-05-20 1:15 ` [Intel-wired-lan] [PATCH net-next v5 07/11] igc: Add support for enabling frame preemption via ethtool Vinicius Costa Gomes
2022-05-20 1:15 ` [Intel-wired-lan] [PATCH net-next v5 08/11] igc: Add support for setting frame preemption configuration Vinicius Costa Gomes
2022-05-20 9:22 ` Vladimir Oltean
2022-05-20 1:15 ` [Intel-wired-lan] [PATCH net-next v5 09/11] igc: Add support for Frame Preemption verification Vinicius Costa Gomes
2022-05-20 10:43 ` Vladimir Oltean
2022-05-27 9:08 ` Zhou Furong
2022-05-20 1:15 ` [Intel-wired-lan] [PATCH net-next v5 10/11] igc: Check incompatible configs for Frame Preemption Vinicius Costa Gomes
2022-05-20 6:11 ` kernel test robot
2022-05-20 11:06 ` Vladimir Oltean
2022-05-20 1:15 ` [Intel-wired-lan] [PATCH net-next v5 11/11] igc: Add support for exposing frame preemption stats registers Vinicius Costa Gomes
2022-05-20 12:13 ` Vladimir Oltean
2022-05-20 22:34 ` [Intel-wired-lan] [PATCH net-next v5 00/11] ethtool: Add support for frame preemption Jakub Kicinski
2022-05-21 15:03 ` Vladimir Oltean
2022-05-23 19:52 ` Jakub Kicinski
2022-05-23 20:32 ` Vladimir Oltean
2022-05-23 21:31 ` Jakub Kicinski
2022-05-23 22:49 ` Vladimir Oltean
2022-05-23 23:33 ` Vladimir Oltean
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220520011538.1098888-4-vinicius.gomes@intel.com \
--to=vinicius.gomes@intel.com \
--cc=intel-wired-lan@osuosl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox