Date: Tue, 29 Sep 2020 07:36:21 +0000 (UTC) From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366244 - head/sys/dev/cxgbe Message-ID: <202009290736.08T7aLjh086719@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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++) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009290736.08T7aLjh086719>