Skip to content

common: add: a PACKET_TOO_BIG packet drop reason - #1360

Open
adamgeorge309 wants to merge 1 commit into
masterfrom
topic/gy/packet-drop-reason-too-big
Open

adamgeorge309 wants to merge 1 commit into
masterfrom
topic/gy/packet-drop-reason-too-big

Conversation

@adamgeorge309

Copy link
Copy Markdown
Contributor

PacketDropReason gains PACKET_TOO_BIG = 16, for a datagram that is larger than the Maximum Transmission Unit (MTU) of the next link and may not be fragmented. Ipv4 and Mpls report it where they reported OTHER_PACKET_DROP, and Ipv4 records it in a new statistic, packetDropPacketTooBig.

Risk: statistical results change. Ipv4's packetDropUndefined no longer counts these drops, and every Ipv4 module records two new scalars (packetDropPacketTooBig:count and :sum(packetBytes)). No fingerprint changes.

Closes #1359

One commit: common: add: a PACKET_TOO_BIG packet drop reason.

The problem

On master, Ipv4::fragmentAndSend() (src/inet/networklayer/ipv4/Ipv4.cc:980-989) drops a datagram with the Don't Fragment (DF) flag that does not fit the MTU, and emits packetDropped without setting a reason, so the reason is OTHER_PACKET_DROP. Mpls (Multiprotocol Label Switching, src/inet/networklayer/mpls/Mpls.cc:407-418) sets OTHER_PACKET_DROP explicitly for the same case with a label stack (Request for Comments (RFC) 3032 Section 3.4). Ipv4.ned counts these drops in packetDropUndefined, together with every drop that sets no reason.

The change

  • src/inet/common/Simsignals.msg: PACKET_TOO_BIG = 16, appended, so no existing value is renumbered.
  • src/inet/common/ResultFilters.cc: packetDropReasonIsPacketTooBig, registered next to the other reason filters.
  • Ipv4::fragmentAndSend() sets PACKET_TOO_BIG; Mpls replaces OTHER_PACKET_DROP with it. No test covers the Mpls site, and Mpls.ned records no statistic on packetDropped.
  • Ipv4.ned: @statistic[packetDropPacketTooBig], with the same record and interpolationmode as the other per-reason statistics.
  • WHATSNEW: entry 50 under "Notable backward incompatible changes", because packetDropUndefined results change.

PacketDropVisualizer resolves the reason name through cEnum (PacketDropVisualizerBase.cc), so %s shows PACKET_TOO_BIG without a code change; %r shows 16.

No C++ interface, Network Description (NED) parameter, message field or feature descriptor changes; the enum gains one value, and Ipv4.ned one statistic.

Not addressed here: Mpls.ned declares neither @signal[packetDropped] nor a statistic, although Mpls.cc emits the signal; Ipv6 emits no packetDropped for this case on master (pull request #1284 adds it).

Verification

Release build (make MODE=release in the root and tests/module/lib), each suite run on master bba1db4c81 and with this change.

New module test tests/module/IPv4_dont_fragment_drop_reason.test: hostA --- router --- hostB, the router's link to hostB has an MTU of 576 bytes (**.router.eth[1].mac.mtu = 576B), and hostA's UdpBasicApp sends three datagrams with a 1000-byte payload with dontFragment = true. It checks that the router's ipv4.ip records packetDropPacketTooBig:count 3 and packetDropUndefined:count 0. On master's source the router records packetDropUndefined:count 3 and the test fails.

Command Master This change
tests/fingerprint: ./fingerprinttest -s -F tyf 1774 run, 5 failures, 62 errors, 1 expected error the same failing and erroring rows, with the same computed fingerprints
tests/module: inet_run_module_tests -m release --no-build -l ERROR 657 run, 368 pass, 289 fail 658 run, 369 pass, 289 fail: the new test passes, and the same tests fail by name

Of the 289 module failures on master, 274 are tcp_* tests and 15 are ConvolutionalCoder12, ConvolutionalCoder34, DimensionalMediumAnalogModel_PrintAttenuation_1, EtherHost_lifecycle, ExternalProcess_3, Ieee80211BitDomain, Ieee80211BlockAckVariant_1, Ieee80211SymbolDomain, Ieee8021d-Rstp, Ieee8021d-Stp, IPv6_packet_too_big, LogNormalShadowing_Correlated_4, MIPv6_tcp_handover, PacketGate_1, UDPSocket_1. The 5 fingerprint failures are rows of mipv6-refactoring.csv whose recorded ~tNlb fingerprints are stale on master; the 62 errors are configurations whose optional features are not built.

Statistical baselines (statistics repository, origin/master): the routers of examples/inet/tcp_pmtud (PmtudEnabled 15, PmtudProbe 30) and examples/quic/dplpmtud (6 configurations, 1 to 18) record nonzero packetDropUndefined counts. With this change, all eight configurations record the same counts as packetDropPacketTooBig and packetDropUndefined 0. The other baselines with nonzero packetDropUndefined counts, examples/inet/multicast and examples/pim/iptv, record other drops and do not change. These baselines, and every baseline with an Ipv4 module (new scalars), need re-recording after merge.

Gates: check-pull-request.sh --base origin/master (commits, classification, includes, NED parameters, description), check-source-seals.sh --base origin/master and check-architecture.sh on src/inet/networklayer/ipv4 and src/inet/networklayer/mpls pass. check-architecture.sh src/inet/common reports include violations in ResultFilters.cc and other files; this commit adds no include.

Relationship to other pull requests

PacketDropReason had no value for a datagram that is larger than the Maximum Transmission Unit (MTU) of the next link and may not be fragmented, so Ipv4 (Don't Fragment flag set, no reason set) and Mpls (a labeled datagram with that flag, Request for Comments (RFC) 3032 Section 3.4) reported OTHER_PACKET_DROP, and Ipv4 counted these drops in packetDropUndefined together with every drop that sets no reason.

PacketDropReason gains PACKET_TOO_BIG = 16, and ResultFilters registers packetDropReasonIsPacketTooBig. Ipv4::fragmentAndSend() and Mpls report the new reason, and Ipv4.ned records packetDropPacketTooBig like its other per-reason statistics.

tests/module/IPv4_dont_fragment_drop_reason.test sends three datagrams with a 1000-byte payload with the Don't Fragment flag through a router whose next link has an MTU of 576 bytes, and checks that the router's packetDropPacketTooBig counts 3 and packetDropUndefined 0; before this commit, packetDropUndefined counted 3.

No fingerprint changes. Statistical baselines change: every Ipv4 module records the new scalars, and the drops move from packetDropUndefined to packetDropPacketTooBig in examples/inet/tcp_pmtud and examples/quic/dplpmtud.

Change: src.common.PacketDropReason | behavior.add | test statistical whatsnew

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

common: PacketDropReason has no value for a datagram that is too big for the next link, so every such drop reports OTHER_PACKET_DROP

1 participant