[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a0ec8e95c5c2b84aad176ef523589bc4@codeaurora.org>
Date: Mon, 14 Aug 2017 17:52:45 -0600
From: Subash Abhinov Kasiviswanathan <subashab@...eaurora.org>
To: Jiri Pirko <jiri@...nulli.us>
Cc: netdev@...r.kernel.org, davem@...emloft.net,
fengguang.wu@...el.com, dcbw@...hat.com
Subject: Re: [PATCH net-next 1/1 v3] drivers: net: rmnet: Initial
implementation
>> + */
>> +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.
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora
Forum,
a Linux Foundation Collaborative Project
Powered by blists - more mailing lists