netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/7 net-next] vxlan: add unlikely to vxlan_remcsum check
@ 2020-08-27  6:49 Fabian Frederick
  0 siblings, 0 replies; only message in thread
From: Fabian Frederick @ 2020-08-27  6:49 UTC (permalink / raw)
  To: davem, kuba; +Cc: netdev, linux-kernel, Fabian Frederick

small optimization around checking as it's being done in all
receptions

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 drivers/net/vxlan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 47c762f7f5b11..cc904f003f158 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1876,7 +1876,7 @@ static int vxlan_rcv(struct sock *sk, struct sk_buff *skb)
 		goto drop;
 
 	if (vs->flags & VXLAN_F_REMCSUM_RX)
-		if (!vxlan_remcsum(&unparsed, skb, vs->flags))
+		if (unlikely(!vxlan_remcsum(&unparsed, skb, vs->flags)))
 			goto drop;
 
 	if (vxlan_collect_metadata(vs)) {
-- 
2.27.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-27  6:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27  6:49 [PATCH 2/7 net-next] vxlan: add unlikely to vxlan_remcsum check Fabian Frederick

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).