From: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
To: Jiri Pirko <jiri@resnulli.us>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
fengguang.wu@intel.com, dcbw@redhat.com
Subject: Re: [PATCH net-next 1/1 v3] drivers: net: rmnet: Initial implementation
Date: Mon, 14 Aug 2017 17:52:45 -0600 [thread overview]
Message-ID: <a0ec8e95c5c2b84aad176ef523589bc4@codeaurora.org> (raw)
In-Reply-To: <20170414090752.GA1992@nanopsycho>
>> + */
>> +void rmnet_egress_handler(struct sk_buff *skb,
>> + struct rmnet_logical_ep_conf_s *ep)
>> +{
>> + struct rmnet_phys_ep_conf_s *config;
>> + struct net_device *orig_dev;
>> + int rc;
>> +
>> + orig_dev = skb->dev;
>> + skb->dev = ep->egress_dev;
>> +
>> + config = (struct rmnet_phys_ep_conf_s *)
>> + rcu_dereference(skb->dev->rx_handler_data);
>
> This is certainly a misuse of dev->rx_handler_data. Dev private of a
> function arg to carry the pointer around.
>
Hi Jiri
Sorry for the delay in posting a new series.
I have an additional query regarding this comment.
This dev (from skb->dev->rx_handler_data) corresponds to the real_dev to
which
the rmnet devices are attached to. I had earlier setup a rx_handler on
this
real_dev netdevice in rmnet_associate_network_device(). Would it still
be
incorrect to use rx_handler_data of real_dev to have rmnet specific
config
information?
Bridge is similarly storing the bridge information on the real_dev
rx_handler_data and retrieving it through br_port_get_rcu(). I am using
that
as a reference.
next prev parent reply other threads:[~2017-08-14 23:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-14 5:05 [PATCH net-next 0/1 v3] drivers: net: Add support for rmnet driver Subash Abhinov Kasiviswanathan
2017-04-14 5:05 ` [PATCH net-next 1/1 v3] drivers: net: rmnet: Initial implementation Subash Abhinov Kasiviswanathan
2017-04-14 9:07 ` Jiri Pirko
2017-04-14 21:57 ` Subash Abhinov Kasiviswanathan
2017-04-14 21:59 ` Stephen Hemminger
2017-08-14 23:52 ` Subash Abhinov Kasiviswanathan [this message]
2017-04-14 16:10 ` Stephen Hemminger
2017-04-14 23:02 ` Subash Abhinov Kasiviswanathan
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=a0ec8e95c5c2b84aad176ef523589bc4@codeaurora.org \
--to=subashab@codeaurora.org \
--cc=davem@davemloft.net \
--cc=dcbw@redhat.com \
--cc=fengguang.wu@intel.com \
--cc=jiri@resnulli.us \
--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.