Date: Mon, 27 Jun 2016 09:34:40 GMT From: vincenzo@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r305579 - soc2016/vincenzo/head/sys/dev/netmap Message-ID: <201606270934.u5R9YeBR028394@socsvn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: vincenzo Date: Mon Jun 27 09:34:39 2016 New Revision: 305579 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=305579 Log: freebsd: ptnet_media_status: ptnet media is always active Modified: soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c Modified: soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c ============================================================================== --- soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c Mon Jun 27 09:34:22 2016 (r305578) +++ soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c Mon Jun 27 09:34:39 2016 (r305579) @@ -974,7 +974,7 @@ struct ptnet_softc *sc = ifp->if_softc; int i; - /* Flush all ring buffers and do the interface flush. */ + /* Flush all the bufrings and do the interface flush. */ for (i = 0; i < sc->num_rings; i++) { struct ptnet_queue *pq = sc->queues + i; struct mbuf *m; @@ -1008,15 +1008,10 @@ static void ptnet_media_status(struct ifnet *ifp, struct ifmediareq *ifmr) { - ifmr->ifm_status = IFM_AVALID; - ifmr->ifm_active = IFM_ETHER; - - if (1) { - ifmr->ifm_status |= IFM_ACTIVE; - ifmr->ifm_active |= IFM_10G_T | IFM_FDX; - } else { - ifmr->ifm_active |= IFM_NONE; - } + /* We are always active, as the backend netmap port is + * always open in netmap mode. */ + ifmr->ifm_status = IFM_AVALID | IFM_ACTIVE; + ifmr->ifm_active = IFM_ETHER | IFM_10G_T | IFM_FDX; } static uint32_t
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606270934.u5R9YeBR028394>