realtek: dsa: silence log noise on route offload
authorBjørn Mork <bjorn@mork.no>
Wed, 5 Feb 2025 06:27:02 +0000 (07:27 +0100)
committerSander Vanheule <sander@svanheule.net>
Tue, 25 Feb 2025 19:53:30 +0000 (20:53 +0100)
Adding a static IPv4 route made the driver repeatedly print

 rtl83xx_l3_nexthop_update: Setting up fwding: ip 192.168.1.42, GW mac 0000001b21a7xxxx
 Route with id 3 to 192.168.99.0 / 24
 rtl83xx_l3_nexthop_update: total packets: 0
 Warning: TEMPLATE_FIELD_RANGE_CHK: not configured

These messages are only useful to developers while debugging offloading.
Demote to debug level, which in general is more useful for developers
by allowing precise dynamic control.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Link: https://github.com/openwrt/openwrt/pull/17950
Signed-off-by: Sander Vanheule <sander@svanheule.net>
target/linux/realtek/files-6.6/drivers/net/dsa/rtl83xx/common.c
target/linux/realtek/files-6.6/drivers/net/dsa/rtl83xx/rtl930x.c
target/linux/realtek/files-6.6/drivers/net/dsa/rtl83xx/rtl931x.c

index fe0980a1beb82a9488545000f4a8d48f6cba4350..28b836f6b2fa856aee4810880038fe872448d03d 100644 (file)
@@ -813,12 +813,12 @@ static int rtl83xx_l3_nexthop_update(struct rtl838x_switch_priv *priv,  __be32 i
        }
 
        rhl_for_each_entry_rcu(r, tmp, list, linkage) {
-               pr_info("%s: Setting up fwding: ip %pI4, GW mac %016llx\n",
+               pr_debug("%s: Setting up fwding: ip %pI4, GW mac %016llx\n",
                        __func__, &ip_addr, mac);
 
                /* Reads the ROUTING table entry associated with the route */
                priv->r->route_read(r->id, r);
-               pr_info("Route with id %d to %pI4 / %d\n", r->id, &r->dst_ip, r->prefix_len);
+               pr_debug("Route with id %d to %pI4 / %d\n", r->id, &r->dst_ip, r->prefix_len);
 
                r->nh.mac = r->nh.gw = mac;
                r->nh.port = priv->port_ignore;
@@ -865,7 +865,7 @@ static int rtl83xx_l3_nexthop_update(struct rtl838x_switch_priv *priv,  __be32 i
                        priv->r->pie_rule_add(priv, &r->pr);
                } else {
                        int pkts = priv->r->packet_cntr_read(r->pr.packet_cntr);
-                       pr_info("%s: total packets: %d\n", __func__, pkts);
+                       pr_debug("%s: total packets: %d\n", __func__, pkts);
 
                        priv->r->pie_rule_write(priv, r->pr.id, &r->pr);
                }
index 793d7624897db0530ac5d4f146b5c8bf486fe0bb..3524021e2f762375971321a0322f80cb15ad28dc 100644 (file)
@@ -1680,7 +1680,7 @@ static void rtl930x_write_pie_templated(u32 r[], struct pie_rule *pr, enum templ
                        data_m = pr->tcp_info_m;
                        break;
                case TEMPLATE_FIELD_RANGE_CHK:
-                       pr_warn("Warning: TEMPLATE_FIELD_RANGE_CHK: not configured\n");
+                       pr_debug("TEMPLATE_FIELD_RANGE_CHK: not configured\n");
                        break;
                default:
                        pr_info("%s: unknown field %d\n", __func__, field_type);
index 2ba3a7819d64f94270839d987a8dc85af5fb317f..870dbde7a6cedee4e05beb8f248f024842ae54e4 100644 (file)
@@ -1077,10 +1077,10 @@ int rtl931x_pie_data_fill(enum template_field_id field_type, struct pie_rule *pr
                *data_m = pr->tcp_info_m;
                break;
        case TEMPLATE_FIELD_RANGE_CHK:
-               pr_info("TEMPLATE_FIELD_RANGE_CHK: not configured\n");
+               pr_debug("TEMPLATE_FIELD_RANGE_CHK: not configured\n");
                break;
        default:
-               pr_info("%s: unknown field %d\n", __func__, field_type);
+               pr_debug("%s: unknown field %d\n", __func__, field_type);
                return -1;
        }