Add a new QCA vendor attribute to set interface offload type

Userspace tools can use QCA_WLAN_VENDOR_ATTR_CONFIG_IF_OFFLOAD_TYPE to
configure the different below acceleration features (hardware, software)
on a per interface basis.

0 - No acceleration Packets are processed through the Linux kernel
networking stack.

1 - Software based acceleration: Packets are processed through the
shortcut forwarding engine (SFE) to bypass the Linux networking stack
for improved throughput performance. This option is applicable for AP,
STA, and Mesh mode and available for all radio designs. From the
performance aspect, this option consumes more CPU compared to the other
two options. Linux traffic control can be further applied with this
option to have more control on the traffic flows.

2 - Hybrid acceleration (software and hardware acceleration combined):
Packets are processed through both hardware and software in this case.
Packet classification is done by the hardware and then the packets are
delivered to software along with classification results as meta data.
Software can choose to do more classification/QoS based on use cases.
This is applicable for AP, STA, and Mesh modes and is available for all
radio designs. From the performance aspect, this option consumes
relatively less CPU compared to the SFE option above. Linux traffic
control rules cannot be applied with this option.

3 - Hardware based acceleration : Packets are processed through special
hardware (Direct Switch) rings which can directly forward the packets
between ethernet hardware and Wi-Fi hardware with very less software
involvement. This is applicable only for AP and STA modes; not
applicable for Mesh mode. From the performance aspect, this option
consumes very much less CPU compared to the other options. Linux traffic
control rules cannot be applied when this option is used. This option is
applicable only for specific radio designs. When this option is not
available, the default option (SFE) would be configured.

Signed-off-by: Balamurugan Mahalingam <quic_bmahalin@quicinc.com>
This commit is contained in:
Balamurugan Mahalingam 2024-06-05 18:53:21 -07:00 committed by Jouni Malinen
parent ffcb7392f0
commit 1b96745f1d

View file

@ -3624,6 +3624,16 @@ enum qca_wlan_vendor_attr_config {
*/ */
QCA_WLAN_VENDOR_ATTR_CONFIG_CONSECUTIVE_TX_NO_ACK_THRESHOLD = 119, QCA_WLAN_VENDOR_ATTR_CONFIG_CONSECUTIVE_TX_NO_ACK_THRESHOLD = 119,
/* 8-bit unsigned value to configure the interface offload type
*
* This attribute is used to configure the interface offload capability.
* User can configure software based acceleration, hardware based
* acceleration, or a combination of both using this option. More
* details on each option is described under the enum definition below.
* Uses enum qca_wlan_intf_offload_type for values.
*/
QCA_WLAN_VENDOR_ATTR_CONFIG_INTF_OFFLOAD_TYPE = 120,
/* keep last */ /* keep last */
QCA_WLAN_VENDOR_ATTR_CONFIG_AFTER_LAST, QCA_WLAN_VENDOR_ATTR_CONFIG_AFTER_LAST,
QCA_WLAN_VENDOR_ATTR_CONFIG_MAX = QCA_WLAN_VENDOR_ATTR_CONFIG_MAX =
@ -17759,4 +17769,52 @@ enum qca_wlan_vendor_attr_nss_pkt {
QCA_WLAN_VENDOR_ATTR_NSS_PKT_AFTER_LAST - 1, QCA_WLAN_VENDOR_ATTR_NSS_PKT_AFTER_LAST - 1,
}; };
/**
* enum qca_wlan_intf_offload_type - Definition of available values for
* QCA_WLAN_VENDOR_ATTR_CONFIG_INTF_OFFLOAD_TYPE to specify the offload path for
* packets handled through a network device.
*
* There are three offload paths possible for handling packet forwarding between
* Ethernet and Wi-Fi network, and which path to use can be configured on a per
* netdevice level based on use case. Userspace can choose different options
* based on use cases like performance requirements, traffic control features
* and limitations provided in each option.
*
* @QCA_WLAN_VENDOR_ATTR_INTF_OFFLOAD_TYPE_NONE: No acceleration configured.
* Packets are processed through the Linux kernel networking stack.
*
* @QCA_WLAN_VENDOR_ATTR_INTF_OFFLOAD_TYPE_SFE: Packets are processed through
* the shortcut forwarding engine (SFE) to bypass the Linux networking stack
* for improved throughput performance. This option is applicable for AP, STA,
* and Mesh mode and available for all radio designs. From the performance
* aspect, this option consumes more CPU compared to the other two options.
* Linux traffic control can be further applied with this option to have more
* control on the traffic flows.
*
* @QCA_WLAN_VENDOR_ATTR_INTF_OFFLOAD_TYPE_ACTIVE_VP: Packets are processed
* through both hardware and software in this case. Packet classification is
* done by the hardware and then the packets are delivered to software along
* with classification results as meta data. Software can choose to do more
* classification/QoS based on use cases. This is applicable for AP, STA, and
* Mesh modes and this is available for all radio designs. From the performance
* aspect, this option consumes relatively less CPU compared to the SFE option
* above. Linux traffic control rules cannot be applied with this option.
*
* @QCA_WLAN_VENDOR_ATTR_INTF_OFFLOAD_TYPE_PPE_DS: Packets are processed through
* special hardware (Direct Switch) rings which can directly forward the packets
* between Ethernet hardware and Wi-Fi hardware with very little software
* involvement. This is applicable only for AP and STA modes; not applicable
* for Mesh mode. From the performance aspect, this option consumes very much
* less CPU compared to the other options. Linux traffic control rules cannot be
* applied when this option is used. This option is applicable only for
* specific radio designs. When this option is not available, the default option
* (SFE) would be configured.
*/
enum qca_wlan_intf_offload_type {
QCA_WLAN_INTF_OFFLOAD_TYPE_NONE = 0,
QCA_WLAN_INTF_OFFLOAD_TYPE_SFE = 1,
QCA_WLAN_INTF_OFFLOAD_TYPE_ACTIVE_VP = 2,
QCA_WLAN_INTF_OFFLOAD_TYPE_PPE_DS = 3,
};
#endif /* QCA_VENDOR_H */ #endif /* QCA_VENDOR_H */