summaryrefslogtreecommitdiffstats
path: root/drivers/block/aoe/aoecmd.c
diff options
context:
space:
mode:
authorEd Cashin <ecashin@coraid.com>2012-12-17 16:03:29 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-17 17:15:23 -0800
commit1b8a1636ceea573b1d452a1cccf01c990d8d628a (patch)
tree6745e38d43bfbe5496a98af96358de3055fa898c /drivers/block/aoe/aoecmd.c
parent4e78dd144b865162626f811d1097b6d181ec6a31 (diff)
downloadop-kernel-dev-1b8a1636ceea573b1d452a1cccf01c990d8d628a.zip
op-kernel-dev-1b8a1636ceea573b1d452a1cccf01c990d8d628a.tar.gz
aoe: update cap on outstanding commands based on config query response
The ATA over Ethernet config query response contains a "buffer count" field reflecting the AoE target's capacity to buffer incoming AoE commands. By taking the current value of this field into accound, we increase performance throughput or avoid network congestion, when the value has increased or decreased, respectively. Signed-off-by: Ed Cashin <ecashin@coraid.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/block/aoe/aoecmd.c')
-rw-r--r--drivers/block/aoe/aoecmd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c
index 9fe4f18..a6e95e6 100644
--- a/drivers/block/aoe/aoecmd.c
+++ b/drivers/block/aoe/aoecmd.c
@@ -1373,7 +1373,11 @@ aoecmd_cfg_rsp(struct sk_buff *skb)
spin_lock_irqsave(&d->lock, flags);
t = gettgt(d, h->src);
- if (!t) {
+ if (t) {
+ t->nframes = n;
+ if (n < t->maxout)
+ t->maxout = n;
+ } else {
t = addtgt(d, h->src, n);
if (!t)
goto bail;
OpenPOWER on IntegriCloud