From: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
To: davem@davemloft.net, netdev@vger.kernel.org
Cc: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Subject: [PATCH net-next] net: qualcomm: rmnet: Support recycling frames to real device
Date: Fri, 27 Oct 2017 14:30:08 -0600 [thread overview]
Message-ID: <1509136208-14768-1-git-send-email-subashab@codeaurora.org> (raw)
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.
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
---
drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
index 29842cc..7869fcf 100644
--- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
+++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
@@ -108,7 +108,10 @@ static void rmnet_set_skb_proto(struct sk_buff *skb)
while ((skbn = rmnet_map_deaggregate(skb)) != NULL)
__rmnet_map_ingress_handler(skbn, port);
- consume_skb(skb);
+ if (skb->destructor)
+ skb->destructor(skb);
+ else
+ consume_skb(skb);
} else {
__rmnet_map_ingress_handler(skb, port);
}
--
1.9.1
next reply other threads:[~2017-10-27 20:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-27 20:30 Subash Abhinov Kasiviswanathan [this message]
2017-10-27 21:00 ` [PATCH net-next] net: qualcomm: rmnet: Support recycling frames to real device Alexander Duyck
2017-10-27 22:22 ` Subash Abhinov Kasiviswanathan
2017-10-28 1:19 ` Alexander Duyck
2017-11-01 2:55 ` David Miller
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=1509136208-14768-1-git-send-email-subashab@codeaurora.org \
--to=subashab@codeaurora.org \
--cc=davem@davemloft.net \
--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 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).