public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: Libor Vanek <libor.vanek@gmail.com>
Cc: Matt Helsley <matthltc@us.ibm.com>,
	"Randy.Dunlap" <rdunlap@xenotime.net>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: Connector - how to start?
Date: Sat, 15 Apr 2006 15:14:43 +0400	[thread overview]
Message-ID: <20060415111443.GA4079@2ka.mipt.ru> (raw)
In-Reply-To: <369a7ef40604150350x8e7dea1sbf1f83cb800dd1c3@mail.gmail.com>

On Sat, Apr 15, 2006 at 12:50:46PM +0200, Libor Vanek (libor.vanek@gmail.com) wrote:
> Hi

Hello.

> > Why do you want to send big messages over netlink?
> > Netlink is fast but not faster than char device for example, or read
> > from mapped area, although it is much more convenient to use.
> >
> > Well, I can increase CONNECTOR_MAX_MSG_SIZE to maximum allowed 64k, if
> > there is really strong justification.
> 
> I need to send messages containing several (1 to 3) file names. And
> "MAXPATHLEN" is 1024b (usually it's much less but I can't rely on
> that).

$ touch `perl -e 'print "A"x1024'`
touch: cannot touch
`AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA':
File name too long

Only 255 is allowed in my system.

> I got working solution using procfs but my (diploma thesis) project
> manager want's me to use netlink/connector solution...

Well, it is strong justification, since connector does not use
CONNECTOR_MAX_MSG_SIZE except for checking that message size is less
that this value, but as pointed above, filename can not be that long,
although it can exceed above value when concatenated with directory
names. But in this case it can exceed any other limits, and it can be
impossible to allocate such a big buffer to store the whole path.

So you will need to create some kind of tree strucuture to store your 
names there, since it is wrong thing to allocate a buffer to store the
whole path as is. But in this case you do not need to
increase CONNECTOR_MAX_MSG_SIZE.

> Thanks for help,
> Libor Vanek

-- 
	Evgeniy Polyakov

  parent reply	other threads:[~2006-04-15 11:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-15  1:09 Connector - how to start? Libor Vanek
2006-04-15  2:26 ` Randy.Dunlap
2006-04-15  3:07   ` Matt Helsley
2006-04-15  9:18     ` Evgeniy Polyakov
     [not found]       ` <369a7ef40604150350x8e7dea1sbf1f83cb800dd1c3@mail.gmail.com>
2006-04-15 11:14         ` Evgeniy Polyakov [this message]
2006-04-15 12:18           ` Paul Collins
2006-04-15 12:38             ` Evgeniy Polyakov
     [not found]               ` <369a7ef40604150624n28da8895if158a2c13cac2b9e@mail.gmail.com>
2006-04-16  7:53                 ` Evgeniy Polyakov
2006-04-16 17:09                   ` Evgeniy Polyakov
     [not found]       ` <369a7ef40604160426s301dcd52r4c9826698d3d2f79@mail.gmail.com>
2006-04-16 11:40         ` Evgeniy Polyakov
     [not found]           ` <369a7ef40604160509xcf2caadi782b90da956639d5@mail.gmail.com>
2006-04-16 13:25             ` Evgeniy Polyakov
     [not found]               ` <369a7ef40604160632t16f6aab9u687a6b359997d7ea@mail.gmail.com>
2006-04-16 14:19                 ` Evgeniy Polyakov
2006-04-18  6:07                 ` Evgeniy Polyakov
     [not found]                   ` <369a7ef40604190439v6e8f1bf6lf52cfab5af3a93af@mail.gmail.com>
2006-04-19 12:14                     ` Evgeniy Polyakov
2006-04-20 15:12                       ` Libor Vanek
2006-04-20 15:25                         ` Evgeniy Polyakov
2006-04-20 15:32                           ` Libor Vanek
2006-04-15 21:48 ` Jon Masters

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=20060415111443.GA4079@2ka.mipt.ru \
    --to=johnpol@2ka.mipt.ru \
    --cc=libor.vanek@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthltc@us.ibm.com \
    --cc=rdunlap@xenotime.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox