This contains different fixes for lan966x in different areas like PTP, MAC,
Switchdev and IGMP processing.
Horatiu Vultur (4):
net: lan966x: Update lan966x_ptp_get_nominal_value
net: lan966x: Fix IGMP snooping when frames have vlan tag
net: lan966x: Fix when a port's upper is changed.
net: lan966x: Stop processing the MAC entry is port is wrong.
drivers/net/ethernet/microchip/lan966x/lan966x_mac.c | 6 ++++--
drivers/net/ethernet/microchip/lan966x/lan966x_main.c | 6 ++++++
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c | 8 ++++----
.../net/ethernet/microchip/lan966x/lan966x_switchdev.c | 3 +--
4 files changed, 15 insertions(+), 8 deletions(-)
--
2.33.0
The clk_per_cfg register represents the value added to the system clock
for each clock cycle. The issue is that the default value is wrong,
meaning that in case the DUT was a grandmaster then everone in the
network was too slow. In case there was a grandmaster, then there is no
issue because the DUT will configure clk_per_cfg register based on the
master frequency.
Fixes: d096459494a887 ("net: lan966x: Add support for ptp clocks")
Signed-off-by: Horatiu Vultur <[email protected]>
---
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c b/drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
index ae782778d6dd..0a1041da4384 100644
--- a/drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
+++ b/drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
@@ -29,10 +29,10 @@ enum {
static u64 lan966x_ptp_get_nominal_value(void)
{
- u64 res = 0x304d2df1;
-
- res <<= 32;
- return res;
+ /* This is the default value that for each system clock, the time of day
+ * is increased. It has the format 5.59 nanosecond.
+ */
+ return 0x304d4873ecade305;
}
int lan966x_ptp_hwtstamp_set(struct lan966x_port *port, struct ifreq *ifr)
--
2.33.0
In case an IGMP frame has a vlan tag, then the function
lan966x_hw_offload couldn't figure out that is a IGMP frame. Therefore
the SW thinks that the frame was already forward by the HW which is not
true.
Extend lan966x_hw_offload to pop the vlan tag if are any and then check
for IGMP frames.
Fixes: 47aeea0d57e80c ("net: lan966x: Implement the callback SWITCHDEV_ATTR_ID_BRIDGE_MC_DISABLED ")
Signed-off-by: Horatiu Vultur <[email protected]>
---
drivers/net/ethernet/microchip/lan966x/lan966x_main.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
index 1f8c67f0261b..958e55596b82 100644
--- a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
+++ b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
@@ -446,6 +446,12 @@ static bool lan966x_hw_offload(struct lan966x *lan966x, u32 port,
ANA_CPU_FWD_CFG_MLD_REDIR_ENA)))
return true;
+ if (eth_type_vlan(skb->protocol)) {
+ skb = skb_vlan_untag(skb);
+ if (unlikely(!skb))
+ return false;
+ }
+
if (skb->protocol == htons(ETH_P_IP) &&
ip_hdr(skb)->protocol == IPPROTO_IGMP)
return false;
--
2.33.0
Hello:
This series was applied to netdev/net.git (master)
by Jakub Kicinski <[email protected]>:
On Sat, 9 Apr 2022 20:41:39 +0200 you wrote:
> This contains different fixes for lan966x in different areas like PTP, MAC,
> Switchdev and IGMP processing.
>
> Horatiu Vultur (4):
> net: lan966x: Update lan966x_ptp_get_nominal_value
> net: lan966x: Fix IGMP snooping when frames have vlan tag
> net: lan966x: Fix when a port's upper is changed.
> net: lan966x: Stop processing the MAC entry is port is wrong.
>
> [...]
Here is the summary with links:
- [net,1/4] net: lan966x: Update lan966x_ptp_get_nominal_value
https://git.kernel.org/netdev/net/c/eb9c0d671e94
- [net,2/4] net: lan966x: Fix IGMP snooping when frames have vlan tag
https://git.kernel.org/netdev/net/c/6476f90aefaf
- [net,3/4] net: lan966x: Fix when a port's upper is changed.
https://git.kernel.org/netdev/net/c/d7a947d289dc
- [net,4/4] net: lan966x: Stop processing the MAC entry is port is wrong.
https://git.kernel.org/netdev/net/c/269219321eb7
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html