Author: dexuan
Date: Wed Feb 22 06:12:33 2017
New Revision: 314084
URL: https://svnweb.freebsd.org/changeset/base/314084

Log:
  MFC: 312686
  
  Approved by:  sephe (mentor)
  
  r312686
      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)
      Sponsored by:     Microsoft
      Differential Revision:    https://reviews.freebsd.org/D8962

Modified:
  stable/11/sys/dev/hyperv/netvsc/if_hn.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/hyperv/netvsc/if_hn.c
==============================================================================
--- stable/11/sys/dev/hyperv/netvsc/if_hn.c     Wed Feb 22 06:06:58 2017        
(r314083)
+++ stable/11/sys/dev/hyperv/netvsc/if_hn.c     Wed Feb 22 06:12:33 2017        
(r314084)
@@ -2129,15 +2129,7 @@ hn_rxpkt(struct hn_rx_ring *rxr, const v
        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);
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to