Author: np
Date: Tue Sep 29 07:36:21 2020
New Revision: 366244
URL: https://svnweb.freebsd.org/changeset/base/366244

Log:
  cxgbe(4): display an error message when netmap cannot be enabled because
  the interface is down.
  
  MFC after:    1 week

Modified:
  head/sys/dev/cxgbe/t4_netmap.c

Modified: head/sys/dev/cxgbe/t4_netmap.c
==============================================================================
--- head/sys/dev/cxgbe/t4_netmap.c      Tue Sep 29 05:49:45 2020        
(r366243)
+++ head/sys/dev/cxgbe/t4_netmap.c      Tue Sep 29 07:36:21 2020        
(r366244)
@@ -536,8 +536,11 @@ cxgbe_netmap_on(struct adapter *sc, struct vi_info *vi
        MPASS(vi->nnmtxq > 0);
 
        if ((vi->flags & VI_INIT_DONE) == 0 ||
-           (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
+           (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) {
+               if_printf(ifp, "cannot enable netmap operation because "
+                   "interface is not UP.\n");
                return (EAGAIN);
+       }
 
        rxb = &sc->sge.rx_buf_info[0];
        for (i = 0; i < SW_ZONE_SIZES; i++, rxb++) {
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to