From: Ben Greear <greearb@candelatech.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Randy Dunlap <randy.dunlap@oracle.com>, NetDev <netdev@vger.kernel.org>
Subject: Re: How to grab a block of binary data w/out using ioctls?
Date: Wed, 25 Oct 2006 09:30:02 -0700 [thread overview]
Message-ID: <453F910A.3040801@candelatech.com> (raw)
In-Reply-To: <20061025044621.GA32486@havoc.gtf.org>
Jeff Garzik wrote:
> On Tue, Oct 24, 2006 at 09:35:49PM -0700, Randy Dunlap wrote:
>
>>> Please grep for sysfs_create_bin_file, you will find plenty of examples.
>>>
>> Hm, I thought that sysfs binary files were supposed to be
>> for "transparent" blobs of data, not for structured data.
>> E.g., a "firmware" blob would be OK.
>>
>
> Depends. Normally ASCII is greatly preferred, but passing in/out big
> data structures can be a huge pain, thunking to/from ASCII.
>
This is my scenario exactly. It is also much easier to make sure the
data is
coherent if I can grab it all at once.
In my case, I'm wanting to add this to the pktgen module, for reporting
stats. But,
it seems sysfs is designed mostly for drivers with some sort of 'object'
behind it.
Would I need to create some faked out dummy object in order to use sysfs
with
pktgen?
I also notice there is already a /sys/modules/pktgen node in sysfs..is
there any easy way to
stick my binary file interface in that directory?
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
next prev parent reply other threads:[~2006-10-25 16:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-24 0:44 How to grab a block of binary data w/out using ioctls? Ben Greear
2006-10-24 4:54 ` Randy Dunlap
2006-10-24 5:00 ` Jeff Garzik
2006-10-24 5:04 ` Randy.Dunlap
2006-10-25 2:25 ` Ben Greear
2006-10-25 2:47 ` Jeff Garzik
2006-10-25 4:35 ` Randy Dunlap
2006-10-25 4:46 ` Jeff Garzik
2006-10-25 4:52 ` Randy.Dunlap
2006-10-25 5:01 ` Jeff Garzik
2006-10-25 5:07 ` Randy.Dunlap
2006-10-25 16:30 ` Ben Greear [this message]
2006-10-25 12:51 ` Hagen Paul Pfeifer
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=453F910A.3040801@candelatech.com \
--to=greearb@candelatech.com \
--cc=jeff@garzik.org \
--cc=netdev@vger.kernel.org \
--cc=randy.dunlap@oracle.com \
/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;
as well as URLs for NNTP newsgroup(s).