[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1443993949-3915-8-git-send-email-jiri@resnulli.us>
Date: Sun, 4 Oct 2015 23:25:42 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, sfeldma@...il.com, idosch@...lanox.com,
eladr@...lanox.com, tgraf@...g.ch, ast@...mgrid.com
Subject: [patch net-next 07/14] rocker: introduce OF-DPA world skeleton
From: Jiri Pirko <jiri@...lanox.com>
Introduce basis for OF-DPA world file. This is the place where all
OF-DPA related code is going to be moved.
Signed-off-by: Jiri Pirko <jiri@...lanox.com>
---
drivers/net/ethernet/rocker/Makefile | 2 +-
drivers/net/ethernet/rocker/rocker.h | 2 ++
drivers/net/ethernet/rocker/rocker_main.c | 1 +
drivers/net/ethernet/rocker/rocker_ofdpa.c | 27 +++++++++++++++++++++++++++
4 files changed, 31 insertions(+), 1 deletion(-)
create mode 100644 drivers/net/ethernet/rocker/rocker_ofdpa.c
diff --git a/drivers/net/ethernet/rocker/Makefile b/drivers/net/ethernet/rocker/Makefile
index 47f3492..faa36ac 100644
--- a/drivers/net/ethernet/rocker/Makefile
+++ b/drivers/net/ethernet/rocker/Makefile
@@ -3,4 +3,4 @@
#
obj-$(CONFIG_ROCKER) += rocker.o
-rocker-y := rocker_main.o rocker_tlv.o
+rocker-y := rocker_main.o rocker_tlv.o rocker_ofdpa.o
diff --git a/drivers/net/ethernet/rocker/rocker.h b/drivers/net/ethernet/rocker/rocker.h
index d49bc5d..496fe8f 100644
--- a/drivers/net/ethernet/rocker/rocker.h
+++ b/drivers/net/ethernet/rocker/rocker.h
@@ -80,4 +80,6 @@ struct rocker_world_ops {
__be16 vlan_id);
};
+extern struct rocker_world_ops rocker_ofdpa_ops;
+
#endif
diff --git a/drivers/net/ethernet/rocker/rocker_main.c b/drivers/net/ethernet/rocker/rocker_main.c
index b9b3c9d..e00c831 100644
--- a/drivers/net/ethernet/rocker/rocker_main.c
+++ b/drivers/net/ethernet/rocker/rocker_main.c
@@ -2171,6 +2171,7 @@ static int rocker_cmd_group_tbl_del(const struct rocker_port *rocker_port,
**********************/
static struct rocker_world_ops *rocker_world_ops[] = {
+ &rocker_ofdpa_ops,
};
#define ROCKER_WORLD_OPS_LEN ARRAY_SIZE(rocker_world_ops)
diff --git a/drivers/net/ethernet/rocker/rocker_ofdpa.c b/drivers/net/ethernet/rocker/rocker_ofdpa.c
new file mode 100644
index 0000000..e048b8b
--- /dev/null
+++ b/drivers/net/ethernet/rocker/rocker_ofdpa.c
@@ -0,0 +1,27 @@
+/*
+ * drivers/net/ethernet/rocker/rocker_ofdpa.c - Rocker switch OF-DPA-like
+ * implementation
+ * Copyright (c) 2014 Scott Feldman <sfeldma@...il.com>
+ * Copyright (c) 2014-2015 Jiri Pirko <jiri@...nulli.us>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include <linux/kernel.h>
+#include "rocker.h"
+
+struct ofdpa {
+};
+
+struct ofdpa_port {
+};
+
+struct rocker_world_ops rocker_ofdpa_ops = {
+ .kind = "ofdpa",
+ .priv_size = sizeof(struct ofdpa),
+ .port_priv_size = sizeof(struct ofdpa_port),
+ .mode = ROCKER_PORT_MODE_OF_DPA,
+};
--
1.9.3
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists