diff options
| author | Subash Abhinov Kasiviswanathan <subashab@codeaurora.org> | 2017-10-31 10:49:20 -0600 |
|---|---|---|
| committer | Subash Abhinov Kasiviswanathan <subashab@codeaurora.org> | 2017-10-31 10:59:13 -0600 |
| commit | a445520d5de8aa504d3ac5dc45237baa7fcdb15a (patch) | |
| tree | d543e5f418107b36e18ae3c66734f7e5c98bd655 /net | |
| parent | bb3bb010ec742e3949183fb982093beae411239c (diff) | |
net: rmnet_data: Support recycling frames to real device
For deaggregation, the real device receives a large linear skb and
passes it on to rmnet. rmnet creates new skbs from this large frame.
If the real device supports recycling, it does not need to allocate
the large skbs during packet reception and can instead reuse them.
CRs-Fixed: 2140499
Change-Id: I4f3c67bafe1918dc1a96690305d00cc8c625a9b7
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Diffstat (limited to 'net')
| -rw-r--r-- | net/rmnet_data/rmnet_data_stats.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/rmnet_data/rmnet_data_stats.c b/net/rmnet_data/rmnet_data_stats.c index 20f1628242c7..8fd3743799f8 100644 --- a/net/rmnet_data/rmnet_data_stats.c +++ b/net/rmnet_data/rmnet_data_stats.c @@ -77,6 +77,11 @@ void rmnet_kfree_skb(struct sk_buff *skb, unsigned int reason) if (likely(skb)) { struct rmnet_phys_ep_conf_s *config; + if (skb->destructor) { + skb->destructor(skb); + return; + } + config = (struct rmnet_phys_ep_conf_s *)rcu_dereference (skb->dev->rx_handler_data); if (likely(config)) |
