Project import generated by Copybara. GitOrigin-RevId: 47ea7547f4f18eee2960435f7d4abb01e06c9b59
diff --git a/build_scripts/build_all.sh b/build_scripts/build_all.sh index 32edba4..6ef4530 100755 --- a/build_scripts/build_all.sh +++ b/build_scripts/build_all.sh
@@ -4,13 +4,7 @@ top_dir=$(readlink -e $(dirname $0)/../../) -# Plan to support different brezza board: -# brezza-p1: 2022/08 -# brezza-p2: 2022/10 -# brezza-b1: 2023/01 -# brezza-b3: 2023/04 -# brezza-b4: 2023/05 -declare -A PRODUCT_LIST=([sirocco]="sirocco-p1 sirocco-b1 sirocco-b3 sirocco-b4" [brezza]="brezza-p0 brezza-p1 brezza-p2 brezza-b1 brezza-b3 brezza-b4") +declare -A PRODUCT_LIST=([sirocco]="sirocco-p1 sirocco-b1 sirocco-b3 sirocco-b4" [brezza]="brezza-p0 brezza-p1 brezza-b1 brezza-b3 brezza-b4") function Help() { echo "Usage: $0 <eureka_workspace> <product/board> [optional build number] [other options]"
diff --git a/qca-nss-dp/nss_dp_main.c b/qca-nss-dp/nss_dp_main.c index dea8c05..f9607de 100644 --- a/qca-nss-dp/nss_dp_main.c +++ b/qca-nss-dp/nss_dp_main.c
@@ -809,7 +809,6 @@ uint8_t *maddr; struct nss_dp_dev *dp_priv; struct resource memres_devtree = {0}; - uint32_t is_wan_interface; dp_priv = netdev_priv(netdev); @@ -818,17 +817,13 @@ return -EFAULT; } - if (of_property_read_u32(np, "is_wan", &is_wan_interface)) { - pr_err("%s: error reading is_wan\n", np->name); - return -EFAULT; - } - /* - * Name WAN/LAN interfaces as per hint from DTSI + * change interface 1 name to wan0 + * change interface 2 name to lan0 */ - if (is_wan_interface) { + if (dp_priv->macid == 1) { strcpy(netdev->name, "wan0"); - } else { + } else if (dp_priv->macid == 2) { strcpy(netdev->name, "lan0"); }
diff --git a/qca-nss-ecm/ecm_interface.c b/qca-nss-ecm/ecm_interface.c index 2bc862d..7058f15 100644 --- a/qca-nss-ecm/ecm_interface.c +++ b/qca-nss-ecm/ecm_interface.c
@@ -1,7 +1,7 @@ /* ************************************************************************** * Copyright (c) 2014-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -2579,6 +2579,7 @@ case ECM_DB_IFACE_TYPE_GRE_TUN: case ECM_DB_IFACE_TYPE_GRE_TAP: case ECM_DB_IFACE_TYPE_VXLAN: + case ECM_DB_IFACE_TYPE_IPSEC_TUNNEL: if (src_dev) { *mtu = src_dev->mtu; } else { @@ -3202,6 +3203,22 @@ #endif type_info.ipsec_tunnel.os_specific_ident = dev_interface_num; + /* + * Override the MTU size in the decap direction in case of IPSec tunnel. + * This will apply to IPsec->WAN rule. + * TODO: Move this override to accelerate function. + */ + if (ip_hdr(skb)->version == IPVERSION) { + if ((ip_hdr(skb)->protocol == IPPROTO_ESP) || + ((ip_hdr(skb)->protocol == IPPROTO_UDP) && + (udp_hdr(skb)->dest == htons(4500)))) { + dev_mtu = ECM_DB_IFACE_MTU_MAX; + } + } else { + if (ipv6_hdr(skb)->nexthdr == IPPROTO_ESP) { + dev_mtu = ECM_DB_IFACE_MTU_MAX; + } + } ii = ecm_interface_ipsec_tunnel_interface_establish(&type_info.ipsec_tunnel, dev_name, dev_interface_num, ae_interface_num, dev_mtu); if (ii) {
diff --git a/qca-nss-ecm/examples/ecm_sfe_l2.c b/qca-nss-ecm/examples/ecm_sfe_l2.c index b69df5a..dd64653 100644 --- a/qca-nss-ecm/examples/ecm_sfe_l2.c +++ b/qca-nss-ecm/examples/ecm_sfe_l2.c
@@ -155,6 +155,7 @@ tuple->dest_addr, tuple->dest_port, tuple->protocol); if (!rule) { spin_unlock_bh(&ecm_sfe_l2_policy_rules_lock); + pr_warn("No rule with this tuple\n"); goto done; } direction = rule->direction; @@ -174,6 +175,7 @@ if (!rule) { spin_unlock_bh(&ecm_sfe_l2_policy_rules_lock); + pr_warn("No rule with this tuple\n"); goto done; } direction = rule->direction; @@ -294,7 +296,7 @@ spin_unlock_bh(&ecm_sfe_l2_policy_rules_lock); kfree(rule); - pr_debug("rule deleted\n"); + pr_info("rule deleted\n"); return true; } @@ -310,7 +312,7 @@ rule = ecm_sfe_l2_policy_rule_find(ip_ver, sip_addr, sport, dip_addr, dport, protocol); if (rule) { if (rule->direction != direction) { - pr_debug("Update direction of the rule from %d to %d\n", rule->direction, direction); + pr_info("Update direction of the rule from %d to %d\n", rule->direction, direction); rule->direction = direction; } spin_unlock_bh(&ecm_sfe_l2_policy_rules_lock); @@ -339,7 +341,7 @@ list_add(&rule->list, &ecm_sfe_l2_policy_rules); spin_unlock_bh(&ecm_sfe_l2_policy_rules_lock); - pr_debug("rule added\n"); + pr_info("rule added\n"); return true; } @@ -386,13 +388,13 @@ */ fields = cmd_buf; while ((token = strsep(&fields, " "))) { - pr_debug("\ntoken: %s\n", token); + pr_info("\ntoken: %s\n", token); option = strsep(&token, "="); value = token; - pr_debug("\t\toption: %s\n", option); - pr_debug("\t\tvalue: %s\n", value); + pr_info("\t\toption: %s\n", option); + pr_info("\t\tvalue: %s\n", value); if (!strcmp(option, "cmd")) { if (sscanf(value, "%d", &cmd)) {
diff --git a/qca-nss-sfe/sfe_ipv4_udp.c b/qca-nss-sfe/sfe_ipv4_udp.c index ec3b2e9..4b15f7c 100644 --- a/qca-nss-sfe/sfe_ipv4_udp.c +++ b/qca-nss-sfe/sfe_ipv4_udp.c
@@ -3,7 +3,7 @@ * Shortcut forwarding engine - IPv4 UDP implementation * * Copyright (c) 2013-2016, 2019-2020, The Linux Foundation. All rights reserved. - * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -263,7 +263,7 @@ * If our packet is larger than the MTU of the transmit interface then * we can't forward it easily. */ - if (unlikely((len > cm->xmit_dev_mtu) && (!cm->up))) { + if (unlikely(len > cm->xmit_dev_mtu)) { sfe_ipv4_sync_status(si, cm->connection, SFE_SYNC_REASON_STATS); rcu_read_unlock(); sfe_ipv4_exception_stats_inc(si, SFE_IPV4_EXCEPTION_EVENT_UDP_NEEDS_FRAGMENTATION);
diff --git a/qca-nss-sfe/sfe_ipv6.c b/qca-nss-sfe/sfe_ipv6.c index 5b610dd..9670c7e 100644 --- a/qca-nss-sfe/sfe_ipv6.c +++ b/qca-nss-sfe/sfe_ipv6.c
@@ -3,7 +3,7 @@ * Shortcut forwarding engine - IPv6 support. * * Copyright (c) 2015-2016, 2019-2020, The Linux Foundation. All rights reserved. - * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -1536,7 +1536,7 @@ reply_cm->top_interface_dev = NULL; #ifdef SFE_GRE_TUN_ENABLE - if ((IPPROTO_GRE == tuple->protocol) && !(reply_cm->flags & SFE_IPV6_CONNECTION_MATCH_FLAG_PASSTHROUGH)) { + if (!(reply_cm->flags & SFE_IPV6_CONNECTION_MATCH_FLAG_PASSTHROUGH)) { rcu_read_lock(); reply_cm->proto = rcu_dereference(inet6_protos[tuple->protocol]); rcu_read_unlock();
diff --git a/qca-nss-sfe/sfe_ipv6_udp.c b/qca-nss-sfe/sfe_ipv6_udp.c index 74802eb..445b43f 100644 --- a/qca-nss-sfe/sfe_ipv6_udp.c +++ b/qca-nss-sfe/sfe_ipv6_udp.c
@@ -3,7 +3,7 @@ * Shortcut forwarding engine file for IPv6 UDP * * Copyright (c) 2015-2016, 2019-2020, The Linux Foundation. All rights reserved. - * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -269,7 +269,7 @@ * If our packet is larger than the MTU of the transmit interface then * we can't forward it easily. */ - if (unlikely((len > cm->xmit_dev_mtu) && (!cm->up))) { + if (unlikely(len > cm->xmit_dev_mtu)) { sfe_ipv6_sync_status(si, cm->connection, SFE_SYNC_REASON_STATS); rcu_read_unlock();
diff --git a/qca-ssdk/src/hsl/phy/qca808x.c b/qca-ssdk/src/hsl/phy/qca808x.c index ee16b6f..4a6301a 100755 --- a/qca-ssdk/src/hsl/phy/qca808x.c +++ b/qca-ssdk/src/hsl/phy/qca808x.c
@@ -1,7 +1,6 @@ /* * Copyright (c) 2018-2019, 2021, The Linux Foundation. All rights reserved. - * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. - * + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the * above copyright notice and this permission notice appear in all copies. @@ -341,7 +340,7 @@ static int qca808x_config_aneg(struct phy_device *phydev) { - a_uint32_t advertise = 0, advertise_old = 0; + a_uint32_t advertise = 0; a_uint16_t phy_data = 0; int err = 0; a_uint32_t dev_id = 0, phy_id = 0; @@ -381,13 +380,8 @@ if(!(advertise & ~(FAL_PHY_ADV_PAUSE | FAL_PHY_ADV_ASY_PAUSE))) { return SW_BAD_VALUE; } - err |= qca808x_phy_get_autoneg_adv(dev_id, phy_id, &advertise_old); - - SSDK_DEBUG("advertise: 0x%x, advertise_old: 0x%x\n", advertise, advertise_old); - if(advertise != advertise_old) { - err |= qca808x_phy_set_autoneg_adv(dev_id, phy_id, advertise); - err |= qca808x_phy_restart_autoneg(dev_id, phy_id); - } + err |= qca808x_phy_set_autoneg_adv(dev_id, phy_id, advertise); + err |= qca808x_phy_restart_autoneg(dev_id, phy_id); } return err;
diff --git a/qca-ssdk/src/hsl/phy/qca808x_phy.c b/qca-ssdk/src/hsl/phy/qca808x_phy.c index bc109e6..43bb27a 100755 --- a/qca-ssdk/src/hsl/phy/qca808x_phy.c +++ b/qca-ssdk/src/hsl/phy/qca808x_phy.c
@@ -630,10 +630,8 @@ rv = qca808x_phy_reg_write(dev_id, phy_id, QCA808X_PHY_CONTROL, phy_data | QCA808X_CTRL_SOFTWARE_RESET); SW_RTN_ON_ERROR(rv); - /*the configure will lost when reset.*/ - if (qca808x_phy_2500caps(dev_id, phy_id) == A_TRUE) - rv = qca808x_phy_ms_seed_enable(dev_id, phy_id, A_TRUE); + rv = qca808x_phy_ms_seed_enable(dev_id, phy_id, A_TRUE); return rv; }