Developer
Jasmeet Bagga
jasmeetbagga@meta.com
Performance
YoY:+904%Key patterns and highlights from this developer's activity.
Breakdown of growth, maintenance, and fixes effort over time.
Bugs introduced vs. fixed over time.
Reclassifies engineering effort based on bug attribution. Commits that introduced bugs are retrospectively counted as poor investments.
Investment Quality reclassifies engineering effort based on bug attribution data. Commits identified as buggy origins (those that introduced bugs later fixed by someone) have their grow and maintenance time moved into the Wasted Time category. Their waste (fix commits) remains counted as productive. All other commits retain their standard classification: grow is productive, maintenance is maintenance, and waste (fixes) is productive.
The standard model classifies commits as Growth, Maintenance, or Fixes. Investment Quality adds a quality lens: a commit that introduced a bug is retrospectively counted as a poor investment — the engineering time spent on it was wasted because it ultimately required additional fix work. Fix commits (Fixes in the standard model) are reframed as productive, because fixing bugs is valuable work.
Currently computed client-side from commit and bug attribution data. Ideal server-side endpoint:
POST /v1/organizations/{orgId}/investment-quality
Content-Type: application/json
Request:
{
"startTime": "2025-01-01T00:00:00Z",
"endTime": "2025-12-31T23:59:59Z",
"bucketSize": "BUCKET_SIZE_MONTH",
"groupBy": ["repository_id" | "deliverer_email"]
}
Response:
{
"productivePct": 74,
"maintenancePct": 18,
"wastedPct": 8,
"buckets": [
{
"bucketStart": "2025-01-01T00:00:00Z",
"productive": 4.2,
"maintenance": 1.8,
"wasted": 0.6
}
]
}Latest analyzed commits from this developer.
| Hash | Message | Date | Files |
|---|
Commit activity distribution by hour and day of week. Shows when this developer is most active.
Developers who frequently work on the same files and symbols. Higher score means stronger code collaboration.
| Effort |
|---|
| 2d262652 | This commit introduces a **new capability** to the **FBOSS CLI** by adding an `uncached` subcommand to the `show hw-object` command. This allows users to explicitly query **hardware objects directly from SAI**, bypassing the `SaiStore` cache, which was previously hardcoded. The change involves **refactoring** the `CmdShowHwObject` implementation to utilize a new `queryHwObjects` helper function, enabling both cached and uncached retrieval paths. This enhancement provides greater control and flexibility for debugging and verifying the live state of hardware objects, aligning with existing patterns like `show fabric reachability uncached`. | Mar 31 | 8 | grow |
| 21aa0268 | This commit **fixes a warmboot issue** and **refactors** the **SAI NextHop API** by removing `Ip` and `RouterInterfaceId` from the `AdapterHostKey` and `CreateAttributes` for **SRV6 SIDLIST next hops**. These attributes are irrelevant for SRV6 overlay next hops and their incorrect inclusion led to vendor SDKs silently ignoring them, causing `OBJECT_EXISTS` errors during warmboot due to perceived state mismatches. This change aligns the implementation with the **SAI specification** and ensures that `RouterInterfaceId` is correctly obtained directly from the router interface manager for `NeighborEntry` construction, improving the robustness of **SRV6 overlay networking** and preventing object recreation failures. | Mar 31 | 7 | waste |
| 7ac2dd9c | This commit **resolves a test failure** in the **SRV6 encapsulation hardware tests** (`AgentSrv6EncapTests.cpp`) where LAG member ports remained disabled after a link flap. Since LACP is intentionally disabled in these tests, the normal re-bundling mechanism was absent, leading to `EgressDisable=true` on the SAI LAG member. To address this, the `sendPacketToEncapRouteAfterLinkFlap` test now explicitly calls `enableTrunkPorts()` after bringing a port back up, ensuring the **LAG member forwarding state** is correctly restored. This **test maintenance** introduces new `disableTrunkPorts` and `enableTrunkPorts` utilities in `TrunkUtils.cpp` to manage trunk port forwarding, thereby improving the **reliability of hardware test scenarios** involving link flaps on aggregate ports. | Mar 27 | 3 | maint |
| d2c6186f | This commit provides a **test fix** for the **SRV6 encapsulation link flap test** within the `AgentHwTest` suite, ensuring proper validation of neighbor re-resolution. Previously, the `sendPacketToEncapRouteAfterLinkFlap` test was ineffective because `FLAGS_disable_neighbor_updates=true` prevented neighbors from being pruned on port down, making subsequent re-resolution a no-op. To address this, the test now explicitly **unresolves neighbors** after a port flap and before re-resolving them, guaranteeing that **next hops are correctly re-programmed in hardware**. A new generic helper function, `unresolveNeighbors`, was also added to `AgentHwTest.h` for broader utility in similar test scenarios. | Mar 27 | 2 | maint |
| 64841774 | This commit introduces a significant **refactoring** within the **SAI hardware abstraction layer** to optimize the internal representation of **SRV6 segment lists**. The `SaiSrv6SidListTraits::SegmentList` type is changed from `std::vector<folly::IPAddressV6>` to `std::vector<std::array<uint8_t, 16>>`. This modification eliminates the need for costly conversion buffers when interacting with the SAI API, as `std::array<uint8_t, 16>` directly matches the `sai_ip6_t` memory layout, allowing for more efficient data handling. A new `toSaiIp6List()` helper in `AddressUtil` facilitates conversions from `folly::IPAddressV6` at the caller boundary, impacting **SRV6 functionality** across modules like `SaiNextHopManager` and `SaiSrv6SidListManager`. This internal optimization enhances performance and reduces overhead for **SRV6 segment list processing**. | Mar 27 | 15 | maint |
| 6a3d7de9 | This commit significantly **enhances the SRv6 decapsulation test suite** by incorporating ECN (Explicit Congestion Notification) bit verification. It modifies the `verifyDecapPacket` function in `AgentSrv6DecapTests.cpp` to accept an `ecnMarked` parameter, allowing tests to simulate outer IPv6 headers with ECN CE bits set. The updated `verifyDecapCpuAndFrontPanel` now iterates through both ECN marked and unmarked cases, ensuring that the inner packet correctly propagates the ECN CE bits after decapsulation, in compliance with RFC 6040. This **test coverage improvement** ensures the **SRv6 decapsulation logic** correctly handles ECN propagation, bolstering the reliability of the **Agent's hardware forwarding behavior**. | Mar 27 | 1 | maint |
| dc4c347b | This commit **fixes** an issue in the **SAI agent's SRv6 MySID management** by refining the packet drop condition. Specifically, it modifies the logic within `SaiSrv6MySidManager.cpp` to **prevent packets from being dropped** when a null next hop ID is encountered for `DECAPSULATE_AND_LOOKUP` MySID types. This **behavior correction** ensures that SRv6 segments intended for decapsulation and subsequent lookup are processed correctly, even if a next hop ID is not explicitly provided. The change impacts the **packet forwarding behavior** for SRv6 traffic, preventing unintended drops for specific MySID configurations. | Mar 27 | 1 | waste |
| c8aa0347 | This commit performs a **refactoring** of the **SRv6 MySID entry management** within the **SAI hardware abstraction layer** by making `SaiMySidEntryTraits::CreateAttributes` non-optional. It removes `std::optional` wrappers from attributes like `EndpointBehaviorFlavor`, `NextHopId`, `Vrf`, and `PacketAction` in `fboss/agent/hw/sai/api/Srv6Api.h`, as these attributes are always set during `MySidEntry` creation. This **simplifies the API** and improves code clarity by ensuring direct attribute access. Consequently, the `SaiSrv6MySidManager` in `fboss/agent/hw/sai/switch/SaiSrv6MySidManager.cpp` now uses `setAttribute` instead of `setOptionalAttribute`, and related tests have been updated to reflect these concrete attribute values. This change streamlines attribute handling and reduces unnecessary optionality checks. | Mar 27 | 4 | maint |
| 1970dc01 | This commit introduces a **debug logging enhancement** to the **SAI object store reloading mechanism**. It adds a new log message within the `reload` function of `SaiStore.h` to explicitly indicate which `SaiObjectStore` is being reloaded. This **improves observability** and **diagnosability** by making it clear when an empty object store has been reloaded, addressing a previous gap where such events were not logged, which will aid in **debugging** issues related to store state and reloads. | Mar 27 | 1 | grow |
| 3dcd3fe4 | This commit **enhances the SRv6 decap tests** in `fboss/agent/test/agent_hw_tests/AgentSrv6DecapTests.cpp` by introducing distinct `outerHopLimit` (24) and `innerHopLimit` (64) values. This **test update** specifically targets the `verifyDecapPacket` function to thoroughly exercise the new `innerHopLimit` parameter in `makeIpInIpTxPacket`. It improves the accuracy of **SRv6 decap verification** by ensuring the test setup reflects more realistic scenarios. A temporary workaround is included to check the forwarded packet's TTL/hopLimit against the inner value, pending a fix for vendor issue MT-878. | Mar 25 | 1 | maint |
| 2afa077d | This commit **refactors and enhances the SRv6 decap hardware tests** by implementing a more comprehensive UDP payload verification. It now extracts the full expected inner UDP payload from the original `IpInIp` packet before transmission and compares the entire received UDP datagram against it after decap. This change, primarily affecting `fboss/agent/test/agent_hw_tests/AgentSrv6DecapTests.cpp`, **improves the completeness of verification** for both IPv4 and IPv6 encapsulated traffic. By comparing the full payload, it **deduplicates existing per-field UDP checks** and provides a **more robust and efficient validation** of the SRv6 decap functionality. | Mar 25 | 1 | maint |
| c3eb6002 | This commit introduces a new helper function, `verifyDecapCpuAndFrontPanel`, within the **FBOSS agent hardware tests** to enhance **SRv6 decap functionality** validation. This **testing improvement** standardizes the verification process by testing both IPv4 and IPv6 inner packets. It also covers both CPU and front panel injection methods, mirroring existing encap test patterns. The existing `sendPacketForDecap` test is updated to leverage this new helper, ensuring more robust and consistent testing of SRv6 decap. | Mar 25 | 1 | maint |
| cd985da1 | This commit introduces a **new capability** to the **`PktFactory` module** by enhancing the `makeIpInIpTxPacket` function. It renames the existing `hopLimit` parameter to `outerHopLimit` and adds an optional `innerHopLimit` parameter, allowing for independent control over the hop limits of inner and outer IP packets in an IP-in-IP tunnel. This **feature enhancement** provides more granular configuration for **IP-in-IP tunnel packet generation**, enabling scenarios where the inner packet's hop limit needs to differ from the outer encapsulation. Callers can now explicitly set `innerHopLimit` or let it default to the `outerHopLimit`. Unit tests were updated to validate this new behavior. | Mar 25 | 4 | grow |
| 09b8b512 | This commit **enhances the SRv6 decapsulation tests** within `fboss/agent` to explicitly verify the preservation of **Time-To-Live (TTL) and Differentiated Services Code Point (DSCP)** values. Specifically, it modifies `AgentSrv6DecapTests.cpp` to set a non-zero traffic class on test packets and assert that the inner packet's TTL is decremented by one and its DSCP value remains unchanged after decapsulation. This **test enhancement** ensures the network device correctly handles these critical IP header fields during SRv6 processing. By improving the robustness of these **hardware tests**, it increases confidence in the proper functioning of **SRv6 decapsulation**, which is crucial for maintaining network policies based on traffic classification and packet lifetime. | Mar 25 | 1 | maint |
| 22425a8f | This commit **improves the clarity and maintainability** of the **SRv6 decapsulation tests** within the `fboss/agent` component. It adds crucial comments to `AgentSrv6DecapTests.cpp` explaining the rationale behind the chosen `uSid` range for decapsulation. Additionally, the commit **refactors test assertions** for IPv4 and IPv6 headers, making the test code more robust and readable. This work is a **maintenance and documentation improvement** that enhances understanding of the SRv6 agent's testing logic and expectations. | Mar 25 | 1 | maint |
| ac7fa080 | This commit **enhances the SRv6 decapsulation test suite** by integrating a **packet snooper** into the `verifyDecapPacket` function within `AgentSrv6DecapTests.cpp`. The snooper now performs comprehensive verification of the decapsulated inner packet, checking its Ethertype, inner IP source/destination addresses, and UDP source/destination ports. This **improves the robustness of SRv6 decapsulation verification** by ensuring the integrity of the forwarded inner packet after decapsulation. Furthermore, a new helper function `findInjectPort` and an `injectPort` parameter are added to facilitate **front panel packet injection** support for these tests. | Mar 25 | 1 | maint |
| 547caf9b | This commit delivers a **bug fix** to the **FBOSS agent's trap ACL configuration logic**, specifically within the testing utilities. It ensures that the `addTrapPacketAcl` function in `fboss/agent/test/utils/TrapPacketUtils.cpp` now correctly sets the EtherType to either IPv4 or IPv6, dynamically determined by the IP prefix family of the provided CIDR. This correction prevents misconfigurations in **trap ACLs** that could arise from an incorrect EtherType. The change significantly improves the accuracy and reliability of **network control plane testing** by guaranteeing that trap packets are generated and handled with the appropriate protocol identification. | Mar 25 | 1 | waste |
| 81d05628 | This commit **enhances testing** for **SRv6 decapsulation** by introducing a new `verifyDecapPacket` method in `fboss/agent/test/agent_hw_tests/AgentSrv6DecapTests.cpp`. This method sends `IpInIp` packets with an outer IPv6 destination matching the `mySid` address to trigger decapsulation, verifying the inner packet's forwarding via egress port statistics. Additionally, it updates `initialConfig` to include **trap ACLs** for inner packet destination prefixes, laying groundwork for future snooper-based verification. This **test enhancement** significantly improves the robustness and verification capabilities for SRv6 decapsulation functionality. | Mar 25 | 1 | maint |
| 2fb5e4e4 | This commit introduces **new hardware test infrastructure** for **SRv6 decapsulation** by adding the `AgentSrv6DecapTest` suite, which includes helpers to program IPv4/IPv6 routes and `DECAPSULATE_AND_LOOKUP` MySid entries via RIB. This new test suite, defined in `AgentSrv6DecapTests.cpp`, provides a foundation for validating SRv6 decapsulation behavior on physical hardware. Concurrently, it **fixes a bug** in the `SaiSrv6MySidManager` by correcting the `nonLocatorMaskLen` calculation within `getMySidAdapterHostKey`, ensuring proper SRv6 MySid programming. This work enhances the test coverage for SRv6 functionality and improves the accuracy of SRv6 MySid management. | Mar 24 | 4 | maint |
| 5ecf1f1e | This commit **enhances the `SaiTracer`'s output** by adding a human-readable IPv6 address comment when tracing `MySID` entries. Specifically, within the `SaiTracer::setMySidEntry` function, it now converts the `sai_ip6_t` SID to a clear string using `fromSaiIpAddress` and prints it as a comment before the raw byte representation. This **observability improvement** makes debugging easier by providing immediate context for IPv6 addresses, aligning the tracing format with that of `setRouteEntry` and `setNeighborEntry` for consistency. The change primarily affects the **`fboss/agent/hw/sai/tracer/SaiTracer.cpp`** module, improving the clarity of trace logs for network engineers. | Mar 24 | 1 | grow |
This commit introduces a **new capability** to the **FBOSS CLI** by adding an `uncached` subcommand to the `show hw-object` command. This allows users to explicitly query **hardware objects directly from SAI**, bypassing the `SaiStore` cache, which was previously hardcoded. The change involves **refactoring** the `CmdShowHwObject` implementation to utilize a new `queryHwObjects` helper function, enabling both cached and uncached retrieval paths. This enhancement provides greater control and flexibility for debugging and verifying the live state of hardware objects, aligning with existing patterns like `show fabric reachability uncached`.
This commit **fixes a warmboot issue** and **refactors** the **SAI NextHop API** by removing `Ip` and `RouterInterfaceId` from the `AdapterHostKey` and `CreateAttributes` for **SRV6 SIDLIST next hops**. These attributes are irrelevant for SRV6 overlay next hops and their incorrect inclusion led to vendor SDKs silently ignoring them, causing `OBJECT_EXISTS` errors during warmboot due to perceived state mismatches. This change aligns the implementation with the **SAI specification** and ensures that `RouterInterfaceId` is correctly obtained directly from the router interface manager for `NeighborEntry` construction, improving the robustness of **SRV6 overlay networking** and preventing object recreation failures.
This commit **resolves a test failure** in the **SRV6 encapsulation hardware tests** (`AgentSrv6EncapTests.cpp`) where LAG member ports remained disabled after a link flap. Since LACP is intentionally disabled in these tests, the normal re-bundling mechanism was absent, leading to `EgressDisable=true` on the SAI LAG member. To address this, the `sendPacketToEncapRouteAfterLinkFlap` test now explicitly calls `enableTrunkPorts()` after bringing a port back up, ensuring the **LAG member forwarding state** is correctly restored. This **test maintenance** introduces new `disableTrunkPorts` and `enableTrunkPorts` utilities in `TrunkUtils.cpp` to manage trunk port forwarding, thereby improving the **reliability of hardware test scenarios** involving link flaps on aggregate ports.
This commit provides a **test fix** for the **SRV6 encapsulation link flap test** within the `AgentHwTest` suite, ensuring proper validation of neighbor re-resolution. Previously, the `sendPacketToEncapRouteAfterLinkFlap` test was ineffective because `FLAGS_disable_neighbor_updates=true` prevented neighbors from being pruned on port down, making subsequent re-resolution a no-op. To address this, the test now explicitly **unresolves neighbors** after a port flap and before re-resolving them, guaranteeing that **next hops are correctly re-programmed in hardware**. A new generic helper function, `unresolveNeighbors`, was also added to `AgentHwTest.h` for broader utility in similar test scenarios.
This commit introduces a significant **refactoring** within the **SAI hardware abstraction layer** to optimize the internal representation of **SRV6 segment lists**. The `SaiSrv6SidListTraits::SegmentList` type is changed from `std::vector<folly::IPAddressV6>` to `std::vector<std::array<uint8_t, 16>>`. This modification eliminates the need for costly conversion buffers when interacting with the SAI API, as `std::array<uint8_t, 16>` directly matches the `sai_ip6_t` memory layout, allowing for more efficient data handling. A new `toSaiIp6List()` helper in `AddressUtil` facilitates conversions from `folly::IPAddressV6` at the caller boundary, impacting **SRV6 functionality** across modules like `SaiNextHopManager` and `SaiSrv6SidListManager`. This internal optimization enhances performance and reduces overhead for **SRV6 segment list processing**.
This commit significantly **enhances the SRv6 decapsulation test suite** by incorporating ECN (Explicit Congestion Notification) bit verification. It modifies the `verifyDecapPacket` function in `AgentSrv6DecapTests.cpp` to accept an `ecnMarked` parameter, allowing tests to simulate outer IPv6 headers with ECN CE bits set. The updated `verifyDecapCpuAndFrontPanel` now iterates through both ECN marked and unmarked cases, ensuring that the inner packet correctly propagates the ECN CE bits after decapsulation, in compliance with RFC 6040. This **test coverage improvement** ensures the **SRv6 decapsulation logic** correctly handles ECN propagation, bolstering the reliability of the **Agent's hardware forwarding behavior**.
This commit **fixes** an issue in the **SAI agent's SRv6 MySID management** by refining the packet drop condition. Specifically, it modifies the logic within `SaiSrv6MySidManager.cpp` to **prevent packets from being dropped** when a null next hop ID is encountered for `DECAPSULATE_AND_LOOKUP` MySID types. This **behavior correction** ensures that SRv6 segments intended for decapsulation and subsequent lookup are processed correctly, even if a next hop ID is not explicitly provided. The change impacts the **packet forwarding behavior** for SRv6 traffic, preventing unintended drops for specific MySID configurations.
This commit performs a **refactoring** of the **SRv6 MySID entry management** within the **SAI hardware abstraction layer** by making `SaiMySidEntryTraits::CreateAttributes` non-optional. It removes `std::optional` wrappers from attributes like `EndpointBehaviorFlavor`, `NextHopId`, `Vrf`, and `PacketAction` in `fboss/agent/hw/sai/api/Srv6Api.h`, as these attributes are always set during `MySidEntry` creation. This **simplifies the API** and improves code clarity by ensuring direct attribute access. Consequently, the `SaiSrv6MySidManager` in `fboss/agent/hw/sai/switch/SaiSrv6MySidManager.cpp` now uses `setAttribute` instead of `setOptionalAttribute`, and related tests have been updated to reflect these concrete attribute values. This change streamlines attribute handling and reduces unnecessary optionality checks.
This commit introduces a **debug logging enhancement** to the **SAI object store reloading mechanism**. It adds a new log message within the `reload` function of `SaiStore.h` to explicitly indicate which `SaiObjectStore` is being reloaded. This **improves observability** and **diagnosability** by making it clear when an empty object store has been reloaded, addressing a previous gap where such events were not logged, which will aid in **debugging** issues related to store state and reloads.
This commit **enhances the SRv6 decap tests** in `fboss/agent/test/agent_hw_tests/AgentSrv6DecapTests.cpp` by introducing distinct `outerHopLimit` (24) and `innerHopLimit` (64) values. This **test update** specifically targets the `verifyDecapPacket` function to thoroughly exercise the new `innerHopLimit` parameter in `makeIpInIpTxPacket`. It improves the accuracy of **SRv6 decap verification** by ensuring the test setup reflects more realistic scenarios. A temporary workaround is included to check the forwarded packet's TTL/hopLimit against the inner value, pending a fix for vendor issue MT-878.
This commit **refactors and enhances the SRv6 decap hardware tests** by implementing a more comprehensive UDP payload verification. It now extracts the full expected inner UDP payload from the original `IpInIp` packet before transmission and compares the entire received UDP datagram against it after decap. This change, primarily affecting `fboss/agent/test/agent_hw_tests/AgentSrv6DecapTests.cpp`, **improves the completeness of verification** for both IPv4 and IPv6 encapsulated traffic. By comparing the full payload, it **deduplicates existing per-field UDP checks** and provides a **more robust and efficient validation** of the SRv6 decap functionality.
This commit introduces a new helper function, `verifyDecapCpuAndFrontPanel`, within the **FBOSS agent hardware tests** to enhance **SRv6 decap functionality** validation. This **testing improvement** standardizes the verification process by testing both IPv4 and IPv6 inner packets. It also covers both CPU and front panel injection methods, mirroring existing encap test patterns. The existing `sendPacketForDecap` test is updated to leverage this new helper, ensuring more robust and consistent testing of SRv6 decap.
This commit introduces a **new capability** to the **`PktFactory` module** by enhancing the `makeIpInIpTxPacket` function. It renames the existing `hopLimit` parameter to `outerHopLimit` and adds an optional `innerHopLimit` parameter, allowing for independent control over the hop limits of inner and outer IP packets in an IP-in-IP tunnel. This **feature enhancement** provides more granular configuration for **IP-in-IP tunnel packet generation**, enabling scenarios where the inner packet's hop limit needs to differ from the outer encapsulation. Callers can now explicitly set `innerHopLimit` or let it default to the `outerHopLimit`. Unit tests were updated to validate this new behavior.
This commit **enhances the SRv6 decapsulation tests** within `fboss/agent` to explicitly verify the preservation of **Time-To-Live (TTL) and Differentiated Services Code Point (DSCP)** values. Specifically, it modifies `AgentSrv6DecapTests.cpp` to set a non-zero traffic class on test packets and assert that the inner packet's TTL is decremented by one and its DSCP value remains unchanged after decapsulation. This **test enhancement** ensures the network device correctly handles these critical IP header fields during SRv6 processing. By improving the robustness of these **hardware tests**, it increases confidence in the proper functioning of **SRv6 decapsulation**, which is crucial for maintaining network policies based on traffic classification and packet lifetime.
This commit **improves the clarity and maintainability** of the **SRv6 decapsulation tests** within the `fboss/agent` component. It adds crucial comments to `AgentSrv6DecapTests.cpp` explaining the rationale behind the chosen `uSid` range for decapsulation. Additionally, the commit **refactors test assertions** for IPv4 and IPv6 headers, making the test code more robust and readable. This work is a **maintenance and documentation improvement** that enhances understanding of the SRv6 agent's testing logic and expectations.
This commit **enhances the SRv6 decapsulation test suite** by integrating a **packet snooper** into the `verifyDecapPacket` function within `AgentSrv6DecapTests.cpp`. The snooper now performs comprehensive verification of the decapsulated inner packet, checking its Ethertype, inner IP source/destination addresses, and UDP source/destination ports. This **improves the robustness of SRv6 decapsulation verification** by ensuring the integrity of the forwarded inner packet after decapsulation. Furthermore, a new helper function `findInjectPort` and an `injectPort` parameter are added to facilitate **front panel packet injection** support for these tests.
This commit delivers a **bug fix** to the **FBOSS agent's trap ACL configuration logic**, specifically within the testing utilities. It ensures that the `addTrapPacketAcl` function in `fboss/agent/test/utils/TrapPacketUtils.cpp` now correctly sets the EtherType to either IPv4 or IPv6, dynamically determined by the IP prefix family of the provided CIDR. This correction prevents misconfigurations in **trap ACLs** that could arise from an incorrect EtherType. The change significantly improves the accuracy and reliability of **network control plane testing** by guaranteeing that trap packets are generated and handled with the appropriate protocol identification.
This commit **enhances testing** for **SRv6 decapsulation** by introducing a new `verifyDecapPacket` method in `fboss/agent/test/agent_hw_tests/AgentSrv6DecapTests.cpp`. This method sends `IpInIp` packets with an outer IPv6 destination matching the `mySid` address to trigger decapsulation, verifying the inner packet's forwarding via egress port statistics. Additionally, it updates `initialConfig` to include **trap ACLs** for inner packet destination prefixes, laying groundwork for future snooper-based verification. This **test enhancement** significantly improves the robustness and verification capabilities for SRv6 decapsulation functionality.
This commit introduces **new hardware test infrastructure** for **SRv6 decapsulation** by adding the `AgentSrv6DecapTest` suite, which includes helpers to program IPv4/IPv6 routes and `DECAPSULATE_AND_LOOKUP` MySid entries via RIB. This new test suite, defined in `AgentSrv6DecapTests.cpp`, provides a foundation for validating SRv6 decapsulation behavior on physical hardware. Concurrently, it **fixes a bug** in the `SaiSrv6MySidManager` by correcting the `nonLocatorMaskLen` calculation within `getMySidAdapterHostKey`, ensuring proper SRv6 MySid programming. This work enhances the test coverage for SRv6 functionality and improves the accuracy of SRv6 MySid management.
This commit **enhances the `SaiTracer`'s output** by adding a human-readable IPv6 address comment when tracing `MySID` entries. Specifically, within the `SaiTracer::setMySidEntry` function, it now converts the `sai_ip6_t` SID to a clear string using `fromSaiIpAddress` and prints it as a comment before the raw byte representation. This **observability improvement** makes debugging easier by providing immediate context for IPv6 addresses, aligning the tracing format with that of `setRouteEntry` and `setNeighborEntry` for consistency. The change primarily affects the **`fboss/agent/hw/sai/tracer/SaiTracer.cpp`** module, improving the clarity of trace logs for network engineers.