aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/hyperv/netvsc
diff options
context:
space:
mode:
authorDexuan Cui <dexuan@FreeBSD.org>2017-01-24 09:15:36 +0000
committerDexuan Cui <dexuan@FreeBSD.org>2017-01-24 09:15:36 +0000
commitc927d68136e64759fb46546ea1b629294a89d988 (patch)
tree795c53a8c391b98c7a4a2a38593aac9c2a8316e0 /sys/dev/hyperv/netvsc
parent3ab0fea13446be0b154516b8f1b827d0cfec7ba4 (diff)
downloadsrc-c927d68136e64759fb46546ea1b629294a89d988.tar.gz
src-c927d68136e64759fb46546ea1b629294a89d988.zip
hyperv/hn: remove the MTU and IFF_DRV_RUNNING checking in hn_rxpkt()
It's unnecessary because the upper nework stack does the same checking. In the case of Hyper-V SR-IOV, we need to remove the checking because 1) multicast/broadcast packets are still received through the synthetic NIC and we need to inject the packets through the VF interface; 2) we must inject the packets even if the synthetic NIC is down, or has a different MTU from the VF device. Reviewed by: sephe Approved by: sephe (mentor) MFC after: 2 weeks Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8962
Notes
Notes: svn path=/head/; revision=312686
Diffstat (limited to 'sys/dev/hyperv/netvsc')
-rw-r--r--sys/dev/hyperv/netvsc/if_hn.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/sys/dev/hyperv/netvsc/if_hn.c b/sys/dev/hyperv/netvsc/if_hn.c
index ee800eb46def..65a22928fec8 100644
--- a/sys/dev/hyperv/netvsc/if_hn.c
+++ b/sys/dev/hyperv/netvsc/if_hn.c
@@ -2129,15 +2129,7 @@ hn_rxpkt(struct hn_rx_ring *rxr, const void *data, int dlen,
int size, do_lro = 0, do_csum = 1;
int hash_type;
- if (!(ifp->if_drv_flags & IFF_DRV_RUNNING))
- return (0);
-
- /*
- * Bail out if packet contains more data than configured MTU.
- */
- if (dlen > (ifp->if_mtu + ETHER_HDR_LEN)) {
- return (0);
- } else if (dlen <= MHLEN) {
+ if (dlen <= MHLEN) {
m_new = m_gethdr(M_NOWAIT, MT_DATA);
if (m_new == NULL) {
if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1);