From 9ba422908a2f5fc119193b3b89ad88fe9f8daee6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petr=20=C5=A0tetiar?= Date: Thu, 9 Mar 2023 09:30:19 +0100 Subject: [PATCH] bridge: make it more clear why the config was applied MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit In some cases we see, that the bridge configuration was applied, but its not exactly clear why it was done, so lets add a simple debugging output which should provide currently missing clue. Signed-off-by: Petr Å tetiar --- bridge.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/bridge.c b/bridge.c index 6306bec..8a5b758 100644 --- a/bridge.c +++ b/bridge.c @@ -1153,16 +1153,22 @@ bridge_reload(struct device *dev, struct blob_attr *attr) diff = 0; uci_blob_diff(tb_dev, otb_dev, &device_attr_list, &diff); - if (diff) - ret = DEV_CONFIG_RESTART; + if (diff) { + ret = DEV_CONFIG_RESTART; + D(DEVICE, "Bridge %s device attributes have changed, diff=0x%lx\n", + dev->ifname, diff); + } blobmsg_parse(bridge_attrs, __BRIDGE_ATTR_MAX, otb_br, blob_data(bst->config_data), blob_len(bst->config_data)); diff = 0; uci_blob_diff(tb_br, otb_br, &bridge_attr_list, &diff); - if (diff & ~(1 << BRIDGE_ATTR_PORTS)) - ret = DEV_CONFIG_RESTART; + if (diff & ~(1 << BRIDGE_ATTR_PORTS)) { + ret = DEV_CONFIG_RESTART; + D(DEVICE, "Bridge %s attributes have changed, diff=0x%lx\n", + dev->ifname, diff); + } bridge_config_init(dev); } -- 2.30.2