aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Cashin2012-12-17 18:03:29 -0600
committerLinus Torvalds2012-12-17 19:15:23 -0600
commit1b8a1636ceea573b1d452a1cccf01c990d8d628a (patch)
tree6745e38d43bfbe5496a98af96358de3055fa898c
parent4e78dd144b865162626f811d1097b6d181ec6a31 (diff)
downloadkernel-omap-1b8a1636ceea573b1d452a1cccf01c990d8d628a.tar.gz
kernel-omap-1b8a1636ceea573b1d452a1cccf01c990d8d628a.tar.xz
kernel-omap-1b8a1636ceea573b1d452a1cccf01c990d8d628a.zip
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>
-rw-r--r--drivers/block/aoe/aoe.h6
-rw-r--r--drivers/block/aoe/aoecmd.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/drivers/block/aoe/aoe.h b/drivers/block/aoe/aoe.h
index d2ed7f18d1ac..52f75c097242 100644
--- a/drivers/block/aoe/aoe.h
+++ b/drivers/block/aoe/aoe.h
@@ -122,14 +122,14 @@ struct aoeif {
122 122
123struct aoetgt { 123struct aoetgt {
124 unsigned char addr[6]; 124 unsigned char addr[6];
125 ushort nframes; 125 ushort nframes; /* cap on frames to use */
126 struct aoedev *d; /* parent device I belong to */ 126 struct aoedev *d; /* parent device I belong to */
127 struct list_head ffree; /* list of free frames */ 127 struct list_head ffree; /* list of free frames */
128 struct aoeif ifs[NAOEIFS]; 128 struct aoeif ifs[NAOEIFS];
129 struct aoeif *ifp; /* current aoeif in use */ 129 struct aoeif *ifp; /* current aoeif in use */
130 ushort nout; 130 ushort nout;
131 ushort maxout; 131 ushort maxout; /* current value for max outstanding */
132 ulong falloc; 132 ulong falloc; /* number of allocated frames */
133 ulong lastwadj; /* last window adjustment */ 133 ulong lastwadj; /* last window adjustment */
134 int minbcnt; 134 int minbcnt;
135 int wpkts, rpkts; 135 int wpkts, rpkts;
diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c
index 9fe4f1865558..a6e95e69296c 100644
--- a/drivers/block/aoe/aoecmd.c
+++ b/drivers/block/aoe/aoecmd.c
@@ -1373,7 +1373,11 @@ aoecmd_cfg_rsp(struct sk_buff *skb)
1373 spin_lock_irqsave(&d->lock, flags); 1373 spin_lock_irqsave(&d->lock, flags);
1374 1374
1375 t = gettgt(d, h->src); 1375 t = gettgt(d, h->src);
1376 if (!t) { 1376 if (t) {
1377 t->nframes = n;
1378 if (n < t->maxout)
1379 t->maxout = n;
1380 } else {
1377 t = addtgt(d, h->src, n); 1381 t = addtgt(d, h->src, n);
1378 if (!t) 1382 if (!t)
1379 goto bail; 1383 goto bail;