All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Smart <James.Smart@Emulex.Com>
To: Mike Anderson <andmike@us.ibm.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 15:56:13 -0400	[thread overview]
Message-ID: <44E4C9DD.3070304@emulex.com> (raw)
In-Reply-To: <20060814161833.GA25026@us.ibm.com>

Mike,

So I'm converting this over, and I really don't like using attributes.

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.

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!

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.

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 ?

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.


So, I currently want to update the patch only to optimize allocations on
the send sequence.  Would you buy into this ?

-- james



  parent reply	other threads:[~2006-08-17 19:56 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 [this message]
2006-08-17 21:24         ` Mike Anderson

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=44E4C9DD.3070304@emulex.com \
    --to=james.smart@emulex.com \
    --cc=andmike@us.ibm.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.