From: "John W. Linville" <linville@tuxdriver.com>
To: "Wojciech Żmuda" <woz@semihalf.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] af_packet: make the device detachable
Date: Wed, 10 Feb 2016 13:25:13 -0500 [thread overview]
Message-ID: <20160210182512.GF9266@tuxdriver.com> (raw)
In-Reply-To: <CAAaY-jmb8sxpTMtBddpB5ukW9Q0QevZjU_u-W=WzSBf3xJTGSQ@mail.gmail.com>
On Wed, Feb 10, 2016 at 04:42:53PM +0100, Wojciech Żmuda wrote:
> Bernard, Bruce, I have a question, if I may. Do you know what is the
> reason that rte_pmd_af_packet_devinit() is the only non-static device
> initialization function among all the dpdk drivers? There's even a
> comment in the rte_eth_af_packet.h:
>
> /**
> * For use by the EAL only. Called as part of EAL init to set up any dummy NICs
> * configured on command line.
> */
> int rte_pmd_af_packet_devinit(const char *name, const char *params);
>
> Despite the comment above, I cannot see this function being called
> directly anywhere. Is there any reason it is implemented this way? Or
> should I change the definition to static, as it should be called via
> proper API functions?
The af_packet driver structure was essentially copied from the pcap
driver. Way in the past there was the EAL initialization of the
"virtual" drivers, and the original af_packet code hooked into that.
Somewhere along the way the driver initialization code changed and
I guess the EAL initialization bits disappeared. The comment above
rte_pmd_af_packet_devinit was overlooked.
Long story, short -- I think you can remove the comment and add the
static modifier and everything will be fine.
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
prev parent reply other threads:[~2016-02-10 18:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-05 14:04 [dpdk-dev] [PATCH] " Wojciech Zmuda
2016-02-08 16:07 ` Iremonger, Bernard
2016-02-09 9:34 ` Iremonger, Bernard
2016-02-09 16:09 ` [dpdk-dev] [PATCH v2] " Wojciech Zmuda
2016-02-09 16:37 ` Bruce Richardson
2016-02-10 15:42 ` Wojciech Żmuda
2016-02-10 18:25 ` John W. Linville [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=20160210182512.GF9266@tuxdriver.com \
--to=linville@tuxdriver.com \
--cc=dev@dpdk.org \
--cc=woz@semihalf.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).