From: Edward Cree <ecree@solarflare.com>
To: <namit@vmware.com>, <jpoimboe@redhat.com>
Cc: <linux-kernel@vger.kernel.org>, <x86@kernel.org>
Subject: [RFC PATCH v2 4/4] net: core: use a dynamic_call for pt_prev->list_func() in list RX path
Date: Sat, 2 Feb 2019 00:08:07 +0000 [thread overview]
Message-ID: <bbd0597c-e117-a28b-78e6-45bf450b2719@solarflare.com> (raw)
In-Reply-To: <1c8bfbb9-c76f-85d7-f6e2-aba33d5950b0@solarflare.com>
There are currently only two possible callees, ip_list_rcv and
ipv6_list_rcv. Even when more are added, most packets will typically
follow one of a small number of callees on any given system.
Signed-off-by: Edward Cree <ecree@solarflare.com>
---
net/core/dev.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 7b38a33689d8..ecf41618a279 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5006,6 +5006,9 @@ int netif_receive_skb_core(struct sk_buff *skb)
}
EXPORT_SYMBOL(netif_receive_skb_core);
+DYNAMIC_CALL_3(void, deliver_skb_list, struct list_head *, struct packet_type *,
+ struct net_device *);
+
static inline void __netif_receive_skb_list_ptype(struct list_head *head,
struct packet_type *pt_prev,
struct net_device *orig_dev)
@@ -5017,7 +5020,8 @@ static inline void __netif_receive_skb_list_ptype(struct list_head *head,
if (list_empty(head))
return;
if (pt_prev->list_func != NULL)
- pt_prev->list_func(head, pt_prev, orig_dev);
+ dynamic_deliver_skb_list(pt_prev->list_func, head, pt_prev,
+ orig_dev);
else
list_for_each_entry_safe(skb, next, head, list)
dynamic_deliver_skb(pt_prev->func, skb, skb->dev,
next prev parent reply other threads:[~2019-02-02 0:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-02 0:05 [RFC PATCH v2 0/4] dynamic indirect call promotion Edward Cree
2019-02-02 0:07 ` [RFC PATCH v2 1/4] static_call: add indirect call promotion (dynamic_call) infrastructure Edward Cree
2019-02-02 0:07 ` [RFC PATCH v2 2/4] net: core: use a dynamic_call for pt_prev->func() in RX path Edward Cree
2019-02-02 0:07 ` [RFC PATCH v2 3/4] net: core: use a dynamic_call for dst_input Edward Cree
2019-02-02 0:08 ` Edward Cree [this message]
2019-02-05 8:50 ` [RFC PATCH v2 0/4] dynamic indirect call promotion Nadav Amit
2019-02-15 17:21 ` Edward Cree
2019-02-18 16:22 ` Nadav Amit
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=bbd0597c-e117-a28b-78e6-45bf450b2719@solarflare.com \
--to=ecree@solarflare.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namit@vmware.com \
--cc=x86@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
all inboxes | Powered by JetHome®