Date: Fri, 30 Aug 2019 00:05:05 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351616 - head/sys/dev/usb/net Message-ID: <201908300005.x7U055YI057385@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Fri Aug 30 00:05:04 2019 New Revision: 351616 URL: https://svnweb.freebsd.org/changeset/base/351616 Log: Use mbuf queue instead of ifqueue in USB network drivers. Reviewed by: stevek Modified: head/sys/dev/usb/net/if_axe.c head/sys/dev/usb/net/if_axge.c head/sys/dev/usb/net/usb_ethernet.c head/sys/dev/usb/net/usb_ethernet.h Modified: head/sys/dev/usb/net/if_axe.c ============================================================================== --- head/sys/dev/usb/net/if_axe.c Fri Aug 30 00:03:41 2019 (r351615) +++ head/sys/dev/usb/net/if_axe.c Fri Aug 30 00:05:04 2019 (r351616) @@ -1149,7 +1149,7 @@ axe_rxeof(struct usb_ether *ue, struct usb_page_cache } } - _IF_ENQUEUE(&ue->ue_rxq, m); + (void)mbufq_enqueue(&ue->ue_rxq, m); return (0); } Modified: head/sys/dev/usb/net/if_axge.c ============================================================================== --- head/sys/dev/usb/net/if_axge.c Fri Aug 30 00:03:41 2019 (r351615) +++ head/sys/dev/usb/net/if_axge.c Fri Aug 30 00:05:04 2019 (r351616) @@ -1041,7 +1041,7 @@ axge_rxeof(struct usb_ether *ue, struct usb_page_cache } if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); - _IF_ENQUEUE(&ue->ue_rxq, m); + (void)mbufq_enqueue(&ue->ue_rxq, m); } static void Modified: head/sys/dev/usb/net/usb_ethernet.c ============================================================================== --- head/sys/dev/usb/net/usb_ethernet.c Fri Aug 30 00:03:41 2019 (r351615) +++ head/sys/dev/usb/net/usb_ethernet.c Fri Aug 30 00:05:04 2019 (r351616) @@ -598,7 +598,7 @@ uether_rxmbuf(struct usb_ether *ue, struct mbuf *m, m->m_pkthdr.len = m->m_len = len; /* enqueue for later when the lock can be released */ - _IF_ENQUEUE(&ue->ue_rxq, m); + (void)mbufq_enqueue(&ue->ue_rxq, m); return (0); } @@ -628,7 +628,7 @@ uether_rxbuf(struct usb_ether *ue, struct usb_page_cac m->m_pkthdr.len = m->m_len = len; /* enqueue for later when the lock can be released */ - _IF_ENQUEUE(&ue->ue_rxq, m); + (void)mbufq_enqueue(&ue->ue_rxq, m); return (0); } @@ -641,7 +641,7 @@ uether_rxflush(struct usb_ether *ue) UE_LOCK_ASSERT(ue, MA_OWNED); for (;;) { - _IF_DEQUEUE(&ue->ue_rxq, m); + m = mbufq_dequeue(&ue->ue_rxq); if (m == NULL) break; Modified: head/sys/dev/usb/net/usb_ethernet.h ============================================================================== --- head/sys/dev/usb/net/usb_ethernet.h Fri Aug 30 00:03:41 2019 (r351615) +++ head/sys/dev/usb/net/usb_ethernet.h Fri Aug 30 00:05:04 2019 (r351616) @@ -41,12 +41,10 @@ #include <sys/limits.h> #include <net/if.h> -#include <net/if_var.h> #include <net/if_arp.h> #include <net/if_dl.h> #include <net/if_media.h> #include <net/if_types.h> -#include <net/ifq.h> #include <net/bpf.h> #include <net/ethernet.h> @@ -89,7 +87,7 @@ struct usb_ether { struct usb_process ue_tq; struct sysctl_ctx_list ue_sysctl_ctx; - struct ifqueue ue_rxq; + struct mbufq ue_rxq; struct usb_callout ue_watchdog; struct usb_ether_cfg_task ue_sync_task[2]; struct usb_ether_cfg_task ue_media_task[2];
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908300005.x7U055YI057385>