2012-12-18 08:03:53 +08:00
|
|
|
|
2012-10-05 08:16:38 +08:00
|
|
|
/* Copyright (c) 2012 Coraid, Inc. See COPYING for GPL terms. */
|
2012-12-18 08:03:53 +08:00
|
|
|
#define VERSION "64+"
|
2005-04-17 06:20:36 +08:00
|
|
|
#define AOE_MAJOR 152
|
|
|
|
#define DEVICE_NAME "aoe"
|
2005-04-19 13:00:17 +08:00
|
|
|
|
|
|
|
/* set AOE_PARTITIONS to 1 to use whole-disks only
|
|
|
|
* default is 16, which is 15 partitions plus the whole disk
|
|
|
|
*/
|
2005-04-17 06:20:36 +08:00
|
|
|
#ifndef AOE_PARTITIONS
|
2005-08-20 04:54:43 +08:00
|
|
|
#define AOE_PARTITIONS (16)
|
2005-04-17 06:20:36 +08:00
|
|
|
#endif
|
2005-04-19 13:00:17 +08:00
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
#define WHITESPACE " \t\v\f\n"
|
|
|
|
|
|
|
|
enum {
|
|
|
|
AOECMD_ATA,
|
|
|
|
AOECMD_CFG,
|
2009-02-19 06:48:13 +08:00
|
|
|
AOECMD_VEND_MIN = 0xf0,
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
AOEFL_RSP = (1<<3),
|
|
|
|
AOEFL_ERR = (1<<2),
|
|
|
|
|
|
|
|
AOEAFL_EXT = (1<<6),
|
|
|
|
AOEAFL_DEV = (1<<4),
|
|
|
|
AOEAFL_ASYNC = (1<<1),
|
|
|
|
AOEAFL_WRITE = (1<<0),
|
|
|
|
|
|
|
|
AOECCMD_READ = 0,
|
|
|
|
AOECCMD_TEST,
|
|
|
|
AOECCMD_PTEST,
|
|
|
|
AOECCMD_SET,
|
|
|
|
AOECCMD_FSET,
|
|
|
|
|
|
|
|
AOE_HVER = 0x10,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct aoe_hdr {
|
|
|
|
unsigned char dst[6];
|
|
|
|
unsigned char src[6];
|
2005-04-19 13:00:20 +08:00
|
|
|
__be16 type;
|
2005-04-17 06:20:36 +08:00
|
|
|
unsigned char verfl;
|
|
|
|
unsigned char err;
|
2005-04-19 13:00:20 +08:00
|
|
|
__be16 major;
|
2005-04-17 06:20:36 +08:00
|
|
|
unsigned char minor;
|
|
|
|
unsigned char cmd;
|
2005-04-19 13:00:20 +08:00
|
|
|
__be32 tag;
|
2005-04-17 06:20:36 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct aoe_atahdr {
|
|
|
|
unsigned char aflags;
|
|
|
|
unsigned char errfeat;
|
|
|
|
unsigned char scnt;
|
|
|
|
unsigned char cmdstat;
|
|
|
|
unsigned char lba0;
|
|
|
|
unsigned char lba1;
|
|
|
|
unsigned char lba2;
|
|
|
|
unsigned char lba3;
|
|
|
|
unsigned char lba4;
|
|
|
|
unsigned char lba5;
|
|
|
|
unsigned char res[2];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct aoe_cfghdr {
|
2005-04-19 13:00:20 +08:00
|
|
|
__be16 bufcnt;
|
|
|
|
__be16 fwver;
|
2006-09-21 02:36:49 +08:00
|
|
|
unsigned char scnt;
|
2005-04-17 06:20:36 +08:00
|
|
|
unsigned char aoeccmd;
|
|
|
|
unsigned char cslen[2];
|
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
|
|
|
DEVFL_UP = 1, /* device is installed in system and ready for AoE->ATA commands */
|
|
|
|
DEVFL_TKILL = (1<<1), /* flag for timer to know when to kill self */
|
|
|
|
DEVFL_EXT = (1<<2), /* device accepts lba48 commands */
|
2012-10-05 08:16:35 +08:00
|
|
|
DEVFL_GDALLOC = (1<<3), /* need to alloc gendisk */
|
|
|
|
DEVFL_KICKME = (1<<4), /* slow polling network card catch */
|
|
|
|
DEVFL_NEWSIZE = (1<<5), /* need to update dev size in block layer */
|
2005-04-17 06:20:36 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
2006-09-21 02:36:49 +08:00
|
|
|
DEFAULTBCNT = 2 * 512, /* 2 sectors */
|
aoe: handle multiple network paths to AoE device
A remote AoE device is something can process ATA commands and is identified by
an AoE shelf number and an AoE slot number. Such a device might have more
than one network interface, and it might be reachable by more than one local
network interface. This patch tracks the available network paths available to
each AoE device, allowing them to be used more efficiently.
Andrew Morton asked about the call to msleep_interruptible in the revalidate
function. Yes, if a signal is pending, then msleep_interruptible will not
return 0. That means we will not loop but will call aoenet_xmit with a NULL
skb, which is a noop. If the system is too low on memory or the aoe driver is
too low on frames, then the user can hit control-C to interrupt the attempt to
do a revalidate. I have added a comment to the code summarizing that.
Andrew Morton asked whether the allocation performed inside addtgt could use a
more relaxed allocation like GFP_KERNEL, but addtgt is called when the aoedev
lock has been locked with spin_lock_irqsave. It would be nice to allocate the
memory under fewer restrictions, but targets are only added when the device is
being discovered, and if the target can't be added right now, we can try again
in a minute when then next AoE config query broadcast goes out.
Andrew Morton pointed out that the "too many targets" message could be printed
for failing GFP_ATOMIC allocations. The last patch in this series makes the
messages more specific.
Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08 20:20:00 +08:00
|
|
|
MIN_BUFS = 16,
|
|
|
|
NTARGETS = 8,
|
|
|
|
NAOEIFS = 8,
|
2012-10-05 08:16:23 +08:00
|
|
|
NSKBPOOLMAX = 256,
|
2012-10-05 08:16:33 +08:00
|
|
|
NFACTIVE = 61,
|
aoe: handle multiple network paths to AoE device
A remote AoE device is something can process ATA commands and is identified by
an AoE shelf number and an AoE slot number. Such a device might have more
than one network interface, and it might be reachable by more than one local
network interface. This patch tracks the available network paths available to
each AoE device, allowing them to be used more efficiently.
Andrew Morton asked about the call to msleep_interruptible in the revalidate
function. Yes, if a signal is pending, then msleep_interruptible will not
return 0. That means we will not loop but will call aoenet_xmit with a NULL
skb, which is a noop. If the system is too low on memory or the aoe driver is
too low on frames, then the user can hit control-C to interrupt the attempt to
do a revalidate. I have added a comment to the code summarizing that.
Andrew Morton asked whether the allocation performed inside addtgt could use a
more relaxed allocation like GFP_KERNEL, but addtgt is called when the aoedev
lock has been locked with spin_lock_irqsave. It would be nice to allocate the
memory under fewer restrictions, but targets are only added when the device is
being discovered, and if the target can't be added right now, we can try again
in a minute when then next AoE config query broadcast goes out.
Andrew Morton pointed out that the "too many targets" message could be printed
for failing GFP_ATOMIC allocations. The last patch in this series makes the
messages more specific.
Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08 20:20:00 +08:00
|
|
|
|
|
|
|
TIMERTICK = HZ / 10,
|
2012-12-18 08:03:43 +08:00
|
|
|
RTTSCALE = 8,
|
|
|
|
RTTDSCALE = 3,
|
2012-12-18 08:03:49 +08:00
|
|
|
RTTAVG_INIT = USEC_PER_SEC / 4 << RTTSCALE,
|
2012-12-18 08:03:43 +08:00
|
|
|
RTTDEV_INIT = RTTAVG_INIT / 4,
|
2005-04-17 06:20:36 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct buf {
|
|
|
|
ulong nframesout;
|
|
|
|
ulong resid;
|
|
|
|
ulong bv_resid;
|
|
|
|
sector_t sector;
|
|
|
|
struct bio *bio;
|
|
|
|
struct bio_vec *bv;
|
2012-10-05 08:16:23 +08:00
|
|
|
struct request *rq;
|
2005-04-17 06:20:36 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct frame {
|
2012-10-05 08:16:21 +08:00
|
|
|
struct list_head head;
|
|
|
|
u32 tag;
|
2012-12-18 08:03:49 +08:00
|
|
|
struct timeval sent; /* high-res time packet was sent */
|
|
|
|
u32 sent_jiffs; /* low-res jiffies-based sent time */
|
2005-04-17 06:20:36 +08:00
|
|
|
ulong waited;
|
2012-12-18 08:03:51 +08:00
|
|
|
ulong waited_total;
|
2012-10-05 08:16:21 +08:00
|
|
|
struct aoetgt *t; /* parent target I belong to */
|
2006-09-21 02:36:49 +08:00
|
|
|
sector_t lba;
|
2012-10-05 08:16:21 +08:00
|
|
|
struct sk_buff *skb; /* command skb freed on module exit */
|
|
|
|
struct sk_buff *r_skb; /* response skb for async processing */
|
2012-10-05 08:16:23 +08:00
|
|
|
struct buf *buf;
|
2012-10-05 08:16:20 +08:00
|
|
|
struct bio_vec *bv;
|
2012-10-05 08:16:23 +08:00
|
|
|
ulong bcnt;
|
2012-10-05 08:16:20 +08:00
|
|
|
ulong bv_off;
|
2005-04-17 06:20:36 +08:00
|
|
|
};
|
|
|
|
|
aoe: handle multiple network paths to AoE device
A remote AoE device is something can process ATA commands and is identified by
an AoE shelf number and an AoE slot number. Such a device might have more
than one network interface, and it might be reachable by more than one local
network interface. This patch tracks the available network paths available to
each AoE device, allowing them to be used more efficiently.
Andrew Morton asked about the call to msleep_interruptible in the revalidate
function. Yes, if a signal is pending, then msleep_interruptible will not
return 0. That means we will not loop but will call aoenet_xmit with a NULL
skb, which is a noop. If the system is too low on memory or the aoe driver is
too low on frames, then the user can hit control-C to interrupt the attempt to
do a revalidate. I have added a comment to the code summarizing that.
Andrew Morton asked whether the allocation performed inside addtgt could use a
more relaxed allocation like GFP_KERNEL, but addtgt is called when the aoedev
lock has been locked with spin_lock_irqsave. It would be nice to allocate the
memory under fewer restrictions, but targets are only added when the device is
being discovered, and if the target can't be added right now, we can try again
in a minute when then next AoE config query broadcast goes out.
Andrew Morton pointed out that the "too many targets" message could be printed
for failing GFP_ATOMIC allocations. The last patch in this series makes the
messages more specific.
Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08 20:20:00 +08:00
|
|
|
struct aoeif {
|
|
|
|
struct net_device *nd;
|
2012-10-05 08:16:27 +08:00
|
|
|
ulong lost;
|
|
|
|
int bcnt;
|
aoe: handle multiple network paths to AoE device
A remote AoE device is something can process ATA commands and is identified by
an AoE shelf number and an AoE slot number. Such a device might have more
than one network interface, and it might be reachable by more than one local
network interface. This patch tracks the available network paths available to
each AoE device, allowing them to be used more efficiently.
Andrew Morton asked about the call to msleep_interruptible in the revalidate
function. Yes, if a signal is pending, then msleep_interruptible will not
return 0. That means we will not loop but will call aoenet_xmit with a NULL
skb, which is a noop. If the system is too low on memory or the aoe driver is
too low on frames, then the user can hit control-C to interrupt the attempt to
do a revalidate. I have added a comment to the code summarizing that.
Andrew Morton asked whether the allocation performed inside addtgt could use a
more relaxed allocation like GFP_KERNEL, but addtgt is called when the aoedev
lock has been locked with spin_lock_irqsave. It would be nice to allocate the
memory under fewer restrictions, but targets are only added when the device is
being discovered, and if the target can't be added right now, we can try again
in a minute when then next AoE config query broadcast goes out.
Andrew Morton pointed out that the "too many targets" message could be printed
for failing GFP_ATOMIC allocations. The last patch in this series makes the
messages more specific.
Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08 20:20:00 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct aoetgt {
|
|
|
|
unsigned char addr[6];
|
2012-12-18 08:03:29 +08:00
|
|
|
ushort nframes; /* cap on frames to use */
|
2012-10-05 08:16:21 +08:00
|
|
|
struct aoedev *d; /* parent device I belong to */
|
|
|
|
struct list_head ffree; /* list of free frames */
|
aoe: handle multiple network paths to AoE device
A remote AoE device is something can process ATA commands and is identified by
an AoE shelf number and an AoE slot number. Such a device might have more
than one network interface, and it might be reachable by more than one local
network interface. This patch tracks the available network paths available to
each AoE device, allowing them to be used more efficiently.
Andrew Morton asked about the call to msleep_interruptible in the revalidate
function. Yes, if a signal is pending, then msleep_interruptible will not
return 0. That means we will not loop but will call aoenet_xmit with a NULL
skb, which is a noop. If the system is too low on memory or the aoe driver is
too low on frames, then the user can hit control-C to interrupt the attempt to
do a revalidate. I have added a comment to the code summarizing that.
Andrew Morton asked whether the allocation performed inside addtgt could use a
more relaxed allocation like GFP_KERNEL, but addtgt is called when the aoedev
lock has been locked with spin_lock_irqsave. It would be nice to allocate the
memory under fewer restrictions, but targets are only added when the device is
being discovered, and if the target can't be added right now, we can try again
in a minute when then next AoE config query broadcast goes out.
Andrew Morton pointed out that the "too many targets" message could be printed
for failing GFP_ATOMIC allocations. The last patch in this series makes the
messages more specific.
Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08 20:20:00 +08:00
|
|
|
struct aoeif ifs[NAOEIFS];
|
|
|
|
struct aoeif *ifp; /* current aoeif in use */
|
2012-12-18 08:03:43 +08:00
|
|
|
ushort nout; /* value of nout when skb was sent */
|
2012-12-18 08:03:29 +08:00
|
|
|
ushort maxout; /* current value for max outstanding */
|
2012-12-18 08:03:43 +08:00
|
|
|
ushort next_cwnd; /* incr maxout after decrementing to zero */
|
|
|
|
ushort ssthresh; /* slow start threshold */
|
2012-12-18 08:03:29 +08:00
|
|
|
ulong falloc; /* number of allocated frames */
|
2012-10-05 08:16:27 +08:00
|
|
|
int minbcnt;
|
aoe: handle multiple network paths to AoE device
A remote AoE device is something can process ATA commands and is identified by
an AoE shelf number and an AoE slot number. Such a device might have more
than one network interface, and it might be reachable by more than one local
network interface. This patch tracks the available network paths available to
each AoE device, allowing them to be used more efficiently.
Andrew Morton asked about the call to msleep_interruptible in the revalidate
function. Yes, if a signal is pending, then msleep_interruptible will not
return 0. That means we will not loop but will call aoenet_xmit with a NULL
skb, which is a noop. If the system is too low on memory or the aoe driver is
too low on frames, then the user can hit control-C to interrupt the attempt to
do a revalidate. I have added a comment to the code summarizing that.
Andrew Morton asked whether the allocation performed inside addtgt could use a
more relaxed allocation like GFP_KERNEL, but addtgt is called when the aoedev
lock has been locked with spin_lock_irqsave. It would be nice to allocate the
memory under fewer restrictions, but targets are only added when the device is
being discovered, and if the target can't be added right now, we can try again
in a minute when then next AoE config query broadcast goes out.
Andrew Morton pointed out that the "too many targets" message could be printed
for failing GFP_ATOMIC allocations. The last patch in this series makes the
messages more specific.
Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08 20:20:00 +08:00
|
|
|
int wpkts, rpkts;
|
|
|
|
};
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
struct aoedev {
|
|
|
|
struct aoedev *next;
|
|
|
|
ulong sysminor;
|
|
|
|
ulong aoemajor;
|
2012-12-18 08:03:49 +08:00
|
|
|
u32 rttavg; /* scaled AoE round trip time average */
|
|
|
|
u32 rttdev; /* scaled round trip time mean deviation */
|
aoe: handle multiple network paths to AoE device
A remote AoE device is something can process ATA commands and is identified by
an AoE shelf number and an AoE slot number. Such a device might have more
than one network interface, and it might be reachable by more than one local
network interface. This patch tracks the available network paths available to
each AoE device, allowing them to be used more efficiently.
Andrew Morton asked about the call to msleep_interruptible in the revalidate
function. Yes, if a signal is pending, then msleep_interruptible will not
return 0. That means we will not loop but will call aoenet_xmit with a NULL
skb, which is a noop. If the system is too low on memory or the aoe driver is
too low on frames, then the user can hit control-C to interrupt the attempt to
do a revalidate. I have added a comment to the code summarizing that.
Andrew Morton asked whether the allocation performed inside addtgt could use a
more relaxed allocation like GFP_KERNEL, but addtgt is called when the aoedev
lock has been locked with spin_lock_irqsave. It would be nice to allocate the
memory under fewer restrictions, but targets are only added when the device is
being discovered, and if the target can't be added right now, we can try again
in a minute when then next AoE config query broadcast goes out.
Andrew Morton pointed out that the "too many targets" message could be printed
for failing GFP_ATOMIC allocations. The last patch in this series makes the
messages more specific.
Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08 20:20:00 +08:00
|
|
|
u16 aoeminor;
|
|
|
|
u16 flags;
|
2006-09-21 02:36:49 +08:00
|
|
|
u16 nopen; /* (bd_openers isn't available without sleeping) */
|
2005-04-17 06:20:36 +08:00
|
|
|
u16 fw_ver; /* version of blade's firmware */
|
2012-10-05 08:16:33 +08:00
|
|
|
u16 lasttag; /* last tag sent */
|
|
|
|
u16 useme;
|
2012-10-05 08:16:23 +08:00
|
|
|
ulong ref;
|
2005-04-17 06:20:36 +08:00
|
|
|
struct work_struct work;/* disk create work struct */
|
|
|
|
struct gendisk *gd;
|
2009-09-09 20:10:18 +08:00
|
|
|
struct request_queue *blkq;
|
2012-12-18 08:03:39 +08:00
|
|
|
struct hd_geometry geo;
|
2005-04-17 06:20:36 +08:00
|
|
|
sector_t ssize;
|
|
|
|
struct timer_list timer;
|
|
|
|
spinlock_t lock;
|
2008-09-22 13:36:49 +08:00
|
|
|
struct sk_buff_head skbpool;
|
2005-04-17 06:20:36 +08:00
|
|
|
mempool_t *bufpool; /* for deadlock-free Buf allocation */
|
2012-10-05 08:16:23 +08:00
|
|
|
struct { /* pointers to work in progress */
|
|
|
|
struct buf *buf;
|
|
|
|
struct bio *nxbio;
|
|
|
|
struct request *rq;
|
|
|
|
} ip;
|
2012-10-05 08:16:27 +08:00
|
|
|
ulong maxbcnt;
|
2012-10-05 08:16:33 +08:00
|
|
|
struct list_head factive[NFACTIVE]; /* hash of active frames */
|
2012-12-18 08:03:43 +08:00
|
|
|
struct list_head rexmitq; /* deferred retransmissions */
|
aoe: handle multiple network paths to AoE device
A remote AoE device is something can process ATA commands and is identified by
an AoE shelf number and an AoE slot number. Such a device might have more
than one network interface, and it might be reachable by more than one local
network interface. This patch tracks the available network paths available to
each AoE device, allowing them to be used more efficiently.
Andrew Morton asked about the call to msleep_interruptible in the revalidate
function. Yes, if a signal is pending, then msleep_interruptible will not
return 0. That means we will not loop but will call aoenet_xmit with a NULL
skb, which is a noop. If the system is too low on memory or the aoe driver is
too low on frames, then the user can hit control-C to interrupt the attempt to
do a revalidate. I have added a comment to the code summarizing that.
Andrew Morton asked whether the allocation performed inside addtgt could use a
more relaxed allocation like GFP_KERNEL, but addtgt is called when the aoedev
lock has been locked with spin_lock_irqsave. It would be nice to allocate the
memory under fewer restrictions, but targets are only added when the device is
being discovered, and if the target can't be added right now, we can try again
in a minute when then next AoE config query broadcast goes out.
Andrew Morton pointed out that the "too many targets" message could be printed
for failing GFP_ATOMIC allocations. The last patch in this series makes the
messages more specific.
Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08 20:20:00 +08:00
|
|
|
struct aoetgt *targets[NTARGETS];
|
|
|
|
struct aoetgt **tgt; /* target in use when working */
|
2012-10-05 08:16:21 +08:00
|
|
|
struct aoetgt *htgt; /* target needing rexmit assistance */
|
|
|
|
ulong ntargets;
|
|
|
|
ulong kicked;
|
2012-12-18 08:03:42 +08:00
|
|
|
char ident[512];
|
2005-04-17 06:20:36 +08:00
|
|
|
};
|
|
|
|
|
2012-10-05 08:16:21 +08:00
|
|
|
/* kthread tracking */
|
|
|
|
struct ktstate {
|
|
|
|
struct completion rendez;
|
|
|
|
struct task_struct *task;
|
|
|
|
wait_queue_head_t *waitq;
|
|
|
|
int (*fn) (void);
|
|
|
|
char *name;
|
|
|
|
spinlock_t *lock;
|
|
|
|
};
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
int aoeblk_init(void);
|
|
|
|
void aoeblk_exit(void);
|
|
|
|
void aoeblk_gdalloc(void *);
|
|
|
|
void aoedisk_rm_sysfs(struct aoedev *d);
|
|
|
|
|
|
|
|
int aoechr_init(void);
|
|
|
|
void aoechr_exit(void);
|
|
|
|
void aoechr_error(char *);
|
|
|
|
|
|
|
|
void aoecmd_work(struct aoedev *d);
|
2006-01-20 02:46:19 +08:00
|
|
|
void aoecmd_cfg(ushort aoemajor, unsigned char aoeminor);
|
2012-10-05 08:16:21 +08:00
|
|
|
struct sk_buff *aoecmd_ata_rsp(struct sk_buff *);
|
2005-04-17 06:20:36 +08:00
|
|
|
void aoecmd_cfg_rsp(struct sk_buff *);
|
2006-11-22 22:57:56 +08:00
|
|
|
void aoecmd_sleepwork(struct work_struct *);
|
2012-12-18 08:03:43 +08:00
|
|
|
void aoecmd_wreset(struct aoetgt *t);
|
aoe: handle multiple network paths to AoE device
A remote AoE device is something can process ATA commands and is identified by
an AoE shelf number and an AoE slot number. Such a device might have more
than one network interface, and it might be reachable by more than one local
network interface. This patch tracks the available network paths available to
each AoE device, allowing them to be used more efficiently.
Andrew Morton asked about the call to msleep_interruptible in the revalidate
function. Yes, if a signal is pending, then msleep_interruptible will not
return 0. That means we will not loop but will call aoenet_xmit with a NULL
skb, which is a noop. If the system is too low on memory or the aoe driver is
too low on frames, then the user can hit control-C to interrupt the attempt to
do a revalidate. I have added a comment to the code summarizing that.
Andrew Morton asked whether the allocation performed inside addtgt could use a
more relaxed allocation like GFP_KERNEL, but addtgt is called when the aoedev
lock has been locked with spin_lock_irqsave. It would be nice to allocate the
memory under fewer restrictions, but targets are only added when the device is
being discovered, and if the target can't be added right now, we can try again
in a minute when then next AoE config query broadcast goes out.
Andrew Morton pointed out that the "too many targets" message could be printed
for failing GFP_ATOMIC allocations. The last patch in this series makes the
messages more specific.
Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08 20:20:00 +08:00
|
|
|
void aoecmd_cleanslate(struct aoedev *);
|
2012-10-05 08:16:21 +08:00
|
|
|
void aoecmd_exit(void);
|
|
|
|
int aoecmd_init(void);
|
aoe: handle multiple network paths to AoE device
A remote AoE device is something can process ATA commands and is identified by
an AoE shelf number and an AoE slot number. Such a device might have more
than one network interface, and it might be reachable by more than one local
network interface. This patch tracks the available network paths available to
each AoE device, allowing them to be used more efficiently.
Andrew Morton asked about the call to msleep_interruptible in the revalidate
function. Yes, if a signal is pending, then msleep_interruptible will not
return 0. That means we will not loop but will call aoenet_xmit with a NULL
skb, which is a noop. If the system is too low on memory or the aoe driver is
too low on frames, then the user can hit control-C to interrupt the attempt to
do a revalidate. I have added a comment to the code summarizing that.
Andrew Morton asked whether the allocation performed inside addtgt could use a
more relaxed allocation like GFP_KERNEL, but addtgt is called when the aoedev
lock has been locked with spin_lock_irqsave. It would be nice to allocate the
memory under fewer restrictions, but targets are only added when the device is
being discovered, and if the target can't be added right now, we can try again
in a minute when then next AoE config query broadcast goes out.
Andrew Morton pointed out that the "too many targets" message could be printed
for failing GFP_ATOMIC allocations. The last patch in this series makes the
messages more specific.
Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08 20:20:00 +08:00
|
|
|
struct sk_buff *aoecmd_ata_id(struct aoedev *);
|
2012-10-05 08:16:21 +08:00
|
|
|
void aoe_freetframe(struct frame *);
|
2012-10-05 08:16:23 +08:00
|
|
|
void aoe_flush_iocq(void);
|
|
|
|
void aoe_end_request(struct aoedev *, struct request *, int);
|
2012-10-05 08:16:25 +08:00
|
|
|
int aoe_ktstart(struct ktstate *k);
|
|
|
|
void aoe_ktstop(struct ktstate *k);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
int aoedev_init(void);
|
|
|
|
void aoedev_exit(void);
|
2012-10-05 08:16:40 +08:00
|
|
|
struct aoedev *aoedev_by_aoeaddr(ulong maj, int min, int do_alloc);
|
2005-04-17 06:20:36 +08:00
|
|
|
void aoedev_downdev(struct aoedev *d);
|
2008-02-08 20:20:03 +08:00
|
|
|
int aoedev_flush(const char __user *str, size_t size);
|
2012-10-05 08:16:23 +08:00
|
|
|
void aoe_failbuf(struct aoedev *, struct buf *);
|
|
|
|
void aoedev_put(struct aoedev *);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
int aoenet_init(void);
|
|
|
|
void aoenet_exit(void);
|
2008-09-22 13:36:49 +08:00
|
|
|
void aoenet_xmit(struct sk_buff_head *);
|
2005-04-17 06:20:36 +08:00
|
|
|
int is_aoe_netif(struct net_device *ifp);
|
|
|
|
int set_aoe_iflist(const char __user *str, size_t size);
|