From e7b6f290c8fe617e2804818bba5b96fc81d2aa62 Mon Sep 17 00:00:00 2001 From: Benjamin Naecker Date: Thu, 15 Feb 2024 00:04:09 +0000 Subject: [PATCH] Simplify MAC shift logic --- nexus/db-queries/src/db/queries/network_interface.rs | 2 +- smf/sled-agent/non-gimlet/config-rss.toml | 2 +- smf/sled-agent/non-gimlet/config.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nexus/db-queries/src/db/queries/network_interface.rs b/nexus/db-queries/src/db/queries/network_interface.rs index befa932cd29..65041d57741 100644 --- a/nexus/db-queries/src/db/queries/network_interface.rs +++ b/nexus/db-queries/src/db/queries/network_interface.rs @@ -626,7 +626,7 @@ impl NextMacShifts { // always expressed as a negative number, giving the largest leftward // shift, i.e., the distance to the first value. let max_shift = max - x; - let min_shift = -(x - min); + let min_shift = min - x; Self { base, min_shift, max_shift } } } diff --git a/smf/sled-agent/non-gimlet/config-rss.toml b/smf/sled-agent/non-gimlet/config-rss.toml index d0b4f94d9f4..2d8c504f428 100644 --- a/smf/sled-agent/non-gimlet/config-rss.toml +++ b/smf/sled-agent/non-gimlet/config-rss.toml @@ -100,7 +100,7 @@ bgp = [] # You can configure multiple uplinks by repeating the following stanza [[rack_network_config.ports]] # Routes associated with this port. -routes = [{nexthop = "192.168.1.199", destination = "0.0.0.0/0"}] +routes = [{nexthop = "192.168.1.1", destination = "0.0.0.0/0"}] # Addresses associated with this port. addresses = ["192.168.1.30/24"] # Name of the uplink port. This should always be "qsfp0" when using softnpu. diff --git a/smf/sled-agent/non-gimlet/config.toml b/smf/sled-agent/non-gimlet/config.toml index 432652c50b1..bbb0a890d91 100644 --- a/smf/sled-agent/non-gimlet/config.toml +++ b/smf/sled-agent/non-gimlet/config.toml @@ -82,7 +82,7 @@ data_links = ["net0", "net1"] request_body_max_bytes = 2_147_483_648 [log] -level = "info" +level = "debug" mode = "file" path = "/dev/stdout" if_exists = "append"