Slicing

Napatech Link™ Software Features

product_line_custom
Intel® PAC
Napatech SmartNIC
category
Feature Description

In this chapter

This chapter describes how frames can be sliced dynamically in order to reduce the frame size.

Reducing frame length

Frame slicing reduces the frame length by removing the last part of the frame.

Dynamic slicing

Dynamic slicing is provided in the SmartNIC, where the slice length depends on the type of frame received. The sliced frame can thereby contain the protocol header of dynamic length plus packet data of an optional fixed length. Dynamic slicing can be specified per filter.

Fixed slice length

A fixed slice length can be selected by discarding the dynamic protocol-dependent header length. As a result all frames of the same frame class are sliced to the same definable length.

Header adjust

The number of protocol layers to include in the dynamic length is controlled with the header adjust. These modes are available:

  • Slicing disabled
  • Fixed length
  • Fixed length + ISL
  • Fixed length + ISL + ETH + VLAN
  • Fixed length + ISL + ETH + VLAN + MPLS
  • Fixed length + ISL + ETH + VLAN + MPLS + L3
  • Fixed length + ISL + ETH + VLAN + MPLS + L3 + L4
  • Fixed length + ISL + ETH + VLAN + MPLS + L3 + L4 + ODT
  • Fixed length + ISL + ETH + VLAN + MPLS + L3 + L4 + ODT + inner L3
  • Fixed length + ISL + ETH + VLAN + MPLS + L3 + L4 + ODT + inner L3 + inner L4
  • End of frame
Note: The length of the OuterDataType (ODT) header is 0 for outer data types other than GTPv1-U. For GTPv1-U the length of the OuterDataType header varies.
Note: The slicing offset for the inner layer 3 and inner layer 4 are only added when the outer data type is IP-in-IP, EtherIP or GTPv1-U.
Note: The end-of-frame dynamic offset enables bytes to be sliced off from the end of the frame by applying a negative offset. This can be used, for instance, for frame checksum removal to free up PCIe bandwidth and enable non-blocking transfer of RX traffic from port to host memory.

The combination of fixed length and header adjust can be specified per filter.

Clearing of packet data after slice length

The slice length defines the amount of packet data transferred to the host. The SmartNIC will clear any additional packet data that could fit in the transfer word size, in order to protect any sensitive packet data.

Slicing using NTPL

Slicing is not an independent NTPL command but is a part of the Assign command.

NTPL example 1

This NTPL example captures TCP frames and slices them to 64 bytes plus the size of any layer 2, 3 and 4 protocol headers:
Assign[StreamId = 0; SliceOffset = 64; SliceAddHeader = Layer2And3And4HeaderSize] = Layer4Protocol == TCP

NTPL example 2

This NTPL example captures all frames, but removes the checksums:
Assign[Slice=EndOfFrame[-4]] = All