* [PATCH 2.6.12-rc2] aoe [1/6]: improve allowed interfaces configuration
@ 2005-04-20 17:02 Ed L Cashin
2005-04-20 17:05 ` [PATCH 2.6.12-rc2] aoe [2/6]: aoe-stat should work for built-in as well as module Ed L Cashin
` (5 more replies)
0 siblings, 6 replies; 17+ messages in thread
From: Ed L Cashin @ 2005-04-20 17:02 UTC (permalink / raw)
To: linux-kernel; +Cc: ecashin, Greg K-H
improve allowed interfaces configuration
Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
diff -uprN a/Documentation/aoe/aoe.txt b/Documentation/aoe/aoe.txt
--- a/Documentation/aoe/aoe.txt 2005-04-20 11:40:55.000000000 -0400
+++ b/Documentation/aoe/aoe.txt 2005-04-20 11:42:20.000000000 -0400
@@ -33,6 +33,9 @@ USING DEVICE NODES
"cat /dev/etherd/err" blocks, waiting for error diagnostic output,
like any retransmitted packets.
+ The /dev/etherd/interfaces special file is obsoleted by the
+ aoe_iflist boot option and module option (and its sysfs entry
+ described in the next section).
"echo eth2 eth4 > /dev/etherd/interfaces" tells the aoe driver to
limit ATA over Ethernet traffic to eth2 and eth4. AoE traffic from
untrusted networks should be ignored as a matter of security.
@@ -89,3 +92,24 @@ USING SYSFS
e4.7 eth1 up
e4.8 eth1 up
e4.9 eth1 up
+
+ When the aoe driver is a module, use
+ /sys/module/aoe/parameters/aoe_iflist instead of
+ /dev/etherd/interfaces to limit AoE traffic to the network
+ interfaces in the given whitespace-separated list. Unlike the old
+ character device, the sysfs entry can be read from as well as
+ written to.
+
+ It's helpful to trigger discovery after setting the list of allowed
+ interfaces. If your distro provides an aoe-discover script, you can
+ use that. Otherwise, you can directly use the /dev/etherd/discover
+ file described above.
+
+DRIVER OPTIONS
+
+ There is a boot option for the built-in aoe driver and a
+ corresponding module parameter, aoe_iflist. Without this option,
+ all network interfaces may be used for ATA over Ethernet. Here is a
+ usage example for the module parameter.
+
+ modprobe aoe_iflist="eth1 eth3"
diff -uprN a/drivers/block/aoe/aoenet.c b/drivers/block/aoe/aoenet.c
--- a/drivers/block/aoe/aoenet.c 2005-04-20 11:41:18.000000000 -0400
+++ b/drivers/block/aoe/aoenet.c 2005-04-20 11:42:20.000000000 -0400
@@ -7,6 +7,7 @@
#include <linux/hdreg.h>
#include <linux/blkdev.h>
#include <linux/netdevice.h>
+#include <linux/moduleparam.h>
#include "aoe.h"
#define NECODES 5
@@ -26,6 +27,19 @@ enum {
};
static char aoe_iflist[IFLISTSZ];
+module_param_string(aoe_iflist, aoe_iflist, IFLISTSZ, 0600);
+MODULE_PARM_DESC(aoe_iflist, " aoe_iflist=\"dev1 [dev2 ...]\n");
+
+#ifndef MODULE
+static int __init aoe_iflist_setup(char *str)
+{
+ strncpy(aoe_iflist, str, IFLISTSZ);
+ aoe_iflist[IFLISTSZ - 1] = '\0';
+ return 1;
+}
+
+__setup("aoe_iflist=", aoe_iflist_setup);
+#endif
int
is_aoe_netif(struct net_device *ifp)
@@ -36,7 +50,8 @@ is_aoe_netif(struct net_device *ifp)
if (aoe_iflist[0] == '\0')
return 1;
- for (p = aoe_iflist; *p; p = q + strspn(q, WHITESPACE)) {
+ p = aoe_iflist + strspn(aoe_iflist, WHITESPACE);
+ for (; *p; p = q + strspn(q, WHITESPACE)) {
q = p + strcspn(p, WHITESPACE);
if (q != p)
len = q - p;
--
Ed L. Cashin <ecashin@coraid.com>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 2.6.12-rc2] aoe [2/6]: aoe-stat should work for built-in as well as module
2005-04-20 17:02 [PATCH 2.6.12-rc2] aoe [1/6]: improve allowed interfaces configuration Ed L Cashin
@ 2005-04-20 17:05 ` Ed L Cashin
2005-04-20 17:05 ` [PATCH 2.6.12-rc2] aoe [3/6]: update the documentation to mention aoetools Ed L Cashin
` (4 subsequent siblings)
5 siblings, 0 replies; 17+ messages in thread
From: Ed L Cashin @ 2005-04-20 17:05 UTC (permalink / raw)
To: linux-kernel; +Cc: ecashin, Greg K-H
aoe-stat should work for built-in as well as module
Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
diff -uprN a/Documentation/aoe/status.sh b/Documentation/aoe/status.sh
--- a/Documentation/aoe/status.sh 2005-04-20 11:40:55.000000000 -0400
+++ b/Documentation/aoe/status.sh 2005-04-20 11:42:20.000000000 -0400
@@ -14,10 +14,6 @@ test ! -d "$sysd/block" && {
echo "$me Error: sysfs is not mounted" 1>&2
exit 1
}
-test -z "`lsmod | grep '^aoe'`" && {
- echo "$me Error: aoe module is not loaded" 1>&2
- exit 1
-}
for d in `ls -d $sysd/block/etherd* 2>/dev/null | grep -v p` end; do
# maybe ls comes up empty, so we use "end"
--
Ed L. Cashin <ecashin@coraid.com>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 2.6.12-rc2] aoe [3/6]: update the documentation to mention aoetools
2005-04-20 17:02 [PATCH 2.6.12-rc2] aoe [1/6]: improve allowed interfaces configuration Ed L Cashin
2005-04-20 17:05 ` [PATCH 2.6.12-rc2] aoe [2/6]: aoe-stat should work for built-in as well as module Ed L Cashin
@ 2005-04-20 17:05 ` Ed L Cashin
2005-04-20 17:06 ` [PATCH 2.6.12-rc2] aoe [4/6]: allow multiple aoe devices to have the same mac Ed L Cashin
` (3 subsequent siblings)
5 siblings, 0 replies; 17+ messages in thread
From: Ed L Cashin @ 2005-04-20 17:05 UTC (permalink / raw)
To: linux-kernel; +Cc: ecashin, Greg K-H
update the documentation to mention aoetools
Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
diff -uprN a/Documentation/aoe/aoe.txt b/Documentation/aoe/aoe.txt
--- a/Documentation/aoe/aoe.txt 2005-04-20 11:42:20.000000000 -0400
+++ b/Documentation/aoe/aoe.txt 2005-04-20 11:42:21.000000000 -0400
@@ -4,6 +4,16 @@ The EtherDrive (R) HOWTO for users of 2.
It has many tips and hints!
+The aoetools are userland programs that are designed to work with this
+driver. The aoetools are on sourceforge.
+
+ http://aoetools.sourceforge.net/
+
+The scripts in this Documentation/aoe directory are intended to
+document the use of the driver and are not necessary if you install
+the aoetools.
+
+
CREATING DEVICE NODES
Users of udev should find the block device nodes created
@@ -33,19 +43,17 @@ USING DEVICE NODES
"cat /dev/etherd/err" blocks, waiting for error diagnostic output,
like any retransmitted packets.
- The /dev/etherd/interfaces special file is obsoleted by the
- aoe_iflist boot option and module option (and its sysfs entry
- described in the next section).
"echo eth2 eth4 > /dev/etherd/interfaces" tells the aoe driver to
limit ATA over Ethernet traffic to eth2 and eth4. AoE traffic from
- untrusted networks should be ignored as a matter of security.
+ untrusted networks should be ignored as a matter of security. See
+ also the aoe_iflist driver option described below.
"echo > /dev/etherd/discover" tells the driver to find out what AoE
devices are available.
These character devices may disappear and be replaced by sysfs
- counterparts, so distribution maintainers are encouraged to create
- scripts that use these devices.
+ counterparts. Using the commands in aoetools insulates users from
+ these implementation details.
The block devices are named like this:
@@ -69,7 +77,8 @@ USING SYSFS
through which we are communicating with the remote AoE device.
There is a script in this directory that formats this information
- in a convenient way.
+ in a convenient way. Users with aoetools can use the aoe-stat
+ command.
root@makki root# sh Documentation/aoe/status.sh
e10.0 eth3 up
@@ -101,9 +110,9 @@ USING SYSFS
written to.
It's helpful to trigger discovery after setting the list of allowed
- interfaces. If your distro provides an aoe-discover script, you can
- use that. Otherwise, you can directly use the /dev/etherd/discover
- file described above.
+ interfaces. The aoetools package provides an aoe-discover script
+ for this purpose. You can also directly use the
+ /dev/etherd/discover special file described above.
DRIVER OPTIONS
--
Ed L. Cashin <ecashin@coraid.com>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 2.6.12-rc2] aoe [4/6]: allow multiple aoe devices to have the same mac
2005-04-20 17:02 [PATCH 2.6.12-rc2] aoe [1/6]: improve allowed interfaces configuration Ed L Cashin
2005-04-20 17:05 ` [PATCH 2.6.12-rc2] aoe [2/6]: aoe-stat should work for built-in as well as module Ed L Cashin
2005-04-20 17:05 ` [PATCH 2.6.12-rc2] aoe [3/6]: update the documentation to mention aoetools Ed L Cashin
@ 2005-04-20 17:06 ` Ed L Cashin
2005-04-20 17:06 ` [PATCH 2.6.12-rc2] aoe [5/6]: add firmware version to info in sysfs Ed L Cashin
` (2 subsequent siblings)
5 siblings, 0 replies; 17+ messages in thread
From: Ed L Cashin @ 2005-04-20 17:06 UTC (permalink / raw)
To: linux-kernel; +Cc: ecashin, Greg K-H
allow multiple aoe devices to have the same mac
Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
diff -u b/drivers/block/aoe/aoedev.c b/drivers/block/aoe/aoedev.c
--- b/drivers/block/aoe/aoedev.c 2005-04-20 11:42:18.000000000 -0400
+++ b/drivers/block/aoe/aoedev.c 2005-04-20 11:42:22.000000000 -0400
@@ -109,25 +109,22 @@
spin_lock_irqsave(&devlist_lock, flags);
for (d=devlist; d; d=d->next)
- if (d->sysminor == sysminor
- || memcmp(d->addr, addr, sizeof d->addr) == 0)
+ if (d->sysminor == sysminor)
break;
if (d == NULL && (d = aoedev_newdev(bufcnt)) == NULL) {
spin_unlock_irqrestore(&devlist_lock, flags);
printk(KERN_INFO "aoe: aoedev_set: aoedev_newdev failure.\n");
return NULL;
- }
+ } /* if newdev, (d->flags & DEVFL_UP) == 0 for below */
spin_unlock_irqrestore(&devlist_lock, flags);
spin_lock_irqsave(&d->lock, flags);
d->ifp = ifp;
-
- if (d->sysminor != sysminor
- || (d->flags & DEVFL_UP) == 0) {
+ memcpy(d->addr, addr, sizeof d->addr);
+ if ((d->flags & DEVFL_UP) == 0) {
aoedev_downdev(d); /* flushes outstanding frames */
- memcpy(d->addr, addr, sizeof d->addr);
d->sysminor = sysminor;
d->aoemajor = AOEMAJOR(sysminor);
d->aoeminor = AOEMINOR(sysminor);
--
Ed L. Cashin <ecashin@coraid.com>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 2.6.12-rc2] aoe [5/6]: add firmware version to info in sysfs
2005-04-20 17:02 [PATCH 2.6.12-rc2] aoe [1/6]: improve allowed interfaces configuration Ed L Cashin
` (2 preceding siblings ...)
2005-04-20 17:06 ` [PATCH 2.6.12-rc2] aoe [4/6]: allow multiple aoe devices to have the same mac Ed L Cashin
@ 2005-04-20 17:06 ` Ed L Cashin
2005-04-20 17:37 ` Randy.Dunlap
2005-04-20 17:06 ` [PATCH 2.6.12-rc2] aoe [6/6]: update version number to 10 Ed L Cashin
2005-04-20 17:16 ` [PATCH 2.6.12-rc2] aoe [1/6]: improve allowed interfaces configuration Randy.Dunlap
5 siblings, 1 reply; 17+ messages in thread
From: Ed L Cashin @ 2005-04-20 17:06 UTC (permalink / raw)
To: linux-kernel; +Cc: ecashin, Greg K-H
add firmware version to info in sysfs
Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
diff -uprN a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c
--- a/drivers/block/aoe/aoeblk.c 2005-04-20 11:41:18.000000000 -0400
+++ b/drivers/block/aoe/aoeblk.c 2005-04-20 11:42:23.000000000 -0400
@@ -37,6 +37,13 @@ static ssize_t aoedisk_show_netif(struct
return snprintf(page, PAGE_SIZE, "%s\n", d->ifp->name);
}
+/* firmware version */
+static ssize_t aoedisk_show_fwver(struct gendisk * disk, char *page)
+{
+ struct aoedev *d = disk->private_data;
+
+ return snprintf(page, PAGE_SIZE, "0x%04x\n", (unsigned int) d->fw_ver);
+}
static struct disk_attribute disk_attr_state = {
.attr = {.name = "state", .mode = S_IRUGO },
@@ -50,6 +57,10 @@ static struct disk_attribute disk_attr_n
.attr = {.name = "netif", .mode = S_IRUGO },
.show = aoedisk_show_netif
};
+static struct disk_attribute disk_attr_fwver = {
+ .attr = {.name = "fwver", .mode = S_IRUGO },
+ .show = aoedisk_show_fwver
+};
static void
aoedisk_add_sysfs(struct aoedev *d)
@@ -57,6 +68,7 @@ aoedisk_add_sysfs(struct aoedev *d)
sysfs_create_file(&d->gd->kobj, &disk_attr_state.attr);
sysfs_create_file(&d->gd->kobj, &disk_attr_mac.attr);
sysfs_create_file(&d->gd->kobj, &disk_attr_netif.attr);
+ sysfs_create_file(&d->gd->kobj, &disk_attr_fwver.attr);
}
void
aoedisk_rm_sysfs(struct aoedev *d)
@@ -64,6 +76,7 @@ aoedisk_rm_sysfs(struct aoedev *d)
sysfs_remove_link(&d->gd->kobj, "state");
sysfs_remove_link(&d->gd->kobj, "mac");
sysfs_remove_link(&d->gd->kobj, "netif");
+ sysfs_remove_link(&d->gd->kobj, "fwver");
}
static int
--
Ed L. Cashin <ecashin@coraid.com>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 2.6.12-rc2] aoe [6/6]: update version number to 10
2005-04-20 17:02 [PATCH 2.6.12-rc2] aoe [1/6]: improve allowed interfaces configuration Ed L Cashin
` (3 preceding siblings ...)
2005-04-20 17:06 ` [PATCH 2.6.12-rc2] aoe [5/6]: add firmware version to info in sysfs Ed L Cashin
@ 2005-04-20 17:06 ` Ed L Cashin
2005-04-20 17:16 ` [PATCH 2.6.12-rc2] aoe [1/6]: improve allowed interfaces configuration Randy.Dunlap
5 siblings, 0 replies; 17+ messages in thread
From: Ed L Cashin @ 2005-04-20 17:06 UTC (permalink / raw)
To: linux-kernel; +Cc: ecashin, Greg K-H
update version number to 10
Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
--- b/drivers/block/aoe/aoe.h 2005-04-20 11:42:19.000000000 -0400
+++ b/drivers/block/aoe/aoe.h 2005-04-20 11:42:22.000000000 -0400
@@ -1,5 +1,5 @@
/* Copyright (c) 2004 Coraid, Inc. See COPYING for GPL terms. */
-#define VERSION "6"
+#define VERSION "10"
#define AOE_MAJOR 152
#define DEVICE_NAME "aoe"
--
Ed L. Cashin <ecashin@coraid.com>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2.6.12-rc2] aoe [1/6]: improve allowed interfaces configuration
2005-04-20 17:02 [PATCH 2.6.12-rc2] aoe [1/6]: improve allowed interfaces configuration Ed L Cashin
` (4 preceding siblings ...)
2005-04-20 17:06 ` [PATCH 2.6.12-rc2] aoe [6/6]: update version number to 10 Ed L Cashin
@ 2005-04-20 17:16 ` Randy.Dunlap
2005-04-20 17:27 ` Ed L Cashin
5 siblings, 1 reply; 17+ messages in thread
From: Randy.Dunlap @ 2005-04-20 17:16 UTC (permalink / raw)
To: Ed L Cashin; +Cc: linux-kernel, ecashin, greg
On Wed, 20 Apr 2005 13:02:12 -0400 Ed L Cashin wrote:
Just a nit/typo:
| + modprobe aoe_iflist="eth1 eth3"
| static char aoe_iflist[IFLISTSZ];
| +module_param_string(aoe_iflist, aoe_iflist, IFLISTSZ, 0600);
| +MODULE_PARM_DESC(aoe_iflist, " aoe_iflist=\"dev1 [dev2 ...]\n");
No leading space (" aoe_iflist=") and put a trailing \" in it:
+MODULE_PARM_DESC(aoe_iflist, "aoe_iflist=\"dev1 [dev2 ...]\"\n");
---
~Randy
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2.6.12-rc2] aoe [1/6]: improve allowed interfaces configuration
2005-04-20 17:16 ` [PATCH 2.6.12-rc2] aoe [1/6]: improve allowed interfaces configuration Randy.Dunlap
@ 2005-04-20 17:27 ` Ed L Cashin
0 siblings, 0 replies; 17+ messages in thread
From: Ed L Cashin @ 2005-04-20 17:27 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: linux-kernel, greg
[-- Attachment #1: Type: text/plain, Size: 602 bytes --]
"Randy.Dunlap" <rddunlap@osdl.org> writes:
> On Wed, 20 Apr 2005 13:02:12 -0400 Ed L Cashin wrote:
>
> Just a nit/typo:
>
> | + modprobe aoe_iflist="eth1 eth3"
>
> | static char aoe_iflist[IFLISTSZ];
> | +module_param_string(aoe_iflist, aoe_iflist, IFLISTSZ, 0600);
> | +MODULE_PARM_DESC(aoe_iflist, " aoe_iflist=\"dev1 [dev2 ...]\n");
>
> No leading space (" aoe_iflist=") and put a trailing \" in it:
>
> +MODULE_PARM_DESC(aoe_iflist, "aoe_iflist=\"dev1 [dev2 ...]\"\n");
Thanks for catching that.
improve allowed interfaces configuration
Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
[-- Attachment #2: patch-124.rediff --]
[-- Type: text/plain, Size: 2878 bytes --]
diff -uprN a/Documentation/aoe/aoe.txt b/Documentation/aoe/aoe.txt
--- a/Documentation/aoe/aoe.txt 2005-04-20 11:40:55.000000000 -0400
+++ b/Documentation/aoe/aoe.txt 2005-04-20 11:42:20.000000000 -0400
@@ -33,6 +33,9 @@ USING DEVICE NODES
"cat /dev/etherd/err" blocks, waiting for error diagnostic output,
like any retransmitted packets.
+ The /dev/etherd/interfaces special file is obsoleted by the
+ aoe_iflist boot option and module option (and its sysfs entry
+ described in the next section).
"echo eth2 eth4 > /dev/etherd/interfaces" tells the aoe driver to
limit ATA over Ethernet traffic to eth2 and eth4. AoE traffic from
untrusted networks should be ignored as a matter of security.
@@ -89,3 +92,24 @@ USING SYSFS
e4.7 eth1 up
e4.8 eth1 up
e4.9 eth1 up
+
+ When the aoe driver is a module, use
+ /sys/module/aoe/parameters/aoe_iflist instead of
+ /dev/etherd/interfaces to limit AoE traffic to the network
+ interfaces in the given whitespace-separated list. Unlike the old
+ character device, the sysfs entry can be read from as well as
+ written to.
+
+ It's helpful to trigger discovery after setting the list of allowed
+ interfaces. If your distro provides an aoe-discover script, you can
+ use that. Otherwise, you can directly use the /dev/etherd/discover
+ file described above.
+
+DRIVER OPTIONS
+
+ There is a boot option for the built-in aoe driver and a
+ corresponding module parameter, aoe_iflist. Without this option,
+ all network interfaces may be used for ATA over Ethernet. Here is a
+ usage example for the module parameter.
+
+ modprobe aoe_iflist="eth1 eth3"
diff -uprN a/drivers/block/aoe/aoenet.c b/drivers/block/aoe/aoenet.c
--- a/drivers/block/aoe/aoenet.c 2005-04-20 11:41:18.000000000 -0400
+++ b/drivers/block/aoe/aoenet.c 2005-04-20 11:42:20.000000000 -0400
@@ -7,6 +7,7 @@
#include <linux/hdreg.h>
#include <linux/blkdev.h>
#include <linux/netdevice.h>
+#include <linux/moduleparam.h>
#include "aoe.h"
#define NECODES 5
@@ -26,6 +27,19 @@ enum {
};
static char aoe_iflist[IFLISTSZ];
+module_param_string(aoe_iflist, aoe_iflist, IFLISTSZ, 0600);
+MODULE_PARM_DESC(aoe_iflist, "aoe_iflist=\"dev1 [dev2 ...]\"\n");
+
+#ifndef MODULE
+static int __init aoe_iflist_setup(char *str)
+{
+ strncpy(aoe_iflist, str, IFLISTSZ);
+ aoe_iflist[IFLISTSZ - 1] = '\0';
+ return 1;
+}
+
+__setup("aoe_iflist=", aoe_iflist_setup);
+#endif
int
is_aoe_netif(struct net_device *ifp)
@@ -36,7 +50,8 @@ is_aoe_netif(struct net_device *ifp)
if (aoe_iflist[0] == '\0')
return 1;
- for (p = aoe_iflist; *p; p = q + strspn(q, WHITESPACE)) {
+ p = aoe_iflist + strspn(aoe_iflist, WHITESPACE);
+ for (; *p; p = q + strspn(q, WHITESPACE)) {
q = p + strcspn(p, WHITESPACE);
if (q != p)
len = q - p;
[-- Attachment #3: Type: text/plain, Size: 41 bytes --]
--
Ed L Cashin <ecashin@coraid.com>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2.6.12-rc2] aoe [5/6]: add firmware version to info in sysfs
2005-04-20 17:06 ` [PATCH 2.6.12-rc2] aoe [5/6]: add firmware version to info in sysfs Ed L Cashin
@ 2005-04-20 17:37 ` Randy.Dunlap
2005-04-20 19:13 ` Ed L Cashin
0 siblings, 1 reply; 17+ messages in thread
From: Randy.Dunlap @ 2005-04-20 17:37 UTC (permalink / raw)
To: Ed L Cashin; +Cc: linux-kernel, ecashin, greg
| add firmware version to info in sysfs
|
| +static struct disk_attribute disk_attr_fwver = {
| + .attr = {.name = "fwver", .mode = S_IRUGO },
| + .show = aoedisk_show_fwver
| +};
| @@ -64,6 +76,7 @@ aoedisk_rm_sysfs(struct aoedev *d)
| sysfs_remove_link(&d->gd->kobj, "state");
| sysfs_remove_link(&d->gd->kobj, "mac");
| sysfs_remove_link(&d->gd->kobj, "netif");
| + sysfs_remove_link(&d->gd->kobj, "fwver");
It's a good thing that you spelled out "firmware version"
for me.
Just seeing 'fwver' provided these comments from others:
n vwls s bd (well, it does have 'e'; maybe it shouldn't :)
friends fwver
fw is firewire
so something like 'firmware-version' would be appreciated
(for the sysfs filename).
Thanks,
---
~Randy
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2.6.12-rc2] aoe [5/6]: add firmware version to info in sysfs
2005-04-20 17:37 ` Randy.Dunlap
@ 2005-04-20 19:13 ` Ed L Cashin
0 siblings, 0 replies; 17+ messages in thread
From: Ed L Cashin @ 2005-04-20 19:13 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: linux-kernel, greg
[-- Attachment #1: Type: text/plain, Size: 327 bytes --]
"Randy.Dunlap" <rddunlap@osdl.org> writes:
...
> so something like 'firmware-version' would be appreciated
> (for the sysfs filename).
Fair enough. This patch follows and depends on the fifth patch of the
six.
use a more explicit filename for sysfs firmware version info
Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
[-- Attachment #2: patch-135 --]
[-- Type: text/plain, Size: 828 bytes --]
diff -urNp a-exp/linux/drivers/block/aoe/aoeblk.c b-exp/linux/drivers/block/aoe/aoeblk.c
--- a-exp/linux/drivers/block/aoe/aoeblk.c 2005-04-20 15:09:13.000000000 -0400
+++ b-exp/linux/drivers/block/aoe/aoeblk.c 2005-04-20 15:09:13.000000000 -0400
@@ -58,7 +58,7 @@ static struct disk_attribute disk_attr_n
.show = aoedisk_show_netif
};
static struct disk_attribute disk_attr_fwver = {
- .attr = {.name = "fwver", .mode = S_IRUGO },
+ .attr = {.name = "firmware-version", .mode = S_IRUGO },
.show = aoedisk_show_fwver
};
@@ -76,7 +76,7 @@ aoedisk_rm_sysfs(struct aoedev *d)
sysfs_remove_link(&d->gd->kobj, "state");
sysfs_remove_link(&d->gd->kobj, "mac");
sysfs_remove_link(&d->gd->kobj, "netif");
- sysfs_remove_link(&d->gd->kobj, "fwver");
+ sysfs_remove_link(&d->gd->kobj, "firmware-version");
}
static int
[-- Attachment #3: Type: text/plain, Size: 42 bytes --]
--
Ed L Cashin <ecashin@coraid.com>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2.6.12-rc2] aoe [1/6]: improve allowed interfaces configuration
[not found] <3VqSf-2z7-15@gated-at.bofh.it>
@ 2005-04-21 7:14 ` Bodo Eggert <harvested.in.lkml@posting.7eggert.dyndns.org>
2005-04-21 13:36 ` Ed L Cashin
0 siblings, 1 reply; 17+ messages in thread
From: Bodo Eggert <harvested.in.lkml@posting.7eggert.dyndns.org> @ 2005-04-21 7:14 UTC (permalink / raw)
To: Ed L Cashin, linux-kernel, ecashin, Greg K-H
Ed L Cashin <ecashin@coraid.com> wrote:
> +++ b/Documentation/aoe/aoe.txt 2005-04-20 11:42:20.000000000 -0400
> + When the aoe driver is a module, use
Is there any reason for this inconsistent behaviour?
> + /sys/module/aoe/parameters/aoe_iflist instead of
^^^
Why does the module name need to be part of the attribute?
That's redundant. That's redundant.
> + There is a boot option for the built-in aoe driver and a
> + corresponding module parameter, aoe_iflist. Without this option,
> + all network interfaces may be used for ATA over Ethernet. Here is a
> + usage example for the module parameter.
> +
> + modprobe aoe_iflist="eth1 eth3"
^
"aoe"
--
Top 100 things you don't want the sysadmin to say:
63. Oracle will be down until 8pm, but you can come back in and finish your
work when it comes up tonight.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2.6.12-rc2] aoe [1/6]: improve allowed interfaces configuration
2005-04-21 7:14 ` Bodo Eggert <harvested.in.lkml@posting.7eggert.dyndns.org>
@ 2005-04-21 13:36 ` Ed L Cashin
2005-04-21 14:56 ` Greg KH
2005-04-21 20:54 ` Domen Puncer
0 siblings, 2 replies; 17+ messages in thread
From: Ed L Cashin @ 2005-04-21 13:36 UTC (permalink / raw)
To: 7eggert; +Cc: linux-kernel, Greg K-H
"Bodo Eggert <harvested.in.lkml@posting.7eggert.dyndns.org>" <7eggert@gmx.de> writes:
> Ed L Cashin <ecashin@coraid.com> wrote:
>
>> +++ b/Documentation/aoe/aoe.txt 2005-04-20 11:42:20.000000000 -0400
>
>> + When the aoe driver is a module, use
>
> Is there any reason for this inconsistent behaviour?
Yes, the /sys/module/aoe area is only present when the aoe driver is a
module. It would be nicer if there were a sysfs area where I could
put this file regardless of whether the driver is a module or built
into the kernel.
I could probably create one, but I got the file in
/sys/module/aoe/parameters for free when I used module_param_string.
>> + /sys/module/aoe/parameters/aoe_iflist instead of
> ^^^
>
> Why does the module name need to be part of the attribute?
> That's redundant. That's redundant.
Yes. That's true. Redundancy isn't always bad, though, and using the
"aoe_" prefix lets the kernel parameter for the built-in aoe driver be
the same as the parameter for the modular driver.
--
Ed L Cashin <ecashin@coraid.com>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2.6.12-rc2] aoe [1/6]: improve allowed interfaces configuration
2005-04-21 13:36 ` Ed L Cashin
@ 2005-04-21 14:56 ` Greg KH
2005-04-21 15:30 ` Ed L Cashin
2005-04-21 20:54 ` Domen Puncer
1 sibling, 1 reply; 17+ messages in thread
From: Greg KH @ 2005-04-21 14:56 UTC (permalink / raw)
To: Ed L Cashin; +Cc: 7eggert, linux-kernel
On Thu, Apr 21, 2005 at 09:36:17AM -0400, Ed L Cashin wrote:
> "Bodo Eggert <harvested.in.lkml@posting.7eggert.dyndns.org>" <7eggert@gmx.de> writes:
>
> > Ed L Cashin <ecashin@coraid.com> wrote:
> >
> >> +++ b/Documentation/aoe/aoe.txt 2005-04-20 11:42:20.000000000 -0400
> >
> >> + When the aoe driver is a module, use
> >
> > Is there any reason for this inconsistent behaviour?
>
> Yes, the /sys/module/aoe area is only present when the aoe driver is a
> module.
Not true, have you looked in /sys/module lately? :)
> It would be nicer if there were a sysfs area where I could
> put this file regardless of whether the driver is a module or built
> into the kernel.
That's the place for it. It will be there if the driver is built as a
module or into the kernel.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2.6.12-rc2] aoe [1/6]: improve allowed interfaces configuration
2005-04-21 14:56 ` Greg KH
@ 2005-04-21 15:30 ` Ed L Cashin
2005-04-21 16:01 ` Greg KH
2005-04-21 16:32 ` Randy.Dunlap
0 siblings, 2 replies; 17+ messages in thread
From: Ed L Cashin @ 2005-04-21 15:30 UTC (permalink / raw)
To: Greg KH; +Cc: 7eggert, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1202 bytes --]
Greg KH <greg@kroah.com> writes:
> On Thu, Apr 21, 2005 at 09:36:17AM -0400, Ed L Cashin wrote:
>> "Bodo Eggert <harvested.in.lkml@posting.7eggert.dyndns.org>" <7eggert@gmx.de> writes:
>>
>> > Ed L Cashin <ecashin@coraid.com> wrote:
>> >
>> >> +++ b/Documentation/aoe/aoe.txt 2005-04-20 11:42:20.000000000 -0400
>> >
>> >> + When the aoe driver is a module, use
>> >
>> > Is there any reason for this inconsistent behaviour?
>>
>> Yes, the /sys/module/aoe area is only present when the aoe driver is a
>> module.
>
> Not true, have you looked in /sys/module lately? :)
>
>> It would be nicer if there were a sysfs area where I could
>> put this file regardless of whether the driver is a module or built
>> into the kernel.
>
> That's the place for it. It will be there if the driver is built as a
> module or into the kernel.
Wow! Well, that's very convenient for driver writers, so I'm pleased,
and I can update the docs. It surprises me, though, to find out that
/sys/module is for things other than modules.
The correction below follows and depends on patch 1 of the six.
fix docs: built-in driver can use files in /sys/module
Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
[-- Attachment #2: diff --]
[-- Type: text/plain, Size: 1128 bytes --]
diff -urNp a-exp/linux/Documentation/aoe/aoe.txt b-exp/linux/Documentation/aoe/aoe.txt
--- a-exp/linux/Documentation/aoe/aoe.txt 2005-04-21 11:25:48.000000000 -0400
+++ b-exp/linux/Documentation/aoe/aoe.txt 2005-04-21 11:25:49.000000000 -0400
@@ -102,12 +102,11 @@ USING SYSFS
e4.8 eth1 up
e4.9 eth1 up
- When the aoe driver is a module, use
- /sys/module/aoe/parameters/aoe_iflist instead of
- /dev/etherd/interfaces to limit AoE traffic to the network
- interfaces in the given whitespace-separated list. Unlike the old
- character device, the sysfs entry can be read from as well as
- written to.
+ Use /sys/module/aoe/parameters/aoe_iflist (or better, the driver
+ option discussed below) instead of /dev/etherd/interfaces to limit
+ AoE traffic to the network interfaces in the given
+ whitespace-separated list. Unlike the old character device, the
+ sysfs entry can be read from as well as written to.
It's helpful to trigger discovery after setting the list of allowed
interfaces. The aoetools package provides an aoe-discover script
[-- Attachment #3: Type: text/plain, Size: 41 bytes --]
--
Ed L Cashin <ecashin@coraid.com>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2.6.12-rc2] aoe [1/6]: improve allowed interfaces configuration
2005-04-21 15:30 ` Ed L Cashin
@ 2005-04-21 16:01 ` Greg KH
2005-04-21 16:32 ` Randy.Dunlap
1 sibling, 0 replies; 17+ messages in thread
From: Greg KH @ 2005-04-21 16:01 UTC (permalink / raw)
To: Ed L Cashin; +Cc: 7eggert, linux-kernel
On Thu, Apr 21, 2005 at 11:30:06AM -0400, Ed L Cashin wrote:
> Greg KH <greg@kroah.com> writes:
>
> > On Thu, Apr 21, 2005 at 09:36:17AM -0400, Ed L Cashin wrote:
> >> "Bodo Eggert <harvested.in.lkml@posting.7eggert.dyndns.org>" <7eggert@gmx.de> writes:
> >>
> >> > Ed L Cashin <ecashin@coraid.com> wrote:
> >> >
> >> >> +++ b/Documentation/aoe/aoe.txt 2005-04-20 11:42:20.000000000 -0400
> >> >
> >> >> + When the aoe driver is a module, use
> >> >
> >> > Is there any reason for this inconsistent behaviour?
> >>
> >> Yes, the /sys/module/aoe area is only present when the aoe driver is a
> >> module.
> >
> > Not true, have you looked in /sys/module lately? :)
> >
> >> It would be nicer if there were a sysfs area where I could
> >> put this file regardless of whether the driver is a module or built
> >> into the kernel.
> >
> > That's the place for it. It will be there if the driver is built as a
> > module or into the kernel.
>
> Wow! Well, that's very convenient for driver writers, so I'm pleased,
> and I can update the docs. It surprises me, though, to find out that
> /sys/module is for things other than modules.
It's not for things other than modules, it's filling a real need that
you yourself just pointed out. Namely, we need to be able to have
access to module paramaters in a consistant place, no matter if the
driver is built into the kernel or not.
Man, you try to be nice to people... :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2.6.12-rc2] aoe [1/6]: improve allowed interfaces configuration
2005-04-21 15:30 ` Ed L Cashin
2005-04-21 16:01 ` Greg KH
@ 2005-04-21 16:32 ` Randy.Dunlap
1 sibling, 0 replies; 17+ messages in thread
From: Randy.Dunlap @ 2005-04-21 16:32 UTC (permalink / raw)
To: Ed L Cashin; +Cc: greg, 7eggert, linux-kernel
On Thu, 21 Apr 2005 11:30:06 -0400 Ed L Cashin wrote:
| Greg KH <greg@kroah.com> writes:
|
| > On Thu, Apr 21, 2005 at 09:36:17AM -0400, Ed L Cashin wrote:
| >> "Bodo Eggert <harvested.in.lkml@posting.7eggert.dyndns.org>" <7eggert@gmx.de> writes:
| >>
| >> > Ed L Cashin <ecashin@coraid.com> wrote:
| >> >
| >> >> +++ b/Documentation/aoe/aoe.txt 2005-04-20 11:42:20.000000000 -0400
| >> >
| >> >> + When the aoe driver is a module, use
| >> >
| >> > Is there any reason for this inconsistent behaviour?
| >>
| >> Yes, the /sys/module/aoe area is only present when the aoe driver is a
| >> module.
| >
| > Not true, have you looked in /sys/module lately? :)
| >
| >> It would be nicer if there were a sysfs area where I could
| >> put this file regardless of whether the driver is a module or built
| >> into the kernel.
| >
| > That's the place for it. It will be there if the driver is built as a
| > module or into the kernel.
|
| Wow! Well, that's very convenient for driver writers, so I'm pleased,
| and I can update the docs. It surprises me, though, to find out that
| /sys/module is for things other than modules.
Just depends on your definition of a module.
AOE (or just about any device driver) can be considered logically
as a module. You seem to be equating module with "loadable module"
vs. a builtin module. The good news is that /sys/module works
for loadable or builtin modules.
---
~Randy
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2.6.12-rc2] aoe [1/6]: improve allowed interfaces configuration
2005-04-21 13:36 ` Ed L Cashin
2005-04-21 14:56 ` Greg KH
@ 2005-04-21 20:54 ` Domen Puncer
1 sibling, 0 replies; 17+ messages in thread
From: Domen Puncer @ 2005-04-21 20:54 UTC (permalink / raw)
To: Ed L Cashin; +Cc: 7eggert, linux-kernel, Greg K-H
On 21/04/05 09:36 -0400, Ed L Cashin wrote:
> "Bodo Eggert <harvested.in.lkml@posting.7eggert.dyndns.org>" <7eggert@gmx.de> writes:
>
> > Ed L Cashin <ecashin@coraid.com> wrote:
> >
...
> >> + /sys/module/aoe/parameters/aoe_iflist instead of
> > ^^^
> >
> > Why does the module name need to be part of the attribute?
> > That's redundant. That's redundant.
>
> Yes. That's true. Redundancy isn't always bad, though, and using the
> "aoe_" prefix lets the kernel parameter for the built-in aoe driver be
> the same as the parameter for the modular driver.
The __setup() stuff is redundancy too, as module parameters already
work as boot parameters (ie. aoe.iflist).
Domen
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2005-04-21 20:54 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-20 17:02 [PATCH 2.6.12-rc2] aoe [1/6]: improve allowed interfaces configuration Ed L Cashin
2005-04-20 17:05 ` [PATCH 2.6.12-rc2] aoe [2/6]: aoe-stat should work for built-in as well as module Ed L Cashin
2005-04-20 17:05 ` [PATCH 2.6.12-rc2] aoe [3/6]: update the documentation to mention aoetools Ed L Cashin
2005-04-20 17:06 ` [PATCH 2.6.12-rc2] aoe [4/6]: allow multiple aoe devices to have the same mac Ed L Cashin
2005-04-20 17:06 ` [PATCH 2.6.12-rc2] aoe [5/6]: add firmware version to info in sysfs Ed L Cashin
2005-04-20 17:37 ` Randy.Dunlap
2005-04-20 19:13 ` Ed L Cashin
2005-04-20 17:06 ` [PATCH 2.6.12-rc2] aoe [6/6]: update version number to 10 Ed L Cashin
2005-04-20 17:16 ` [PATCH 2.6.12-rc2] aoe [1/6]: improve allowed interfaces configuration Randy.Dunlap
2005-04-20 17:27 ` Ed L Cashin
[not found] <3VqSf-2z7-15@gated-at.bofh.it>
2005-04-21 7:14 ` Bodo Eggert <harvested.in.lkml@posting.7eggert.dyndns.org>
2005-04-21 13:36 ` Ed L Cashin
2005-04-21 14:56 ` Greg KH
2005-04-21 15:30 ` Ed L Cashin
2005-04-21 16:01 ` Greg KH
2005-04-21 16:32 ` Randy.Dunlap
2005-04-21 20:54 ` Domen Puncer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox