Commit 1b8a1636 authored by Ed Cashin's avatar Ed Cashin Committed by Linus Torvalds

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: default avatarEd Cashin <ecashin@coraid.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 4e78dd14
...@@ -122,14 +122,14 @@ struct aoeif { ...@@ -122,14 +122,14 @@ struct aoeif {
struct aoetgt { struct aoetgt {
unsigned char addr[6]; unsigned char addr[6];
ushort nframes; ushort nframes; /* cap on frames to use */
struct aoedev *d; /* parent device I belong to */ struct aoedev *d; /* parent device I belong to */
struct list_head ffree; /* list of free frames */ struct list_head ffree; /* list of free frames */
struct aoeif ifs[NAOEIFS]; struct aoeif ifs[NAOEIFS];
struct aoeif *ifp; /* current aoeif in use */ struct aoeif *ifp; /* current aoeif in use */
ushort nout; ushort nout;
ushort maxout; ushort maxout; /* current value for max outstanding */
ulong falloc; ulong falloc; /* number of allocated frames */
ulong lastwadj; /* last window adjustment */ ulong lastwadj; /* last window adjustment */
int minbcnt; int minbcnt;
int wpkts, rpkts; int wpkts, rpkts;
......
...@@ -1373,7 +1373,11 @@ aoecmd_cfg_rsp(struct sk_buff *skb) ...@@ -1373,7 +1373,11 @@ aoecmd_cfg_rsp(struct sk_buff *skb)
spin_lock_irqsave(&d->lock, flags); spin_lock_irqsave(&d->lock, flags);
t = gettgt(d, h->src); 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); t = addtgt(d, h->src, n);
if (!t) if (!t)
goto bail; goto bail;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment