Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1573303 > unrolled thread
| Started by | Shannon Nelson <shannon.nelson@oracle.com> |
|---|---|
| First post | 2017-02-03 18:50 +0100 |
| Last post | 2017-02-03 18:50 +0100 |
| Articles | 3 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH net-next 0/9] sunvnet driver updates Shannon Nelson <shannon.nelson@oracle.com> - 2017-02-03 18:50 +0100
[PATCH net-next 1/9] sunvnet: make sunvnet common code dynamically loadable Shannon Nelson <shannon.nelson@oracle.com> - 2017-02-03 18:50 +0100
[PATCH net-next 3/9] sunvnet: update version and version printing Shannon Nelson <shannon.nelson@oracle.com> - 2017-02-03 18:50 +0100
| From | Shannon Nelson <shannon.nelson@oracle.com> |
|---|---|
| Date | 2017-02-03 18:50 +0100 |
| Subject | [PATCH net-next 0/9] sunvnet driver updates |
| Message-ID | <t6Q9H-4Ln-7@gated-at.bofh.it> |
The sunvnet ldom virtual network driver was due for some updates and a bugfix or two. These patches address a few items left over from last year's make-over. Shannon Nelson (8): sunvnet: make sunvnet common code dynamically loadable sunvnet: update version and version printing sunvnet: add driver stats for ethtool support sunvnet: add memory barrier before check for tx enable sunvnet: straighten up message event handling logic sunvnet: remove extra rcu_read_unlocks ldmvsw: update and simplify version string ldmvsw: disable tso and gso for bridge operations Sowmini Varadhan (1): sunvnet: remove unused variable in maybe_tx_wakeup drivers/net/ethernet/sun/Kconfig | 9 +- drivers/net/ethernet/sun/ldmvsw.c | 82 ++++++++++++++--- drivers/net/ethernet/sun/sunvnet.c | 77 ++++++++++++++-- drivers/net/ethernet/sun/sunvnet_common.c | 143 ++++++++++++++++------------ 4 files changed, 224 insertions(+), 87 deletions(-)
[toc] | [next] | [standalone]
| From | Shannon Nelson <shannon.nelson@oracle.com> |
|---|---|
| Date | 2017-02-03 18:50 +0100 |
| Subject | [PATCH net-next 1/9] sunvnet: make sunvnet common code dynamically loadable |
| Message-ID | <t6Q9I-4Ln-39@gated-at.bofh.it> |
| In reply to | #1573303 |
When the sunvnet_common code was split out for use by both sunvnet
and the newer ldmvsw, it was made into a static kernel library, which
limits the usefulness of sunvnet and ldmvsw as loadables, since most
of the real work is being done in the shared code. Also, this is
simply dead code in kernels that aren't running the LDoms.
This patch makes the sunvnet_common into a dynamically loadable
module and makes sunvnet and ldmvsw dependent on sunvnet_common.
Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
---
drivers/net/ethernet/sun/Kconfig | 9 ++++++---
drivers/net/ethernet/sun/sunvnet_common.c | 29 +++++++++++++++++++++++++++++
2 files changed, 35 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/sun/Kconfig b/drivers/net/ethernet/sun/Kconfig
index b499c57..0bde375 100644
--- a/drivers/net/ethernet/sun/Kconfig
+++ b/drivers/net/ethernet/sun/Kconfig
@@ -72,20 +72,23 @@ config CASSINI
<http://docs.oracle.com/cd/E19113-01/giga.ether.pci/817-4341-10/817-4341-10.pdf>.
config SUNVNET_COMMON
- bool
+ tristate "Common routines to support Sun Virtual Networking"
depends on SUN_LDOMS
- default y if SUN_LDOMS
-
+ default m if SUN_LDOMS
config SUNVNET
tristate "Sun Virtual Network support"
+ default m
depends on SUN_LDOMS
+ depends on SUNVNET_COMMON
---help---
Support for virtual network devices under Sun Logical Domains.
config LDMVSW
tristate "Sun4v LDoms Virtual Switch support"
+ default m
depends on SUN_LDOMS
+ depends on SUNVNET_COMMON
---help---
Support for virtual switch devices under Sun4v Logical Domains.
This driver adds a network interface for every vsw-port node
diff --git a/drivers/net/ethernet/sun/sunvnet_common.c b/drivers/net/ethernet/sun/sunvnet_common.c
index a2da2b4..77fbb23 100644
--- a/drivers/net/ethernet/sun/sunvnet_common.c
+++ b/drivers/net/ethernet/sun/sunvnet_common.c
@@ -37,6 +37,35 @@
*/
#define VNET_MAX_RETRIES 10
+#define DRV_MODULE_NAME "sunvnet_common"
+#define DRV_MODULE_VERSION "1.1"
+#define DRV_MODULE_RELDATE "February 3, 2017"
+
+static char version[] =
+ DRV_MODULE_NAME " " DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")";
+MODULE_AUTHOR("David S. Miller (davem@davemloft.net)");
+MODULE_DESCRIPTION("Sun LDOM virtual network support library");
+MODULE_LICENSE("GPL");
+MODULE_VERSION(DRV_MODULE_VERSION);
+
+static int __init sunvnet_common_init(void)
+{
+ pr_info("%s\n", version);
+ return 0;
+}
+module_init(sunvnet_common_init);
+
+static void __exit sunvnet_common_exit(void)
+{
+ /* Empty function, just here to fill the exit function pointer
+ * slot. In some combinations of older gcc and newer kernel,
+ * leaving this undefined results in the kernel marking it as a
+ * permanent module; it will show up in lsmod output as [permanent]
+ * and not be unloadable.
+ */
+}
+module_exit(sunvnet_common_exit);
+
static int __vnet_tx_trigger(struct vnet_port *port, u32 start);
static void vnet_port_reset(struct vnet_port *port);
--
1.7.1
[toc] | [prev] | [next] | [standalone]
| From | Shannon Nelson <shannon.nelson@oracle.com> |
|---|---|
| Date | 2017-02-03 18:50 +0100 |
| Subject | [PATCH net-next 3/9] sunvnet: update version and version printing |
| Message-ID | <t6Q9I-4Ln-31@gated-at.bofh.it> |
| In reply to | #1573303 |
There have been several changes since the first version of this code, so
we bump the version number. While we're at it, we can simplify the
version printing a bit and drop a couple lines of code.
Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
---
drivers/net/ethernet/sun/sunvnet.c | 14 ++++----------
1 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c
index 38d0e42..883525a 100644
--- a/drivers/net/ethernet/sun/sunvnet.c
+++ b/drivers/net/ethernet/sun/sunvnet.c
@@ -38,11 +38,11 @@
#define VNET_TX_TIMEOUT (5 * HZ)
#define DRV_MODULE_NAME "sunvnet"
-#define DRV_MODULE_VERSION "1.0"
-#define DRV_MODULE_RELDATE "June 25, 2007"
+#define DRV_MODULE_VERSION "2.0"
+#define DRV_MODULE_RELDATE "February 3, 2017"
static char version[] =
- DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
+ DRV_MODULE_NAME " " DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")";
MODULE_AUTHOR("David S. Miller (davem@davemloft.net)");
MODULE_DESCRIPTION("Sun LDOM virtual network driver");
MODULE_LICENSE("GPL");
@@ -300,11 +300,6 @@ static struct vio_driver_ops vnet_vio_ops = {
.handshake_complete = sunvnet_handshake_complete_common,
};
-static void print_version(void)
-{
- printk_once(KERN_INFO "%s", version);
-}
-
const char *remote_macaddr_prop = "remote-mac-address";
static int vnet_port_probe(struct vio_dev *vdev, const struct vio_device_id *id)
@@ -317,8 +312,6 @@ static int vnet_port_probe(struct vio_dev *vdev, const struct vio_device_id *id)
int len, i, err, switch_port;
u64 node;
- print_version();
-
hp = mdesc_grab();
node = vio_vdev_node(hp, vdev);
@@ -453,6 +446,7 @@ static struct vio_driver vnet_port_driver = {
static int __init vnet_init(void)
{
+ pr_info("%s\n", version);
return vio_register_driver(&vnet_port_driver);
}
--
1.7.1
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web