[PATCH v7 2/3] dts: add TX offload capabilities to NIC capabilities

Luca Vizzarro luca.vizzarro at arm.com
Tue Oct 21 15:50:06 CEST 2025


Hi Andrew,

looks good, would just make it consistent where the port_id comes first
again in the arguments list.

On Thu, Oct 16, 2025 at 09:24:20AM +0000, Andrew Bailey wrote:
> @@ -1352,3 +1407,41 @@ def set_queue_mbuf_fast_free(
>              raise InteractiveCommandExecutionError(
>                  f"Failed to get offload config on port {port_id}, queue {queue_id}:\n{output}"
>              )
> +
> +    @_requires_started_ports
> +    def get_offload_config(
> +        self,
> +        rxtx: RxTxLiteralSwitch,
> +        port_id: int,
swap here.
> +        /,
> +        verify: bool = True,
> +    ) -> RxOffloadConfiguration | TxOffloadConfiguration:
> +        """Get the Rx or Tx offload configuration of the queues from the given port.
> +
> +        Args:
> +            rxtx: Whether to get the Rx or Tx configuration of the given queues.
> +            port_id: The port ID that contains the desired queues.
swap here.
> +            verify: If :data:`True` the output of the command will be scanned in an attempt to
> +                verify that the offload configuration was retrieved successfully on all queues.
> +
> +        Returns:
> +            An offload configuration containing the capabilities of the port and queues.
> +
> +        Raises:
> +            InteractiveCommandExecutionError: If all queue offload configurations could not be
> +                retrieved.
> +        """
> +        config_output = self.send_command(f"show port {port_id} {rxtx}_offload configuration")
> +        if verify:
> +            if (
> +                f"Rx Offloading Configuration of port {port_id}" not in config_output
> +                and f"Tx Offloading Configuration of port {port_id}" not in config_output
> +            ):
> +                self._logger.debug(f"Get port offload config error\n{config_output}")
> +                raise InteractiveCommandExecutionError(
> +                    f"Failed to get offload config on port {port_id}:\n{config_output}"
> +                )
> +        if rxtx == "rx":
> +            return RxOffloadConfiguration.parse(config_output)
> +        else:
> +            return TxOffloadConfiguration.parse(config_output)


More information about the dev mailing list