From: Dimitris Michailidis <dm@chelsio.com>
To: Alexander Duyck <alexander.h.duyck@intel.com>
Cc: Ben Hutchings <bhutchings@solarflare.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [ethtool PATCH 4/4] v5 Add RX packet classification interface
Date: Wed, 04 May 2011 11:50:42 -0700 [thread overview]
Message-ID: <4DC1A002.1000606@chelsio.com> (raw)
In-Reply-To: <4DC19C78.9070308@intel.com>
On 05/04/2011 11:35 AM, Alexander Duyck wrote:
> On 5/4/2011 11:18 AM, Dimitris Michailidis wrote:
>> On 05/04/2011 10:41 AM, Alexander Duyck wrote:
>>> This is why I was suggesting that the best approach would be to update
>>> the kernel to add a separate ioctl for letting the driver setup the
>>> location. We can just attempt to make that call and when we get the
>>> EOPNOTSUPP errno we know the device driver doesn't support it and can
>>> then let the rule manager take over.
>>
>> The problem with this is the location is dependent on the type of
>> filter being
>> added. I.e., the ioctl would need to get all the information the
>> existing
>> ioctl carries making the new ioctl a small superset of the current one.
>> Additionally, if the driver only allocates a location in a separate
>> ioctl how
>> does it know that the app is actually going to use it?
>
> It doesn't know that the application is actually going to use it. What
> should happen is that the location should be verified by the driver when
> it is used in the rule insertion call. After all it is fully possible
> for the user to specify a location out of range since the insert call
> does no validation in ethtool if the user specified the location. That
> responsibility now lies with the driver.
That's not the problem I was pointing out. Of course the driver will verify
the location it is given. The problem is if you have a separate ioctl call
that only reserves a location (and it needs to reserve otherwise several of
these calls can get the same value), if you don't use it you leave the driver
with orphan reservations. Imagine you hit ^C between the two ioctls in ethtool.
prev parent reply other threads:[~2011-05-04 18:50 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-03 16:12 [ethtool PATCH 0/4] Add support for network flow classifier Alexander Duyck
2011-05-03 16:12 ` [ethtool PATCH 1/4] ethtool: remove strings based approach for displaying n-tuple Alexander Duyck
2011-05-03 16:12 ` [ethtool PATCH 2/4] Cleanup defines and header includes to address several issues Alexander Duyck
2011-05-03 16:12 ` [ethtool PATCH 3/4] Add support for __be64 and bitops, centralize several needed macros Alexander Duyck
2011-05-03 16:12 ` [ethtool PATCH 4/4] v5 Add RX packet classification interface Alexander Duyck
2011-05-03 23:23 ` Dimitris Michailidis
2011-05-03 23:34 ` Ben Hutchings
2011-05-04 0:29 ` Alexander Duyck
2011-05-04 1:35 ` Dimitris Michailidis
2011-05-04 3:10 ` Alexander Duyck
2011-05-04 17:09 ` Dimitris Michailidis
2011-05-04 17:24 ` Ben Hutchings
2011-05-04 17:33 ` Dimitris Michailidis
2011-05-04 17:41 ` Alexander Duyck
2011-05-04 18:05 ` Ben Hutchings
2011-05-04 18:21 ` Alexander Duyck
2011-05-04 18:45 ` Ben Hutchings
2011-05-04 21:07 ` Alexander Duyck
2011-05-04 21:54 ` Ben Hutchings
2011-05-04 19:06 ` Dimitris Michailidis
2011-05-04 18:18 ` Dimitris Michailidis
2011-05-04 18:35 ` Alexander Duyck
2011-05-04 18:50 ` Dimitris Michailidis [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=4DC1A002.1000606@chelsio.com \
--to=dm@chelsio.com \
--cc=alexander.h.duyck@intel.com \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=jeffrey.t.kirsher@intel.com \
--cc=netdev@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.