Date: Tue, 3 Sep 2013 18:14:30 +0000 (UTC) From: Takuya ASADA <syuu@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r255186 - in user/syuu/mq_bpf: contrib/libexecinfo contrib/libpcap contrib/libpcap/pcap contrib/tcpdump sbin/ifconfig share/man/man4 share/man/man9 sys/dev/e1000 sys/dev/ixgbe sys/dev/m... Message-ID: <201309031814.r83IEUq0016137@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: syuu Date: Tue Sep 3 18:14:30 2013 New Revision: 255186 URL: http://svnweb.freebsd.org/changeset/base/255186 Log: remove if_get_num_rxqueue/if_get_num_txqueue/if_get_rxqueue_affinity/if_get_txqueue_affinity Modified: user/syuu/mq_bpf/contrib/libexecinfo/execinfo.h user/syuu/mq_bpf/contrib/libpcap/pcap-bpf.c user/syuu/mq_bpf/contrib/libpcap/pcap-int.h user/syuu/mq_bpf/contrib/libpcap/pcap.c user/syuu/mq_bpf/contrib/libpcap/pcap/pcap.h user/syuu/mq_bpf/contrib/tcpdump/tcpdump.c user/syuu/mq_bpf/sbin/ifconfig/ifconfig.c user/syuu/mq_bpf/share/man/man4/bpf.4 user/syuu/mq_bpf/share/man/man4/netintro.4 user/syuu/mq_bpf/share/man/man9/ifnet.9 user/syuu/mq_bpf/sys/dev/e1000/if_igb.c user/syuu/mq_bpf/sys/dev/ixgbe/ixgbe.c user/syuu/mq_bpf/sys/dev/mxge/if_mxge.c user/syuu/mq_bpf/sys/net/bpf.c user/syuu/mq_bpf/sys/net/if.c user/syuu/mq_bpf/sys/net/if.h user/syuu/mq_bpf/sys/net/if_var.h Modified: user/syuu/mq_bpf/contrib/libexecinfo/execinfo.h ============================================================================== --- user/syuu/mq_bpf/contrib/libexecinfo/execinfo.h Tue Sep 3 17:33:29 2013 (r255185) +++ user/syuu/mq_bpf/contrib/libexecinfo/execinfo.h Tue Sep 3 18:14:30 2013 (r255186) @@ -1,5 +1,5 @@ /* $NetBSD: execinfo.h,v 1.2 2012/06/09 21:22:17 christos Exp $ */ -/* $FreeBSD: head/contrib/libexecinfo/execinfo.h 255177 2013-09-03 13:38:41Z emaste $ */ +/* $FreeBSD$ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. Modified: user/syuu/mq_bpf/contrib/libpcap/pcap-bpf.c ============================================================================== --- user/syuu/mq_bpf/contrib/libpcap/pcap-bpf.c Tue Sep 3 17:33:29 2013 (r255185) +++ user/syuu/mq_bpf/contrib/libpcap/pcap-bpf.c Tue Sep 3 18:14:30 2013 (r255186) @@ -34,7 +34,6 @@ static const char rcsid[] _U_ = #include <sys/mman.h> #endif #include <sys/socket.h> -#include <sys/types.h> #include <time.h> /* * <net/bpf.h> defines ioctls, but doesn't include <sys/ioccom.h>. @@ -2188,33 +2187,6 @@ pcap_activate_bpf(pcap_t *p) } #endif - if (p->qmask_enabled) { - if (ioctl(fd, BIOCQMASKENABLE, NULL) < 0) { - snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "BIOCQMASKENABLE: %s", - pcap_strerror(errno)); - status = PCAP_ERROR; - goto bad; - } - if (ioctl(fd, BIOCSRXQMASK, &p->rxqmask) < 0) { - snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "BIOCSRXQMASK: %s", - pcap_strerror(errno)); - status = PCAP_ERROR; - goto bad; - } - if (ioctl(fd, BIOCSTXQMASK, &p->txqmask) < 0) { - snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "BIOCSTXQMASK: %s", - pcap_strerror(errno)); - status = PCAP_ERROR; - goto bad; - } - if (ioctl(fd, BIOCSNOQMASK, &p->noqmask) < 0) { - snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "BIOCSNOQMASK: %s", - pcap_strerror(errno)); - status = PCAP_ERROR; - goto bad; - } - } - /* * If there's no filter program installed, there's * no indication to the kernel of what the snapshot Modified: user/syuu/mq_bpf/contrib/libpcap/pcap-int.h ============================================================================== --- user/syuu/mq_bpf/contrib/libpcap/pcap-int.h Tue Sep 3 17:33:29 2013 (r255185) +++ user/syuu/mq_bpf/contrib/libpcap/pcap-int.h Tue Sep 3 18:14:30 2013 (r255186) @@ -337,11 +337,6 @@ struct pcap { u_int *tstamp_type_list; struct pcap_pkthdr pcap_header; /* This is needed for the pcap_next_ex() to work */ - - int qmask_enabled; - struct bpf_qmask_bits rxqmask; - struct bpf_qmask_bits txqmask; - int noqmask; }; /* Modified: user/syuu/mq_bpf/contrib/libpcap/pcap.c ============================================================================== --- user/syuu/mq_bpf/contrib/libpcap/pcap.c Tue Sep 3 17:33:29 2013 (r255185) +++ user/syuu/mq_bpf/contrib/libpcap/pcap.c Tue Sep 3 18:14:30 2013 (r255186) @@ -505,7 +505,6 @@ pcap_create_common(const char *source, c p->opt.promisc = 0; p->opt.buffer_size = 0; p->opt.tstamp_type = -1; /* default to not setting time stamp type */ - p->qmask_enabled = 0; return (p); } @@ -638,75 +637,6 @@ pcap_activate(pcap_t *p) return (status); } -int -pcap_enable_qmask(pcap_t *p) -{ - p->qmask_enabled = 1; - BPFQ_ZERO(&p->rxqmask); - BPFQ_ZERO(&p->txqmask); - p->noqmask = 0; -} - -int -pcap_disable_qmask(pcap_t *p) -{ - p->qmask_enabled = 0; -} - -int -pcap_set_rxqmask(pcap_t *p, u_int queueid) -{ - if (pcap_check_activated(p)) - return PCAP_ERROR_ACTIVATED; - BPFQ_SET(queueid, &p->rxqmask); - return 0; -} - -int -pcap_clear_rxqmask(pcap_t *p, u_int queueid) -{ - if (pcap_check_activated(p)) - return PCAP_ERROR_ACTIVATED; - BPFQ_CLR(queueid, &p->rxqmask); - return 0; -} - -int -pcap_set_txqmask(pcap_t *p, u_int queueid) -{ - if (pcap_check_activated(p)) - return PCAP_ERROR_ACTIVATED; - BPFQ_SET(queueid, &p->txqmask); - return 0; -} - -int -pcap_clear_txqmask(pcap_t *p, u_int queueid) -{ - if (pcap_check_activated(p)) - return PCAP_ERROR_ACTIVATED; - BPFQ_CLR(queueid, &p->txqmask); - return 0; -} - -int -pcap_set_noqmask(pcap_t *p) -{ - if (pcap_check_activated(p)) - return PCAP_ERROR_ACTIVATED; - p->noqmask = 1; - return 0; -} - -int -pcap_clear_noqmask(pcap_t *p) -{ - if (pcap_check_activated(p)) - return PCAP_ERROR_ACTIVATED; - p->noqmask = 0; - return 0; -} - pcap_t * pcap_open_live(const char *source, int snaplen, int promisc, int to_ms, char *errbuf) { Modified: user/syuu/mq_bpf/contrib/libpcap/pcap/pcap.h ============================================================================== --- user/syuu/mq_bpf/contrib/libpcap/pcap/pcap.h Tue Sep 3 17:33:29 2013 (r255185) +++ user/syuu/mq_bpf/contrib/libpcap/pcap/pcap.h Tue Sep 3 18:14:30 2013 (r255186) @@ -331,15 +331,6 @@ const char *pcap_tstamp_type_val_to_desc #define PCAP_TSTAMP_ADAPTER 3 /* device-provided, synced with the system clock */ #define PCAP_TSTAMP_ADAPTER_UNSYNCED 4 /* device-provided, not synced with the system clock */ -int pcap_enable_qmask(pcap_t *); -int pcap_disable_qmask(pcap_t *); -int pcap_set_rxqmask(pcap_t *, u_int); -int pcap_clear_rxqmask(pcap_t *, u_int); -int pcap_set_txqmask(pcap_t *, u_int); -int pcap_clear_txqmask(pcap_t *, u_int); -int pcap_set_noqmask(pcap_t *); -int pcap_clear_noqmask(pcap_t *); - pcap_t *pcap_open_live(const char *, int, int, int, char *); pcap_t *pcap_open_dead(int, int); pcap_t *pcap_open_offline(const char *, char *); Modified: user/syuu/mq_bpf/contrib/tcpdump/tcpdump.c ============================================================================== --- user/syuu/mq_bpf/contrib/tcpdump/tcpdump.c Tue Sep 3 17:33:29 2013 (r255185) +++ user/syuu/mq_bpf/contrib/tcpdump/tcpdump.c Tue Sep 3 18:14:30 2013 (r255186) @@ -717,9 +717,6 @@ main(int argc, char **argv) #ifdef __FreeBSD__ int cansandbox; #endif - int qmask = 0; - u_int rxq = (u_int)-1, txq = (u_int)-1; - int noq = -1; #ifdef WIN32 if(wsockinit() != 0) return 1; @@ -756,7 +753,7 @@ main(int argc, char **argv) #endif while ( - (op = getopt(argc, argv, "aAb" B_FLAG "c:C:d" D_FLAG "eE:fF:G:hHi:" I_FLAG j_FLAG J_FLAG "KlLm:M:nNOpqr:Rs:StT:u" U_FLAG "V:vw:W:xXy:Yz:Z:Q:g:k")) != -1) + (op = getopt(argc, argv, "aAb" B_FLAG "c:C:d" D_FLAG "eE:fF:G:hHi:" I_FLAG j_FLAG J_FLAG "KlLm:M:nNOpqr:Rs:StT:u" U_FLAG "V:vw:W:xXy:Yz:Z:")) != -1) switch (op) { case 'a': @@ -834,11 +831,6 @@ main(int argc, char **argv) infile = optarg; break; - case 'g': - qmask = 1; - txq = atoi(optarg); - break; - case 'G': Gflag = atoi(optarg); if (Gflag < 0) @@ -943,13 +935,6 @@ main(int argc, char **argv) #endif /* WIN32 */ break; - case 'k': - qmask = 1; - noq = atoi(optarg); - if (noq != 0 || noq != 1) - usage(); - break; - case 'K': ++Kflag; break; @@ -996,11 +981,6 @@ main(int argc, char **argv) ++suppress_default_print; break; - case 'Q': - qmask = 1; - rxq = atoi(optarg); - break; - case 'r': RFileName = optarg; break; @@ -1316,15 +1296,6 @@ main(int argc, char **argv) device, pcap_statustostr(status)); } #endif - if (qmask) - pcap_enable_qmask(pd); - if (rxq != (u_int)-1) - pcap_set_rxqmask(pd, rxq); - if (txq != (u_int)-1) - pcap_set_txqmask(pd, txq); - if (noq != -1) - noq ? pcap_set_noqmask(pd) : pcap_clear_noqmask(pd); - status = pcap_activate(pd); if (status < 0) { /* @@ -2253,7 +2224,7 @@ usage(void) #endif /* WIN32 */ #endif /* HAVE_PCAP_LIB_VERSION */ (void)fprintf(stderr, -"Usage: %s [-aAbd" D_FLAG "efghH" I_FLAG J_FLAG "kKlLnNOpqQRStu" U_FLAG "vxX]" B_FLAG_USAGE " [ -c count ]\n", program_name); +"Usage: %s [-aAbd" D_FLAG "efhH" I_FLAG J_FLAG "KlLnNOpqRStu" U_FLAG "vxX]" B_FLAG_USAGE " [ -c count ]\n", program_name); (void)fprintf(stderr, "\t\t[ -C file_size ] [ -E algo:secret ] [ -F file ] [ -G seconds ]\n"); (void)fprintf(stderr, Modified: user/syuu/mq_bpf/sbin/ifconfig/ifconfig.c ============================================================================== --- user/syuu/mq_bpf/sbin/ifconfig/ifconfig.c Tue Sep 3 17:33:29 2013 (r255185) +++ user/syuu/mq_bpf/sbin/ifconfig/ifconfig.c Tue Sep 3 18:14:30 2013 (r255186) @@ -917,26 +917,7 @@ unsetifdescr(const char *val, int value, "\020\1RXCSUM\2TXCSUM\3NETCONS\4VLAN_MTU\5VLAN_HWTAGGING\6JUMBO_MTU\7POLLING" \ "\10VLAN_HWCSUM\11TSO4\12TSO6\13LRO\14WOL_UCAST\15WOL_MCAST\16WOL_MAGIC" \ "\17TOE4\20TOE6\21VLAN_HWFILTER\23VLAN_HWTSO\24LINKSTATE\25NETMAP" \ -"\26RXCSUM_IPV6\27TXCSUM_IPV6\30QUEUEID" - -static char * -cpusetobj_strprint(char *buf, const cpuset_t *set) -{ - char *tbuf; - size_t i, bytesp, bufsiz; - - tbuf = buf; - bytesp = 0; - bufsiz = CPUSETBUFSIZ; - - for (i = 0; i < (_NCPUWORDS - 1); i++) { - bytesp = snprintf(tbuf, bufsiz, "%lx,", set->__bits[i]); - bufsiz -= bytesp; - tbuf += bytesp; - } - snprintf(tbuf, bufsiz, "%lx", set->__bits[_NCPUWORDS - 1]); - return (buf); -} +"\26RXCSUM_IPV6\27TXCSUM_IPV6\28QUEUEID" /* * Print the status of the interface. If an address family was @@ -1003,41 +984,6 @@ status(const struct afswtch *afp, const } } - if ((ifr.ifr_reqcap & IFCAP_QUEUEID)) { - int i, numrxq = 0, numtxq = 0; - char cpus[CPUSETBUFSIZ]; - - if (ioctl(s, SIOCGIFQLEN, &ifr) == 0) { - numrxq = ifr.ifr_num_rxqueue; - numtxq = ifr.ifr_num_txqueue; - }else - perror("ioctl"); - - printf("\tnumber of rxqueues=%d affinity=[", numrxq); - for (i = 0; i < numrxq; i++) { - ifr.ifr_queue_affinity_idx = i; - if (ioctl(s, SIOCGIFRXQAFFINITY, &ifr) == 0) { - cpusetobj_strprint(cpus, - &ifr.ifr_queue_affinity_cpus); - printf(" %d:%s", i, cpus); - }else - perror("ioctl"); - } - printf(" ]\n"); - - printf("\tnumber of txqueues=%d affinity=[", numtxq); - for (i = 0; i < numtxq; i++) { - ifr.ifr_queue_affinity_idx = i; - if (ioctl(s, SIOCGIFTXQAFFINITY, &ifr) == 0) { - cpusetobj_strprint(cpus, - &ifr.ifr_queue_affinity_cpus); - printf(" %d:%s", i, cpus); - }else - perror("ioctl"); - } - printf(" ]\n"); - } - tunnel_status(s); for (ift = ifa; ift != NULL; ift = ift->ifa_next) { Modified: user/syuu/mq_bpf/share/man/man4/bpf.4 ============================================================================== --- user/syuu/mq_bpf/share/man/man4/bpf.4 Tue Sep 3 17:33:29 2013 (r255185) +++ user/syuu/mq_bpf/share/man/man4/bpf.4 Tue Sep 3 18:14:30 2013 (r255186) @@ -631,44 +631,34 @@ therefore ownership is not assigned, the .Vt bzh_kernel_gen against .Vt bzh_user_gen . -.It Dv BIOCENAQMASK +.It Dv BIOCQMASKENABLE Enables multiqueue filter on the descriptor. -.It Dv BIOCDISQMASK +.It Dv BIOCQMASKDISABLE Disables multiqueue filter on the descriptor. -.It Dv BIOCSTRXQMASK -.Pq Li uint32_t -Set mask bit on specified RX queue. - -.It Dv BIOCCRRXQMASK -.Pq Li uint32_t -Clear mask bit on specified RX queue. - -.It Dv BIOCGTRXQMASK -.Pq Li uint32_t -Get mask bit on specified RX queue. - -.It Dv BIOCSTTXQMASK -.Pq Li uint32_t -Set mask bit on specified TX queue. - -.It Dv BIOCCRTXQMASK -.Pq Li uint32_t -Clear mask bit on specified TX queue. - -.It Dv BIOCGTTXQMASK -.Pq Li uint32_t -Get mask bit on specified TX queue. +.It Dv BIOCGRXQMASK +.Pq Li struct bpf_qmask_bits +Set RX queue mask bits. + +.It Dv BIOCSRXQMASK +.Pq Li struct bpf_qmask_bits +Get RX queue mask bits. + +.It Dv BIOCGTXQMASK +.Pq Li struct bpf_qmask_bits +Set TX queue mask bits. + +.It Dv BIOCSTXQMASK +.Pq Li struct bpf_qmask_bits +Get TX queue mask bits. -.It Dv BIOCSTOTHERMASK +.It Dv BIOCGNOQMASK +.Pq Li int Set mask bit for the packets which not tied with any queues. -.It Dv BIOCCROTHERMASK -Clear mask bit for the packets which not tied with any queues. - -.It Dv BIOCGTOTHERMASK -.Pq Li uint32_t +.It Dv BIOCSNOQMASK +.Pq Li int Get mask bit for the packets which not tied with any queues. .El @@ -1088,8 +1078,7 @@ This distributes bpf workload on multipl contention on bpf. To make your program multithreaded, you'll need to open bpf descriptor on each -thread, enable multiqueue support by BIOCENAQMASK ioctl, and set queue mask by -BIOCSTRXQMASK / BIOCSTTXQMASK / BIOCSTOTHERMASK ioctls. +thread, enable multiqueue support by BIOCQMASKENABLE ioctl, and set queue mask by BIOCSRXQMASK / BIOCSTXQMASK / BIOCSNOQMASK ioctls. Queue length and queue affinity information may useful to optimize setting queue mask on bpf descriptor, see Modified: user/syuu/mq_bpf/share/man/man4/netintro.4 ============================================================================== --- user/syuu/mq_bpf/share/man/man4/netintro.4 Tue Sep 3 17:33:29 2013 (r255185) +++ user/syuu/mq_bpf/share/man/man4/netintro.4 Tue Sep 3 18:14:30 2013 (r255186) @@ -213,12 +213,6 @@ struct ifreq { int ifru_media; caddr_t ifru_data; int ifru_cap[2]; - u_int ifru_fib; - int ifru_num_queue[2]; - struct { - int idx; - cpuset_t cpus; - } ifru_queue_affinity; } ifr_ifru; #define ifr_addr ifr_ifru.ifru_addr /* address */ #define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */ @@ -234,11 +228,6 @@ struct ifreq { #define ifr_reqcap ifr_ifru.ifru_cap[0] /* requested capabilities */ #define ifr_curcap ifr_ifru.ifru_cap[1] /* current capabilities */ #define ifr_index ifr_ifru.ifru_index /* interface index */ -#define ifr_fib ifr_ifru.ifru_fib /* interface fib */ -#define ifr_num_rxqueue ifr_ifru.ifru_num_queue[0] /* number of rxqueues */ -#define ifr_num_txqueue ifr_ifru.ifru_num_queue[1] /* number of txqueues */ -#define ifr_queue_affinity_idx ifr_ifru.ifru_queue_affinity.idx /* queue index */ -#define ifr_queue_affinity_cpus ifr_ifru.ifru_queue_affinity.cpus /* queue affinity mask */ }; .Ed .Pp @@ -330,12 +319,6 @@ On successful return the field will contain the new interface name. .It Dv SIOCIFDESTROY Attempt to destroy the specified interface. -.It Dv SIOCGIFQLEN -Get interface RX/TX queue length. -.It Dv SIOCGIFRXQAFFINITY -Get interface RX queue affinity. -.It Dv SIOCGIFTXQAFFINITY -Get interface TX queue affinity. .El .Pp There are two requests that make use of a new structure: Modified: user/syuu/mq_bpf/share/man/man9/ifnet.9 ============================================================================== --- user/syuu/mq_bpf/share/man/man9/ifnet.9 Tue Sep 3 17:33:29 2013 (r255185) +++ user/syuu/mq_bpf/share/man/man9/ifnet.9 Tue Sep 3 18:14:30 2013 (r255186) @@ -119,14 +119,6 @@ .Fo \*(lp*if_resolvemulti\*(rp .Fa "struct ifnet *ifp" "struct sockaddr **retsa" "struct sockaddr *addr" .Fc -.Ft int -.Fn \*(lp*if_get_num_rxqueue\*(rp "struct ifnet *ifp" -.Ft int -.Fn \*(lp*if_get_num_txqueue\*(rp "struct ifnet *ifp" -.Ft int -.Fn \*(lp*if_get_rxqueue_affinity\*(rp "struct ifnet *ifp" "int idx" "cpuset_t *cpus" -.Ft int -.Fn \*(lp*if_get_txqueue_affinity\*(rp "struct ifnet *ifp" "int idx" "cpuset_t *cpus" .Ss "struct ifaddr member function" .Ft void .Fo \*(lp*ifa_rtrequest\*(rp @@ -545,14 +537,6 @@ for validity, and if necessary compute a corresponds to that address which is returned in .Fa *retsa . Returns zero on success, or an error code on failure. -.It Fn if_get_num_rxqueue -Get RX queue length, only required for multiqueue supported interfaces. -.It Fn if_get_num_txqueue -Get TX queue length, only required for multiqueue supported interfaces. -.It Fn if_get_rxqueue_affinity -Get RX queue affinity, only required for multiqueue supported interfaces. -.It Fn if_get_txqueue_affinity -Get TX queue affinity, only required for multiqueue supported interfaces. .El .Ss "Interface Flags" Interface flags are used for a number of different purposes. Modified: user/syuu/mq_bpf/sys/dev/e1000/if_igb.c ============================================================================== --- user/syuu/mq_bpf/sys/dev/e1000/if_igb.c Tue Sep 3 17:33:29 2013 (r255185) +++ user/syuu/mq_bpf/sys/dev/e1000/if_igb.c Tue Sep 3 18:14:30 2013 (r255186) @@ -279,11 +279,6 @@ static int igb_set_flowcntl(SYSCTL_HANDL static int igb_sysctl_dmac(SYSCTL_HANDLER_ARGS); static int igb_sysctl_eee(SYSCTL_HANDLER_ARGS); -static int igb_get_num_rxqueue(struct ifnet *); -static int igb_get_num_txqueue(struct ifnet *); -static int igb_get_rxqueue_affinity(struct ifnet *, int, cpuset_t *); -static int igb_get_txqueue_affinity(struct ifnet *, int, cpuset_t *); - #ifdef DEVICE_POLLING static poll_handler_t igb_poll; #endif /* POLLING */ @@ -3134,10 +3129,6 @@ igb_setup_interface(device_t dev, struct ifp->if_softc = adapter; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = igb_ioctl; - ifp->if_get_num_rxqueue = igb_get_num_rxqueue; - ifp->if_get_num_txqueue = igb_get_num_txqueue; - ifp->if_get_rxqueue_affinity = igb_get_rxqueue_affinity; - ifp->if_get_txqueue_affinity = igb_get_txqueue_affinity; #ifndef IGB_LEGACY_TX ifp->if_transmit = igb_mq_start; ifp->if_qflush = igb_qflush; @@ -6077,31 +6068,3 @@ igb_sysctl_eee(SYSCTL_HANDLER_ARGS) IGB_CORE_UNLOCK(adapter); return (0); } - -static int -igb_get_num_rxqueue(struct ifnet *ifp) -{ - struct adapter *adapter = ifp->if_softc; - return (adapter->num_queues); -} - -static int -igb_get_num_txqueue(struct ifnet *ifp) -{ - struct adapter *adapter = ifp->if_softc; - return (adapter->num_queues); -} - -static int -igb_get_rxqueue_affinity(struct ifnet *ifp, int idx, cpuset_t *cpus) -{ - CPU_SETOF(idx, cpus); - return (0); -} - -static int -igb_get_txqueue_affinity(struct ifnet *ifp, int idx, cpuset_t *cpus) -{ - CPU_SETOF(idx, cpus); - return (0); -} Modified: user/syuu/mq_bpf/sys/dev/ixgbe/ixgbe.c ============================================================================== --- user/syuu/mq_bpf/sys/dev/ixgbe/ixgbe.c Tue Sep 3 17:33:29 2013 (r255185) +++ user/syuu/mq_bpf/sys/dev/ixgbe/ixgbe.c Tue Sep 3 18:14:30 2013 (r255186) @@ -207,12 +207,6 @@ static void ixgbe_reinit_fdir(void *, in /* Missing shared code prototype */ extern void ixgbe_stop_mac_link_on_d3_82599(struct ixgbe_hw *hw); -static int ixgbe_get_num_rxqueue(struct ifnet *); -static int ixgbe_get_num_txqueue(struct ifnet *); -static int ixgbe_get_rxqueue_affinity(struct ifnet *, int, cpuset_t *); -static int ixgbe_get_txqueue_affinity(struct ifnet *, int, cpuset_t *); - - /********************************************************************* * FreeBSD Device Interface Entry Points *********************************************************************/ @@ -2627,10 +2621,6 @@ ixgbe_setup_interface(device_t dev, stru ifp->if_softc = adapter; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = ixgbe_ioctl; - ifp->if_get_num_rxqueue = ixgbe_get_num_rxqueue; - ifp->if_get_num_txqueue = ixgbe_get_num_txqueue; - ifp->if_get_rxqueue_affinity = ixgbe_get_rxqueue_affinity; - ifp->if_get_txqueue_affinity = ixgbe_get_txqueue_affinity; #ifndef IXGBE_LEGACY_TX ifp->if_transmit = ixgbe_mq_start; ifp->if_qflush = ixgbe_qflush; @@ -5767,34 +5757,6 @@ ixgbe_set_advertise(SYSCTL_HANDLER_ARGS) return (error); } -static int -ixgbe_get_num_rxqueue(struct ifnet *ifp) -{ - struct adapter *adapter = ifp->if_softc; - return (adapter->num_queues); -} - -static int -ixgbe_get_num_txqueue(struct ifnet *ifp) -{ - struct adapter *adapter = ifp->if_softc; - return (adapter->num_queues); -} - -static int -ixgbe_get_rxqueue_affinity(struct ifnet *ifp, int idx, cpuset_t *cpus) -{ - CPU_SETOF(idx, cpus); - return (0); -} - -static int -ixgbe_get_txqueue_affinity(struct ifnet *ifp, int idx, cpuset_t *cpus) -{ - CPU_SETOF(idx, cpus); - return (0); -} - /* ** Thermal Shutdown Trigger ** - cause a Thermal Overtemp IRQ Modified: user/syuu/mq_bpf/sys/dev/mxge/if_mxge.c ============================================================================== --- user/syuu/mq_bpf/sys/dev/mxge/if_mxge.c Tue Sep 3 17:33:29 2013 (r255185) +++ user/syuu/mq_bpf/sys/dev/mxge/if_mxge.c Tue Sep 3 18:14:30 2013 (r255186) @@ -120,11 +120,6 @@ static int mxge_detach(device_t dev); static int mxge_shutdown(device_t dev); static void mxge_intr(void *arg); -static int mxge_get_num_rxqueue(struct ifnet *); -static int mxge_get_num_txqueue(struct ifnet *); -static int mxge_get_rxqueue_affinity(struct ifnet *, int, cpuset_t *); -static int mxge_get_txqueue_affinity(struct ifnet *, int, cpuset_t *); - static device_method_t mxge_methods[] = { /* Device interface */ @@ -4942,11 +4937,6 @@ mxge_attach(device_t dev) ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = mxge_ioctl; ifp->if_start = mxge_start; - ifp->if_get_num_rxqueue = mxge_get_num_rxqueue; - ifp->if_get_num_txqueue = mxge_get_num_txqueue; - ifp->if_get_rxqueue_affinity = mxge_get_rxqueue_affinity; - ifp->if_get_txqueue_affinity = mxge_get_txqueue_affinity; - /* Initialise the ifmedia structure */ ifmedia_init(&sc->media, 0, mxge_media_change, mxge_media_status); @@ -5043,31 +5033,11 @@ mxge_shutdown(device_t dev) return 0; } +/* + This file uses Myri10GE driver indentation. -static int -mxge_get_num_rxqueue(struct ifnet *ifp) -{ - mxge_softc_t *sc = ifp->if_softc; - return (sc->num_slices); -} - -static int -mxge_get_num_txqueue(struct ifnet *ifp) -{ - mxge_softc_t *sc = ifp->if_softc; - return (sc->num_slices); -} - -static int -mxge_get_rxqueue_affinity(struct ifnet *ifp, int idx, cpuset_t *cpus) -{ - CPU_SETOF(idx, cpus); - return (0); -} - -static int -mxge_get_txqueue_affinity(struct ifnet *ifp, int idx, cpuset_t *cpus) -{ - CPU_SETOF(idx, cpus); - return (0); -} + Local Variables: + c-file-style:"linux" + tab-width:8 + End: +*/ Modified: user/syuu/mq_bpf/sys/net/bpf.c ============================================================================== --- user/syuu/mq_bpf/sys/net/bpf.c Tue Sep 3 17:33:29 2013 (r255185) +++ user/syuu/mq_bpf/sys/net/bpf.c Tue Sep 3 18:14:30 2013 (r255186) @@ -2707,7 +2707,6 @@ bpf_freed(struct bpf_d *d) } if (d->bd_wfilter != NULL) free((caddr_t)d->bd_wfilter, M_BPF); - mtx_destroy(&d->bd_lock); } Modified: user/syuu/mq_bpf/sys/net/if.c ============================================================================== --- user/syuu/mq_bpf/sys/net/if.c Tue Sep 3 17:33:29 2013 (r255185) +++ user/syuu/mq_bpf/sys/net/if.c Tue Sep 3 18:14:30 2013 (r255186) @@ -2431,31 +2431,6 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, break; } - case SIOCGIFQLEN: - if (!(ifp->if_capabilities & IFCAP_QUEUEID)) - return (EOPNOTSUPP); - KASSERT(ifp->if_get_num_rxqueue, ("if_get_num_rxqueue not set")); - KASSERT(ifp->if_get_num_txqueue, ("if_get_num_txqueue not set")); - ifr->ifr_num_rxqueue = ifp->if_get_num_rxqueue(ifp); - ifr->ifr_num_txqueue = ifp->if_get_num_txqueue(ifp); - break; - - case SIOCGIFRXQAFFINITY: - if (!(ifp->if_capabilities & IFCAP_QUEUEID)) - return (EOPNOTSUPP); - KASSERT(ifp->if_get_rxqueue_affinity, ("if_get_rxqueue_affinity not set")); - ifp->if_get_rxqueue_affinity(ifp, ifr->ifr_queue_affinity_idx, - &ifr->ifr_queue_affinity_cpus); - break; - - case SIOCGIFTXQAFFINITY: - if (!(ifp->if_capabilities & IFCAP_QUEUEID)) - return (EOPNOTSUPP); - KASSERT(ifp->if_get_rxqueue_affinity, ("if_get_rxqueue_affinity not set")); - ifp->if_get_txqueue_affinity(ifp, ifr->ifr_queue_affinity_idx, - &ifr->ifr_queue_affinity_cpus); - break; - default: error = ENOIOCTL; break; Modified: user/syuu/mq_bpf/sys/net/if.h ============================================================================== --- user/syuu/mq_bpf/sys/net/if.h Tue Sep 3 17:33:29 2013 (r255185) +++ user/syuu/mq_bpf/sys/net/if.h Tue Sep 3 18:14:30 2013 (r255186) @@ -49,8 +49,6 @@ #include <sys/time.h> #include <sys/socket.h> #endif -#include <sys/param.h> -#include <sys/cpuset.h> struct ifnet; #endif @@ -233,7 +231,7 @@ struct if_data { #define IFCAP_NETMAP 0x100000 /* netmap mode supported/enabled */ #define IFCAP_RXCSUM_IPV6 0x200000 /* can offload checksum on IPv6 RX */ #define IFCAP_TXCSUM_IPV6 0x400000 /* can offload checksum on IPv6 TX */ -#define IFCAP_QUEUEID 0x800000 /* can write queueid on mbuf */ +#define IFCAP_QUEUEID 0x800000 /* driver supports queueid notify */ #define IFCAP_HWCSUM_IPV6 (IFCAP_RXCSUM_IPV6 | IFCAP_TXCSUM_IPV6) @@ -388,11 +386,6 @@ struct ifreq { caddr_t ifru_data; int ifru_cap[2]; u_int ifru_fib; - int ifru_num_queue[2]; - struct { - int idx; - cpuset_t cpus; - } ifru_queue_affinity; } ifr_ifru; #define ifr_addr ifr_ifru.ifru_addr /* address */ #define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */ @@ -410,10 +403,6 @@ struct ifreq { #define ifr_curcap ifr_ifru.ifru_cap[1] /* current capabilities */ #define ifr_index ifr_ifru.ifru_index /* interface index */ #define ifr_fib ifr_ifru.ifru_fib /* interface fib */ -#define ifr_num_rxqueue ifr_ifru.ifru_num_queue[0] /* number of rxqueues */ -#define ifr_num_txqueue ifr_ifru.ifru_num_queue[1] /* number of txqueues */ -#define ifr_queue_affinity_idx ifr_ifru.ifru_queue_affinity.idx /* queue index */ -#define ifr_queue_affinity_cpus ifr_ifru.ifru_queue_affinity.cpus /* queue affinity mask */ }; #define _SIZEOF_ADDR_IFREQ(ifr) \ Modified: user/syuu/mq_bpf/sys/net/if_var.h ============================================================================== --- user/syuu/mq_bpf/sys/net/if_var.h Tue Sep 3 17:33:29 2013 (r255185) +++ user/syuu/mq_bpf/sys/net/if_var.h Tue Sep 3 18:14:30 2013 (r255186) @@ -176,15 +176,6 @@ struct ifnet { (struct ifnet *, struct mbuf *); void (*if_reassign) /* reassign to vnet routine */ (struct ifnet *, struct vnet *, char *); - int (*if_get_num_rxqueue) - (struct ifnet *); - int (*if_get_num_txqueue) - (struct ifnet *); - int (*if_get_rxqueue_affinity) - (struct ifnet *, int, cpuset_t *); - int (*if_get_txqueue_affinity) - (struct ifnet *, int, cpuset_t *); - struct vnet *if_home_vnet; /* where this ifnet originates from */ struct ifaddr *if_addr; /* pointer to link-level address */ void *if_llsoftc; /* link layer softc */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309031814.r83IEUq0016137>