mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 15:02:32 +00:00
2558e7b443
Qualcomm NSS-DP is as its name says Qualcomms ethernet driver for the NSS subsystem (Networking subsystem) built-into various Qualcomm SoCs. It has 2 modes of operation: * Without NSS FW and rest of code required for offloading This is the one that we will use as the amount of kernel patching required for NSS offloading and the fact that its not upstreamable at all makes it unusable for us. Driver in this mode is rather basic, it currently only offers NAPI GRO (Added by us as part of the fixup) and basically relies on the powerfull CPU to get good throughput. * With NSS FW and rest of code required for offloading In this mode, driver just registers the interfaces and hooks them into NSS-ECM to allow offloading. This mode is not viable for use in OpenWrt due to reasons already described above. This driver is required for ipq807x to have wired networking until a better one is available, so lets add the fixed-up version for 5.15 for now. Signed-off-by: Robert Marko <robimarko@gmail.com>
49 lines
1.4 KiB
Diff
49 lines
1.4 KiB
Diff
From c9afdcdd2642485a6476906be9da2e811090fc7a Mon Sep 17 00:00:00 2001
|
|
From: Robert Marko <robimarko@gmail.com>
|
|
Date: Fri, 18 Mar 2022 18:06:03 +0100
|
|
Subject: [PATCH] switchdev: remove the transaction structure
|
|
|
|
Since 5.12 there is no transaction structure anymore, so drop it for
|
|
5.12 and newer.
|
|
|
|
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
|
---
|
|
nss_dp_switchdev.c | 10 ++++++++++
|
|
1 file changed, 10 insertions(+)
|
|
|
|
--- a/nss_dp_switchdev.c
|
|
+++ b/nss_dp_switchdev.c
|
|
@@ -279,13 +279,19 @@ void nss_dp_switchdev_setup(struct net_d
|
|
* Sets attributes
|
|
*/
|
|
static int nss_dp_port_attr_set(struct net_device *dev,
|
|
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 12, 0))
|
|
const struct switchdev_attr *attr,
|
|
struct switchdev_trans *trans)
|
|
+#else
|
|
+ const struct switchdev_attr *attr)
|
|
+#endif
|
|
{
|
|
struct nss_dp_dev *dp_priv = (struct nss_dp_dev *)netdev_priv(dev);
|
|
|
|
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 12, 0))
|
|
if (switchdev_trans_ph_prepare(trans))
|
|
return 0;
|
|
+#endif
|
|
|
|
switch (attr->id) {
|
|
case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS:
|
|
@@ -309,8 +315,12 @@ static int nss_dp_switchdev_port_attr_se
|
|
{
|
|
int err;
|
|
|
|
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 12, 0))
|
|
err = nss_dp_port_attr_set(netdev, port_attr_info->attr,
|
|
port_attr_info->trans);
|
|
+#else
|
|
+ err = nss_dp_port_attr_set(netdev, port_attr_info->attr);
|
|
+#endif
|
|
|
|
port_attr_info->handled = true;
|
|
return notifier_from_errno(err);
|