From: Mike Anderson <andmike@us.ibm.com>
To: James Smart <James.Smart@Emulex.Com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH] SCSI and FC Transport: add netlink support for posting of transport events
Date: Thu, 17 Aug 2006 14:24:52 -0700 [thread overview]
Message-ID: <20060817212452.GA18890@us.ibm.com> (raw)
In-Reply-To: <44E4C9DD.3070304@emulex.com>
James Smart <James.Smart@Emulex.Com> wrote:
> Mike,
>
> So I'm converting this over, and I really don't like using attributes.
>
ok, I replied to most of your comments, but you can skip to the bottom and
ignore them if you want.
> My first major hurdle is that I have to update the netlink library to
> support a
> new "binary blob" attribute, that may be of arbitrary length, similar to the
> "string" attribute.
You should not need to edit the netlink library as you should be able to
use NLA_PUT_TYPE. Unless I missing the question.
>
> My second hurdle is dealing with arbitrary-sized messages. Due to their
> existence
> and their rarity, I punted on creating fixed size mempools. Headache I have
> now
> is trying to size the skb payload. It has to be large enough for the
> variable-length payload, plus large enough for all the attribute overhead
> for
> each field element, and any padding. Yech!
>
This is hard. In dm code I over allocate, but my number of attributes are
bounded. You must have to deal with correct skb payload sizing today
right?
> Coding-wise, the format and understanding of what message has what data is
> more confusing. It pushes for a flat "attribute" space for all message
> elements. Minimally, it requires a lot more formality of data structures to
> impose "structure" on the elements. Pure overhead and less clarity.
>
You can use nested attributes to help some here.
> I started using your dm patch as a reference and came away scratching my
> head.
> It uses both a packed structure (for a header) followed by attribute-based
> data (actual message elements). Seemed real odd that we would use both, and
> if
> we trust it for one, why not the other ?
I think it is not some much trust as flexibility with what will change.
The header size is expected to be more constant.
>
> Also, there was one other "pro" where you dinged the implementation that
> wasn't fully true...
> > Since an attribute is not exposing the data as a fixed structure it leads
> > to more options in the future of reorganizing the data. An old program
> > running on a new kernel would be able to pick up known attributes while
> > ignoring others. One could never reorg the structure and always add to the
> > end of the structure which would address the issue also without using
> > attributes.
> As implemented, we could always add elements, but never reorg or subtract,
> and the app would continue to work fine. This is due to the msglen field
> being in place.
I think that is what I was trying to say at the end that one could
increase the size of the structure without attributes and that should be
ok if alignment is not an issue.
>
>
> So, I currently want to update the patch only to optimize allocations on
> the send sequence. Would you buy into this ?
Yes, I do not want to hold up the overall capability on this point if
others are ok with the data payload.
-andmike
--
Michael Anderson
andmike@us.ibm.com
prev parent reply other threads:[~2006-08-17 21:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-08 20:53 [PATCH] SCSI and FC Transport: add netlink support for posting of transport events James Smart
2006-08-11 4:32 ` Mike Anderson
2006-08-11 14:23 ` James Smart
2006-08-14 16:18 ` Mike Anderson
2006-08-14 18:40 ` James Smart
2006-08-17 19:56 ` James Smart
2006-08-17 21:24 ` Mike Anderson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060817212452.GA18890@us.ibm.com \
--to=andmike@us.ibm.com \
--cc=James.Smart@Emulex.Com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.