Netdev List
 help / color / mirror / Atom feed
From: Alexander Duyck <alexander.h.duyck@redhat.com>
To: netdev@vger.kernel.org
Cc: stephen@networkplumber.org, pshelar@nicira.com, davem@davemloft.net
Subject: [net-next PATCH 3/5] ipv4/ip_tunnel_core: Use eth_proto_is_802_3
Date: Mon, 04 May 2015 14:33:59 -0700	[thread overview]
Message-ID: <20150504213359.2536.38833.stgit@ahduyck-vm-fedora22> (raw)
In-Reply-To: <20150504212603.2536.29877.stgit@ahduyck-vm-fedora22>

Replace "ntohs(proto) >= ETH_P_802_3_MIN" w/ eth_proto_is_802_3(proto).

Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
---
 net/ipv4/ip_tunnel_core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c
index ce63ab21b6cd..3998b1822d85 100644
--- a/net/ipv4/ip_tunnel_core.c
+++ b/net/ipv4/ip_tunnel_core.c
@@ -98,7 +98,7 @@ int iptunnel_pull_header(struct sk_buff *skb, int hdr_len, __be16 inner_proto)
 			return -ENOMEM;
 
 		eh = (struct ethhdr *)skb->data;
-		if (likely(ntohs(eh->h_proto) >= ETH_P_802_3_MIN))
+		if (likely(eth_proto_is_802_3(eh->h_proto)))
 			skb->protocol = eh->h_proto;
 		else
 			skb->protocol = htons(ETH_P_802_2);

  parent reply	other threads:[~2015-05-04 21:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-04 21:33 [net-next PATCH 0/5] Add eth_proto_is_802_3 to provide improved means of checking Ethertype Alexander Duyck
2015-05-04 21:33 ` [net-next PATCH 1/5] etherdev: Fix sparse error, make test usable by other functions Alexander Duyck
2015-05-04 21:33 ` [net-next PATCH 2/5] ebtables: Use eth_proto_is_802_3 Alexander Duyck
2015-05-04 21:33 ` Alexander Duyck [this message]
2015-05-04 21:34 ` [net-next PATCH 4/5] openvswitch: " Alexander Duyck
2015-05-04 21:34 ` [net-next PATCH 5/5] vlan: " Alexander Duyck
2015-05-05 23:24 ` [net-next PATCH 0/5] Add eth_proto_is_802_3 to provide improved means of checking Ethertype 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=20150504213359.2536.38833.stgit@ahduyck-vm-fedora22 \
    --to=alexander.h.duyck@redhat.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=pshelar@nicira.com \
    --cc=stephen@networkplumber.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