From owner-freebsd-net@FreeBSD.ORG Mon Jul 30 04:51:46 2012 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8C901065670; Mon, 30 Jul 2012 04:51:46 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 9CB9B8FC12; Mon, 30 Jul 2012 04:51:46 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q6U4pkhQ035444; Mon, 30 Jul 2012 04:51:46 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q6U4pk4o035440; Mon, 30 Jul 2012 04:51:46 GMT (envelope-from linimon) Date: Mon, 30 Jul 2012 04:51:46 GMT Message-Id: <201207300451.q6U4pk4o035440@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-net@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: kern/170267: [ixgbe] IXGBE_LE32_TO_CPUS is probably an unintentional no-op X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2012 04:51:46 -0000 Old Synopsis: IXGBE_LE32_TO_CPUS is probably an unintentional no-op New Synopsis: [ixgbe] IXGBE_LE32_TO_CPUS is probably an unintentional no-op Responsible-Changed-From-To: freebsd-bugs->freebsd-net Responsible-Changed-By: linimon Responsible-Changed-When: Mon Jul 30 04:50:51 UTC 2012 Responsible-Changed-Why: http://www.freebsd.org/cgi/query-pr.cgi?pr=170267 From owner-freebsd-net@FreeBSD.ORG Mon Jul 30 11:07:21 2012 Return-Path: Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AD53106567B for ; Mon, 30 Jul 2012 11:07:21 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 730098FC08 for ; Mon, 30 Jul 2012 11:07:21 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q6UB7LnR001865 for ; Mon, 30 Jul 2012 11:07:21 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q6UB7Kvq001863 for freebsd-net@FreeBSD.org; Mon, 30 Jul 2012 11:07:20 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 30 Jul 2012 11:07:20 GMT Message-Id: <201207301107.q6UB7Kvq001863@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-net@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-net@FreeBSD.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2012 11:07:21 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/170267 net [ixgbe] IXGBE_LE32_TO_CPUS is probably an unintentiona o kern/170081 net [fxp] pf/nat/jails not working if checksum offloading o kern/169898 net ifconfig(8) fails to set MTU on multiple interfaces. o kern/169676 net [bge] [hang] system hangs, fully or partially after re o kern/169664 net [bgp] Wrongful replacement of interface connected net o kern/169634 net [bge] Network unavailable when booting directly to Fre o kern/169620 net [ng] [pf] ng_l2tp incoming packet bypass pf firewall o kern/169459 net [ppp] umodem/ppp/3g stopped working after update from o kern/169438 net [ipsec] ipv4-in-ipv6 tunnel mode IPsec does not work o kern/169399 net [re] RealTek RTL8168/8111/8111c network interface not p kern/168294 net [ixgbe] [patch] ixgbe driver compiled in kernel has no o kern/168246 net [em] Multiple em(4) not working with qemu o kern/168245 net [arp] [regression] Permanent ARP entry not deleted on o kern/168244 net [arp] [regression] Unable to manually remove permanent o kern/168183 net [bce] bce driver hang system o kern/168152 net [xl] Periodically, the network card xl0 stops working o kern/167947 net [setfib] [patch] arpresolve checks only the default FI o kern/167603 net [ip] IP fragment reassembly's broken: file transfer ov o kern/167500 net [em] [panic] Kernel panics in em driver o kern/167325 net [netinet] [patch] sosend sometimes return EINVAL with o kern/167202 net [igmp]: Sending multiple IGMP packets crashes kernel o kern/167059 net [tcp] [panic] System does panic in in_pcbbind() and ha o kern/166940 net [ipfilter] [panic] Double fault in kern 8.2 o kern/166462 net [gre] gre(4) when using a tunnel source address from c o kern/166372 net [patch] ipfilter drops UDP packets with zero checksum o kern/166285 net [arp] FreeBSD v8.1 REL p8 arp: unknown hardware addres o kern/166255 net [net] [patch] It should be possible to disable "promis o kern/165963 net [panic] [ipf] ipfilter/nat NULL pointer deference o kern/165903 net mbuf leak o kern/165863 net [panic] [netinet] [patch] in_lltable_prefix_free() rac o kern/165643 net [net] [patch] Missing vnet restores in net/if_ethersub o kern/165622 net [ndis][panic][patch] Unregistered use of FPU in kernel s kern/165562 net [request] add support for Intel i350 in FreeBSD 7.4 o kern/165526 net [bxe] UDP packets checksum calculation whithin if_bxe o kern/165488 net [ppp] [panic] Fatal trap 12 jails and ppp , kernel wit o kern/165305 net [ip6] [request] Feature parity between IP_TOS and IPV6 o kern/165296 net [vlan] [patch] Fix EVL_APPLY_VLID, update EVL_APPLY_PR o kern/165181 net [igb] igb freezes after about 2 weeks of uptime o kern/165174 net [patch] [tap] allow tap(4) to keep its address on clos o kern/165152 net [ip6] Does not work through the issue of ipv6 addresse o kern/164495 net [igb] connect double head igb to switch cause system t o kern/164490 net [pfil] Incorrect IP checksum on pfil pass from ip_outp o kern/164475 net [gre] gre misses RUNNING flag after a reboot o kern/164265 net [netinet] [patch] tcp_lro_rx computes wrong checksum i o kern/163903 net [igb] "igb0:tx(0)","bpf interface lock" v2.2.5 9-STABL o kern/163481 net freebsd do not add itself to ping route packet o kern/162927 net [tun] Modem-PPP error ppp[1538]: tun0: Phase: Clearing o kern/162926 net [ipfilter] Infinite loop in ipfilter with fragmented I o kern/162558 net [dummynet] [panic] seldom dummynet panics o kern/162153 net [em] intel em driver 7.2.4 don't compile o kern/162110 net [igb] [panic] RELENG_9 panics on boot in IGB driver - o kern/162028 net [ixgbe] [patch] misplaced #endif in ixgbe.c o kern/161381 net [re] RTL8169SC - re0: PHY write failed o kern/161277 net [em] [patch] BMC cannot receive IPMI traffic after loa o kern/160873 net [igb] igb(4) from HEAD fails to build on 7-STABLE o kern/160750 net Intel PRO/1000 connection breaks under load until rebo o kern/160693 net [gif] [em] Multicast packet are not passed from GIF0 t o kern/160293 net [ieee80211] ppanic] kernel panic during network setup o kern/160206 net [gif] gifX stops working after a while (IPv6 tunnel) o kern/159817 net [udp] write UDPv4: No buffer space available (code=55) o kern/159629 net [ipsec] [panic] kernel panic with IPsec in transport m o kern/159621 net [tcp] [panic] panic: soabort: so_count o kern/159603 net [netinet] [patch] in_ifscrubprefix() - network route c o kern/159601 net [netinet] [patch] in_scrubprefix() - loopback route re o kern/159294 net [em] em watchdog timeouts o kern/159203 net [wpi] Intel 3945ABG Wireless LAN not support IBSS o kern/158930 net [bpf] BPF element leak in ifp->bpf_if->bif_dlist o kern/158726 net [ip6] [patch] ICMPv6 Router Announcement flooding limi o kern/158694 net [ix] [lagg] ix0 is not working within lagg(4) o kern/158665 net [ip6] [panic] kernel pagefault in in6_setscope() o kern/158635 net [em] TSO breaks BPF packet captures with em driver f kern/157802 net [dummynet] [panic] kernel panic in dummynet o kern/157785 net amd64 + jail + ipfw + natd = very slow outbound traffi o kern/157418 net [em] em driver lockup during boot on Supermicro X9SCM- o kern/157410 net [ip6] IPv6 Router Advertisements Cause Excessive CPU U o kern/157287 net [re] [panic] INVARIANTS panic (Memory modified after f o kern/157209 net [ip6] [patch] locking error in rip6_input() (sys/netin o kern/157200 net [network.subr] [patch] stf(4) can not communicate betw o kern/157182 net [lagg] lagg interface not working together with epair o kern/156877 net [dummynet] [panic] dummynet move_pkt() null ptr derefe o kern/156667 net [em] em0 fails to init on CURRENT after March 17 o kern/156408 net [vlan] Routing failure when using VLANs vs. Physical e o kern/156328 net [icmp]: host can ping other subnet but no have IP from o kern/156317 net [ip6] Wrong order of IPv6 NS DAD/MLD Report o kern/156283 net [ip6] [patch] nd6_ns_input - rtalloc_mpath does not re o kern/156279 net [if_bridge][divert][ipfw] unable to correctly re-injec o kern/156226 net [lagg]: failover does not announce the failover to swi o kern/156030 net [ip6] [panic] Crash in nd6_dad_start() due to null ptr o kern/155772 net ifconfig(8): ioctl (SIOCAIFADDR): File exists on direc o kern/155680 net [multicast] problems with multicast s kern/155642 net [request] Add driver for Realtek RTL8191SE/RTL8192SE W o kern/155597 net [panic] Kernel panics with "sbdrop" message o kern/155420 net [vlan] adding vlan break existent vlan o kern/155177 net [route] [panic] Panic when inject routes in kernel o kern/155030 net [igb] igb(4) DEVICE_POLLING does not work with carp(4) o kern/155010 net [msk] ntfs-3g via iscsi using msk driver cause kernel o kern/154943 net [gif] ifconfig gifX create on existing gifX clears IP s kern/154851 net [request]: Port brcm80211 driver from Linux to FreeBSD o kern/154850 net [netgraph] [patch] ng_ether fails to name nodes when t o kern/154679 net [em] Fatal trap 12: "em1 taskq" only at startup (8.1-R o kern/154600 net [tcp] [panic] Random kernel panics on tcp_output o kern/154557 net [tcp] Freeze tcp-session of the clients, if in the gat o kern/154443 net [if_bridge] Kernel module bridgestp.ko missing after u o kern/154286 net [netgraph] [panic] 8.2-PRERELEASE panic in netgraph o kern/154255 net [nfs] NFS not responding o kern/154214 net [stf] [panic] Panic when creating stf interface o kern/154185 net race condition in mb_dupcl o kern/154169 net [multicast] [ip6] Node Information Query multicast add o kern/154134 net [ip6] stuck kernel state in LISTEN on ipv6 daemon whic o kern/154091 net [netgraph] [panic] netgraph, unaligned mbuf? o conf/154062 net [vlan] [patch] change to way of auto-generatation of v o kern/153937 net [ral] ralink panics the system (amd64 freeBSDD 8.X) wh o kern/153936 net [ixgbe] [patch] MPRC workaround incorrectly applied to o kern/153816 net [ixgbe] ixgbe doesn't work properly with the Intel 10g o kern/153772 net [ixgbe] [patch] sysctls reference wrong XON/XOFF varia o kern/153497 net [netgraph] netgraph panic due to race conditions o kern/153454 net [patch] [wlan] [urtw] Support ad-hoc and hostap modes o kern/153308 net [em] em interface use 100% cpu o kern/153244 net [em] em(4) fails to send UDP to port 0xffff o kern/152893 net [netgraph] [panic] 8.2-PRERELEASE panic in netgraph o kern/152853 net [em] tftpd (and likely other udp traffic) fails over e o kern/152828 net [em] poor performance on 8.1, 8.2-PRE o kern/152569 net [net]: Multiple ppp connections and routing table prob o kern/152235 net [arp] Permanent local ARP entries are not properly upd o kern/152141 net [vlan] [patch] encapsulate vlan in ng_ether before out o kern/152036 net [libc] getifaddrs(3) returns truncated sockaddrs for n o kern/151690 net [ep] network connectivity won't work until dhclient is o kern/151681 net [nfs] NFS mount via IPv6 leads to hang on client with o kern/151593 net [igb] [panic] Kernel panic when bringing up igb networ o kern/150920 net [ixgbe][igb] Panic when packets are dropped with heade o kern/150557 net [igb] igb0: Watchdog timeout -- resetting o kern/150251 net [patch] [ixgbe] Late cable insertion broken o kern/150249 net [ixgbe] Media type detection broken o bin/150224 net ppp(8) does not reassign static IP after kill -KILL co f kern/149969 net [wlan] [ral] ralink rt2661 fails to maintain connectio o kern/149937 net [ipfilter] [patch] kernel panic in ipfilter IP fragmen o kern/149643 net [rum] device not sending proper beacon frames in ap mo o kern/149609 net [panic] reboot after adding second default route o kern/149117 net [inet] [patch] in_pcbbind: redundant test o kern/149086 net [multicast] Generic multicast join failure in 8.1 o kern/148018 net [flowtable] flowtable crashes on ia64 o kern/147912 net [boot] FreeBSD 8 Beta won't boot on Thinkpad i1300 11 o kern/147894 net [ipsec] IPv6-in-IPv4 does not work inside an ESP-only o kern/147155 net [ip6] setfb not work with ipv6 o kern/146845 net [libc] close(2) returns error 54 (connection reset by f kern/146792 net [flowtable] flowcleaner 100% cpu's core load o kern/146719 net [pf] [panic] PF or dumynet kernel panic o kern/146534 net [icmp6] wrong source address in echo reply o kern/146427 net [mwl] Additional virtual access points don't work on m f kern/146394 net [vlan] IP source address for outgoing connections o bin/146377 net [ppp] [tun] Interface doesn't clear addresses when PPP o kern/146358 net [vlan] wrong destination MAC address o kern/146165 net [wlan] [panic] Setting bssid in adhoc mode causes pani o kern/146082 net [ng_l2tp] a false invaliant check was performed in ng_ o kern/146037 net [panic] mpd + CoA = kernel panic o kern/145825 net [panic] panic: soabort: so_count o kern/145728 net [lagg] Stops working lagg between two servers. p kern/145600 net TCP/ECN behaves different to CE/CWR than ns2 reference f kern/144917 net [flowtable] [panic] flowtable crashes system [regressi o kern/144882 net MacBookPro =>4.1 does not connect to BSD in hostap wit o kern/144874 net [if_bridge] [patch] if_bridge frees mbuf after pfil ho o conf/144700 net [rc.d] async dhclient breaks stuff for too many people o kern/144616 net [nat] [panic] ip_nat panic FreeBSD 7.2 f kern/144315 net [ipfw] [panic] freebsd 8-stable reboot after add ipfw o kern/144231 net bind/connect/sendto too strict about sockaddr length o kern/143846 net [gif] bringing gif3 tunnel down causes gif0 tunnel to s kern/143673 net [stf] [request] there should be a way to support multi s kern/143666 net [ip6] [request] PMTU black hole detection not implemen o kern/143622 net [pfil] [patch] unlock pfil lock while calling firewall o kern/143593 net [ipsec] When using IPSec, tcpdump doesn't show outgoin o kern/143591 net [ral] RT2561C-based DLink card (DWL-510) fails to work o kern/143208 net [ipsec] [gif] IPSec over gif interface not working o kern/143034 net [panic] system reboots itself in tcp code [regression] o kern/142877 net [hang] network-related repeatable 8.0-STABLE hard hang o kern/142774 net Problem with outgoing connections on interface with mu o kern/142772 net [libc] lla_lookup: new lle malloc failed f kern/142518 net [em] [lagg] Problem on 8.0-STABLE with em and lagg o kern/142018 net [iwi] [patch] Possibly wrong interpretation of beacon- o kern/141861 net [wi] data garbled with WEP and wi(4) with Prism 2.5 f kern/141741 net Etherlink III NIC won't work after upgrade to FBSD 8, o kern/140742 net rum(4) Two asus-WL167G adapters cannot talk to each ot o kern/140682 net [netgraph] [panic] random panic in netgraph o kern/140634 net [vlan] destroying if_lagg interface with if_vlan membe o kern/140619 net [ifnet] [patch] refine obsolete if_var.h comments desc o kern/140346 net [wlan] High bandwidth use causes loss of wlan connecti o kern/140142 net [ip6] [panic] FreeBSD 7.2-amd64 panic w/IPv6 o kern/140066 net [bwi] install report for 8.0 RC 2 (multiple problems) o kern/139565 net [ipfilter] ipfilter ioctl SIOCDELST broken o kern/139387 net [ipsec] Wrong lenth of PF_KEY messages in promiscuous o bin/139346 net [patch] arp(8) add option to remove static entries lis o kern/139268 net [if_bridge] [patch] allow if_bridge to forward just VL p kern/139204 net [arp] DHCP server replies rejected, ARP entry lost bef o kern/139117 net [lagg] + wlan boot timing (EBUSY) o kern/139058 net [ipfilter] mbuf cluster leak on FreeBSD 7.2 o kern/138850 net [dummynet] dummynet doesn't work correctly on a bridge o kern/138782 net [panic] sbflush_internal: cc 0 || mb 0xffffff004127b00 o kern/138688 net [rum] possibly broken on 8 Beta 4 amd64: able to wpa a o kern/138678 net [lo] FreeBSD does not assign linklocal address to loop o kern/138407 net [gre] gre(4) interface does not come up after reboot o kern/138332 net [tun] [lor] ifconfig tun0 destroy causes LOR if_adata/ o kern/138266 net [panic] kernel panic when udp benchmark test used as r o kern/138177 net [ipfilter] FreeBSD crashing repeatedly in ip_nat.c:257 f kern/138029 net [bpf] [panic] periodically kernel panic and reboot o kern/137881 net [netgraph] [panic] ng_pppoe fatal trap 12 p bin/137841 net [patch] wpa_supplicant(8) cannot verify SHA256 signed p kern/137776 net [rum] panic in rum(4) driver on 8.0-BETA2 o bin/137641 net ifconfig(8): various problems with "vlan_device.vlan_i o kern/137392 net [ip] [panic] crash in ip_nat.c line 2577 o kern/137372 net [ral] FreeBSD doesn't support wireless interface from o kern/137089 net [lagg] lagg falsely triggers IPv6 duplicate address de o bin/136994 net [patch] ifconfig(8) print carp mac address o kern/136911 net [netgraph] [panic] system panic on kldload ng_bpf.ko t o kern/136618 net [pf][stf] panic on cloning interface without unit numb o kern/135502 net [periodic] Warning message raised by rtfree function i o kern/134583 net [hang] Machine with jail freezes after random amount o o kern/134531 net [route] [panic] kernel crash related to routes/zebra o kern/134157 net [dummynet] dummynet loads cpu for 100% and make a syst o kern/133969 net [dummynet] [panic] Fatal trap 12: page fault while in o kern/133968 net [dummynet] [panic] dummynet kernel panic o kern/133736 net [udp] ip_id not protected ... o kern/133595 net [panic] Kernel Panic at pcpu.h:195 o kern/133572 net [ppp] [hang] incoming PPTP connection hangs the system o kern/133490 net [bpf] [panic] 'kmem_map too small' panic on Dell r900 o kern/133235 net [netinet] [patch] Process SIOCDLIFADDR command incorre f kern/133213 net arp and sshd errors on 7.1-PRERELEASE o kern/133060 net [ipsec] [pfsync] [panic] Kernel panic with ipsec + pfs o kern/132889 net [ndis] [panic] NDIS kernel crash on load BCM4321 AGN d o conf/132851 net [patch] rc.conf(5): allow to setfib(1) for service run o kern/132734 net [ifmib] [panic] panic in net/if_mib.c o kern/132705 net [libwrap] [patch] libwrap - infinite loop if hosts.all o kern/132672 net [ndis] [panic] ndis with rt2860.sys causes kernel pani o kern/132554 net [ipl] There is no ippool start script/ipfilter magic t o kern/132354 net [nat] Getting some packages to ipnat(8) causes crash o kern/132277 net [crypto] [ipsec] poor performance using cryptodevice f o kern/131781 net [ndis] ndis keeps dropping the link o kern/131776 net [wi] driver fails to init o kern/131753 net [altq] [panic] kernel panic in hfsc_dequeue o kern/131601 net [ipfilter] [panic] 7-STABLE panic in nat_finalise (tcp o bin/131567 net [socket] [patch] Update for regression/sockets/unix_cm o bin/131365 net route(8): route add changes interpretation of network f kern/130820 net [ndis] wpa_supplicant(8) returns 'no space on device' o kern/130628 net [nfs] NFS / rpc.lockd deadlock on 7.1-R o conf/130555 net [rc.d] [patch] No good way to set ipfilter variables a o kern/130525 net [ndis] [panic] 64 bit ar5008 ndisgen-erated driver cau o kern/130311 net [wlan_xauth] [panic] hostapd restart causing kernel pa o kern/130109 net [ipfw] Can not set fib for packets originated from loc f kern/130059 net [panic] Leaking 50k mbufs/hour f kern/129719 net [nfs] [panic] Panic during shutdown, tcp_ctloutput: in o kern/129517 net [ipsec] [panic] double fault / stack overflow f kern/129508 net [carp] [panic] Kernel panic with EtherIP (may be relat o kern/129219 net [ppp] Kernel panic when using kernel mode ppp o kern/129197 net [panic] 7.0 IP stack related panic o bin/128954 net ifconfig(8) deletes valid routes o bin/128602 net [an] wpa_supplicant(8) crashes with an(4) o kern/128448 net [nfs] 6.4-RC1 Boot Fails if NFS Hostname cannot be res o bin/128295 net [patch] ifconfig(8) does not print TOE4 or TOE6 capabi o bin/128001 net wpa_supplicant(8), wlan(4), and wi(4) issues o kern/127826 net [iwi] iwi0 driver has reduced performance and connecti o kern/127815 net [gif] [patch] if_gif does not set vlan attributes from o kern/127724 net [rtalloc] rtfree: 0xc5a8f870 has 1 refs f bin/127719 net [arp] arp: Segmentation fault (core dumped) f kern/127528 net [icmp]: icmp socket receives icmp replies not owned by p kern/127360 net [socket] TOE socket options missing from sosetopt() o bin/127192 net routed(8) removes the secondary alias IP of interface f kern/127145 net [wi]: prism (wi) driver crash at bigger traffic o kern/126895 net [patch] [ral] Add antenna selection (marked as TBD) o kern/126874 net [vlan]: Zebra problem if ifconfig vlanX destroy o kern/126695 net rtfree messages and network disruption upon use of if_ o kern/126339 net [ipw] ipw driver drops the connection o kern/126075 net [inet] [patch] internet control accesses beyond end of o bin/125922 net [patch] Deadlock in arp(8) o kern/125920 net [arp] Kernel Routing Table loses Ethernet Link status o kern/125845 net [netinet] [patch] tcp_lro_rx() should make use of hard o kern/125258 net [socket] socket's SO_REUSEADDR option does not work o kern/125239 net [gre] kernel crash when using gre o kern/124341 net [ral] promiscuous mode for wireless device ral0 looses o kern/124225 net [ndis] [patch] ndis network driver sometimes loses net o kern/124160 net [libc] connect(2) function loops indefinitely o kern/124021 net [ip6] [panic] page fault in nd6_output() o kern/123968 net [rum] [panic] rum driver causes kernel panic with WPA. o kern/123892 net [tap] [patch] No buffer space available o kern/123890 net [ppp] [panic] crash & reboot on work with PPP low-spee o kern/123858 net [stf] [patch] stf not usable behind a NAT o kern/123796 net [ipf] FreeBSD 6.1+VPN+ipnat+ipf: port mapping does not o kern/123758 net [panic] panic while restarting net/freenet6 o bin/123633 net ifconfig(8) doesn't set inet and ether address in one o kern/123559 net [iwi] iwi periodically disassociates/associates [regre o bin/123465 net [ip6] route(8): route add -inet6 -interfac o kern/123463 net [ipsec] [panic] repeatable crash related to ipsec-tool o conf/123330 net [nsswitch.conf] Enabling samba wins in nsswitch.conf c o kern/123160 net [ip] Panic and reboot at sysctl kern.polling.enable=0 o kern/122989 net [swi] [panic] 6.3 kernel panic in swi1: net o kern/122954 net [lagg] IPv6 EUI64 incorrectly chosen for lagg devices f kern/122780 net [lagg] tcpdump on lagg interface during high pps wedge o kern/122685 net It is not visible passing packets in tcpdump(1) o kern/122319 net [wi] imposible to enable ad-hoc demo mode with Orinoco o kern/122290 net [netgraph] [panic] Netgraph related "kmem_map too smal o kern/122033 net [ral] [lor] Lock order reversal in ral0 at bootup ieee o bin/121895 net [patch] rtsol(8)/rtsold(8) doesn't handle managed netw s kern/121774 net [swi] [panic] 6.3 kernel panic in swi1: net o kern/121555 net [panic] Fatal trap 12: current process = 12 (swi1: net o kern/121443 net [gif] [lor] icmp6_input/nd6_lookup o kern/121437 net [vlan] Routing to layer-2 address does not work on VLA o bin/121359 net [patch] [security] ppp(8): fix local stack overflow in o kern/121257 net [tcp] TSO + natd -> slow outgoing tcp traffic o kern/121181 net [panic] Fatal trap 3: breakpoint instruction fault whi o kern/120966 net [rum] kernel panic with if_rum and WPA encryption o kern/120566 net [request]: ifconfig(8) make order of arguments more fr o kern/120304 net [netgraph] [patch] netgraph source assumes 32-bit time o kern/120266 net [udp] [panic] gnugk causes kernel panic when closing U o bin/120060 net routed(8) deletes link-level routes in the presence of o kern/119945 net [rum] [panic] rum device in hostap mode, cause kernel o kern/119791 net [nfs] UDP NFS mount of aliased IP addresses from a Sol o kern/119617 net [nfs] nfs error on wpa network when reseting/shutdown f kern/119516 net [ip6] [panic] _mtx_lock_sleep: recursed on non-recursi o kern/119432 net [arp] route add -host -iface causes arp e o kern/119225 net [wi] 7.0-RC1 no carrier with Prism 2.5 wifi card [regr o kern/118727 net [netgraph] [patch] [request] add new ng_pf module o kern/117423 net [vlan] Duplicate IP on different interfaces o bin/117339 net [patch] route(8): loading routing management commands o kern/117271 net [tap] OpenVPN TAP uses 99% CPU on releng_6 when if_tap o bin/116643 net [patch] [request] fstat(1): add INET/INET6 socket deta o kern/116185 net [iwi] if_iwi driver leads system to reboot o kern/115239 net [ipnat] panic with 'kmem_map too small' using ipnat o kern/115019 net [netgraph] ng_ether upper hook packet flow stops on ad o kern/115002 net [wi] if_wi timeout. failed allocation (busy bit). ifco o kern/114915 net [patch] [pcn] pcn (sys/pci/if_pcn.c) ethernet driver f o kern/113432 net [ucom] WARNING: attempt to net_add_domain(netgraph) af o kern/112722 net [ipsec] [udp] IP v4 udp fragmented packet reject o kern/112686 net [patm] patm driver freezes System (FreeBSD 6.2-p4) i38 o bin/112557 net [patch] ppp(8) lock file should not use symlink name o kern/112528 net [nfs] NFS over TCP under load hangs with "impossible p o kern/111537 net [inet6] [patch] ip6_input() treats mbuf cluster wrong o kern/111457 net [ral] ral(4) freeze o kern/110284 net [if_ethersubr] Invalid Assumption in SIOCSIFADDR in et o kern/110249 net [kernel] [regression] [patch] setsockopt() error regre o kern/109470 net [wi] Orinoco Classic Gold PC Card Can't Channel Hop o bin/108895 net pppd(8): PPPoE dead connections on 6.2 [regression] o kern/107944 net [wi] [patch] Forget to unlock mutex-locks o conf/107035 net [patch] bridge(8): bridge interface given in rc.conf n o kern/106444 net [netgraph] [panic] Kernel Panic on Binding to an ip to o kern/106438 net [ipf] ipfilter: keep state does not seem to allow repl o kern/106316 net [dummynet] dummynet with multipass ipfw drops packets o kern/105945 net Address can disappear from network interface s kern/105943 net Network stack may modify read-only mbuf chain copies o bin/105925 net problems with ifconfig(8) and vlan(4) [regression] o kern/104851 net [inet6] [patch] On link routes not configured when usi o kern/104751 net [netgraph] kernel panic, when getting info about my tr o kern/103191 net Unpredictable reboot o kern/103135 net [ipsec] ipsec with ipfw divert (not NAT) encodes a pac o kern/102540 net [netgraph] [patch] supporting vlan(4) by ng_fec(4) o conf/102502 net [netgraph] [patch] ifconfig name does't rename netgrap o kern/102035 net [plip] plip networking disables parallel port printing o kern/101948 net [ipf] [panic] Kernel Panic Trap No 12 Page Fault - cau o kern/100709 net [libc] getaddrinfo(3) should return TTL info o kern/100519 net [netisr] suggestion to fix suboptimal network polling o kern/98978 net [ipf] [patch] ipfilter drops OOW packets under 6.1-Rel o kern/98597 net [inet6] Bug in FreeBSD 6.1 IPv6 link-local DAD procedu o bin/98218 net wpa_supplicant(8) blacklist not working o kern/97306 net [netgraph] NG_L2TP locks after connection with failed o conf/97014 net [gif] gifconfig_gif? in rc.conf does not recognize IPv f kern/96268 net [socket] TCP socket performance drops by 3000% if pack o kern/95519 net [ral] ral0 could not map mbuf o kern/95288 net [pppd] [tty] [panic] if_ppp panic in sys/kern/tty_subr o kern/95277 net [netinet] [patch] IP Encapsulation mask_match() return o kern/95267 net packet drops periodically appear f kern/93378 net [tcp] Slow data transfer in Postfix and Cyrus IMAP (wo o kern/93019 net [ppp] ppp and tunX problems: no traffic after restarti o kern/92880 net [libc] [patch] almost rewritten inet_network(3) functi s kern/92279 net [dc] Core faults everytime I reboot, possible NIC issu o kern/91859 net [ndis] if_ndis does not work with Asus WL-138 s kern/91777 net [ipf] [patch] wrong behaviour with skip rule inside an o kern/91364 net [ral] [wep] WF-511 RT2500 Card PCI and WEP o kern/91311 net [aue] aue interface hanging o kern/87521 net [ipf] [panic] using ipfilter "auth" keyword leads to k o kern/87421 net [netgraph] [panic]: ng_ether + ng_eiface + if_bridge o kern/86871 net [tcp] [patch] allocation logic for PCBs in TIME_WAIT s o kern/86427 net [lor] Deadlock with FASTIPSEC and nat o kern/86103 net [ipf] Illegal NAT Traversal in IPFilter o kern/85780 net 'panic: bogus refcnt 0' in routing/ipv6 o bin/85445 net ifconfig(8): deprecated keyword to ifconfig inoperativ p kern/85320 net [gre] [patch] possible depletion of kernel stack in ip o bin/82975 net route change does not parse classfull network as given o kern/82881 net [netgraph] [panic] ng_fec(4) causes kernel panic after o kern/82468 net Using 64MB tcp send/recv buffers, trafficflow stops, i o bin/82185 net [patch] ndp(8) can delete the incorrect entry o kern/81095 net IPsec connection stops working if associated network i o kern/78968 net FreeBSD freezes on mbufs exhaustion (network interface o kern/78090 net [ipf] ipf filtering on bridged packets doesn't work if o kern/77341 net [ip6] problems with IPV6 implementation s kern/77195 net [ipf] [patch] ipfilter ioctl SIOCGNATL does not match o kern/75873 net Usability problem with non-RFC-compliant IP spoof prot s kern/75407 net [an] an(4): no carrier after short time a kern/71474 net [route] route lookup does not skip interfaces marked d o kern/71469 net default route to internet magically disappears with mu o kern/70904 net [ipf] ipfilter ipnat problem with h323 proxy support o kern/68889 net [panic] m_copym, length > size of mbuf chain o kern/66225 net [netgraph] [patch] extend ng_eiface(4) control message o kern/65616 net IPSEC can't detunnel GRE packets after real ESP encryp s kern/60293 net [patch] FreeBSD arp poison patch a kern/56233 net IPsec tunnel (ESP) over IPv6: MTU computation is wrong s bin/41647 net ifconfig(8) doesn't accept lladdr along with inet addr o kern/39937 net ipstealth issue a kern/38554 net [patch] changing interface ipaddress doesn't seem to w o kern/34665 net [ipf] [hang] ipfilter rcmd proxy "hangs". o kern/31940 net ip queue length too short for >500kpps o kern/31647 net [libc] socket calls can return undocumented EINVAL o kern/30186 net [libc] getaddrinfo(3) does not handle incorrect servna o kern/27474 net [ipf] [ppp] Interactive use of user PPP and ipfilter c f kern/24959 net [patch] proper TCP_NOPUSH/TCP_CORK compatibility o conf/23063 net [arp] [patch] for static ARP tables in rc.network o kern/21998 net [socket] [patch] ident only for outgoing connections o kern/5877 net [socket] sb_cc counts control data as well as data dat 413 problems total. From owner-freebsd-net@FreeBSD.ORG Mon Jul 30 14:14:39 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D333F1065677 for ; Mon, 30 Jul 2012 14:14:39 +0000 (UTC) (envelope-from bthcom@higonnet.net) Received: from smtp2-g21.free.fr (smtp2-g21.free.fr [IPv6:2a01:e0c:1:1599::11]) by mx1.freebsd.org (Postfix) with ESMTP id C74CB8FC16 for ; Mon, 30 Jul 2012 14:14:36 +0000 (UTC) Received: from freebsd.higonnet.net (unknown [82.238.41.134]) by smtp2-g21.free.fr (Postfix) with ESMTP id BBD014B0093 for ; Mon, 30 Jul 2012 16:14:31 +0200 (CEST) Received: from [192.168.3.201] (higonnet [192.168.3.201]) by freebsd.higonnet.net (Postfix) with ESMTP id B33C72842B for ; Mon, 30 Jul 2012 16:15:04 +0200 (CEST) Message-ID: <501696C6.4040208@higonnet.net> Date: Mon, 30 Jul 2012 16:14:30 +0200 From: Bernard Higonnet User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Uanble to use mpd5 as a gateway VPN, FreeBSD X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2012 14:14:39 -0000 Hello, Hope this is the right place to mail... I have two networks A and B. One machine on A runs an MPD5 server. On network B I have machine X which has an MPD5 client used to establish a connection the VPN server on machine Z in network A. Seems to work fine (ping, ssh, etc.). This machine is also set up as a gateway. When I look at the routing table, it looks OK, all references to A being sent to Z. On network B I also have machine Y. On this machine I have added a route which specifies that network A is to accessed via machine X. It would appear (sic) that requests from Y to a machine on A are received by that machine. However, nothing ever comes back. All these machines are running FreeBSD, 8 on Z, and 9.0 on X and Y. I'm hoping I have forgotten some very obvious thing which a kind soul will point out to me so I don't have to tcpdump everything all over the place... TIA Bernard Higonnet From owner-freebsd-net@FreeBSD.ORG Mon Jul 30 15:37:07 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE5C5106566B for ; Mon, 30 Jul 2012 15:37:07 +0000 (UTC) (envelope-from cochard@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 606798FC14 for ; Mon, 30 Jul 2012 15:37:07 +0000 (UTC) Received: by weyx56 with SMTP id x56so4406781wey.13 for ; Mon, 30 Jul 2012 08:37:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=v1OWR3XFJXF4EVSyY7twrvuMunUR6+BFZ0K+1UG1Kac=; b=cIgGI2ztQ2Hybid+gstaNLr4M0QNGkt2twVsCK0rkSGxzNV7JD3CPllRSZheMwrH0X pFgdvbKDJ3TNgEIimiLYz4WbZ0s2Qlw/fX9JhNAy8J9HvivdhjwpGw+R74gdEIC8KGYp pqV+2tRid40/SgEZtGOGqlKU90TRy1zW0MoUmq5H0zmb1a84IvJ0GPXR8CQOfRPqdtoB Gmj7Q9rnKYMy0YeuXmOrukNrL2wTsUYxnptypavqvQVzk8ZpClbBNN8ZUzbJBJO3O34q fBjNdZEvTKHfVH/n6rI4GwhomN6m7bu5FwTYddsF+QJ/RjBTsdv0O4I4ysYbu7ANPJWX bzEQ== Received: by 10.180.81.38 with SMTP id w6mr27493071wix.10.1343662626196; Mon, 30 Jul 2012 08:37:06 -0700 (PDT) MIME-Version: 1.0 Sender: cochard@gmail.com Received: by 10.223.4.196 with HTTP; Mon, 30 Jul 2012 08:36:45 -0700 (PDT) In-Reply-To: <501696C6.4040208@higonnet.net> References: <501696C6.4040208@higonnet.net> From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= Date: Mon, 30 Jul 2012 17:36:45 +0200 X-Google-Sender-Auth: NXo4JYAQBIlRLuJSxhsLwIPAax8 Message-ID: To: Bernard Higonnet Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-net@freebsd.org Subject: Re: Uanble to use mpd5 as a gateway VPN, FreeBSD X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2012 15:37:07 -0000 On Mon, Jul 30, 2012 at 4:14 PM, Bernard Higonnet wrote: > > It would appear (sic) that requests from Y to a machine on A are received by > that machine. However, nothing ever comes back. > > All these machines are running FreeBSD, 8 on Z, and 9.0 on X and Y. > Hi, I've set-up a similar scenario for testing my product: 2 networks connected with FreeBSD as mpd5 gateway. You can found my scenario here (that include all configuration files): http://bsdrp.net/documentation/examples/maximum_bsdrp_features_lab => R2 is the mpd5 server, and R4 the mpd5 client You can check your configuration files with mine. Regards, Olivier From owner-freebsd-net@FreeBSD.ORG Tue Jul 31 03:42:05 2012 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D94381065672 for ; Tue, 31 Jul 2012 03:42:05 +0000 (UTC) (envelope-from jaqan@www420b.sakura.ne.jp) Received: from www420b.sakura.ne.jp (www420b.sakura.ne.jp [219.94.155.210]) by mx1.freebsd.org (Postfix) with ESMTP id 87CA08FC12 for ; Tue, 31 Jul 2012 03:42:05 +0000 (UTC) Received: from www420b.sakura.ne.jp (localhost [127.0.0.1]) by www420b.sakura.ne.jp (8.14.3/8.14.3) with ESMTP id q6V3fvuF006268 for ; Tue, 31 Jul 2012 12:41:57 +0900 (JST) (envelope-from jaqan@www420b.sakura.ne.jp) Received: (from jaqan@localhost) by www420b.sakura.ne.jp (8.14.3/8.14.3/Submit) id q6V3fvnR006266; Tue, 31 Jul 2012 12:41:57 +0900 (JST) (envelope-from jaqan) Date: Tue, 31 Jul 2012 12:41:57 +0900 (JST) Message-Id: <201207310341.q6V3fvnR006266@www420b.sakura.ne.jp> To: net@freebsd.org From: Western Canada Lottery/Email Draw MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit Cc: Subject: Your Email Has Won One Million Pounds Sterling X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: westerncanadaclaimsagent@aol.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2012 03:42:05 -0000 WESTERN CANADA LOTTERY/ EMAIL DRAW ONTARIO 49 Western Canada Lottery Corporation, Prize Payout 10th Floor, 125 Garry Street, Winnipeg, Manitoba, R3C 4J1,UK Office–3rd Floor, 2-4 King Street, London, SW1Y Wed, July 25th, 2012 - Ontario 49 WINNING NUMBERS 1 20 27 36 40 42 Bonus 14 Attn: Winner, We happily announce to you the draw of Canadian National Lottery the UK/CANADA online Sweepstakes International program held this year 2012. You have won GBP 1,000,000.00 (One Million British Pounds Sterling Only) from Canadian lottery draw 2012.Your Email ID was one of the selected email all over the world in the lottery draw and it comes out one of the lucky winning number. For us to process your winning for transfer you are advice to contact our prize claims agent with the details below in London for your payment. Name: Edmond De Corte Email: westerncanadaclaimsagent@aol.com 24 Hrs.Telephone: +44 704 574 6752 Please forward to him the following details below 1. Name (in Full): 2. Country: 3. Address: 4. Direct Telephone/Mobile No: 5. Age: 6. Occupation/position: Congratulations!! Once again. Yours in service, Mrs.Fritz Hamilton. [Publicity Secretary] WARNING! You must keep strict confidentiality of your Prize Award claims to yourself until your money is successfully handed over to you in other to avoid disqualification that may arise from double claims. Western Canada Lottery shall not be held liable for any loss of funds arising from the above mentioned. From owner-freebsd-net@FreeBSD.ORG Tue Jul 31 06:51:25 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 75BC8106566B for ; Tue, 31 Jul 2012 06:51:25 +0000 (UTC) (envelope-from emz@norma.perm.ru) Received: from elf.hq.norma.perm.ru (unknown [IPv6:2001:470:1f09:14c0::2]) by mx1.freebsd.org (Postfix) with ESMTP id 1DDA18FC0A for ; Tue, 31 Jul 2012 06:51:24 +0000 (UTC) Received: from bsdrookie.norma.com. ([IPv6:fd00::7fc]) by elf.hq.norma.perm.ru (8.14.5/8.14.5) with ESMTP id q6V6pMWK048642 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Tue, 31 Jul 2012 12:51:22 +0600 (YEKT) (envelope-from emz@norma.perm.ru) Message-ID: <5017806A.8050608@norma.perm.ru> Date: Tue, 31 Jul 2012 12:51:22 +0600 From: "Eugene M. Zheganin" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120727 Thunderbird/14.0 MIME-Version: 1.0 To: freebsd-net@freebsd.org References: <501696C6.4040208@higonnet.net> In-Reply-To: <501696C6.4040208@higonnet.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (elf.hq.norma.perm.ru [IPv6:fd00::30a]); Tue, 31 Jul 2012 12:51:22 +0600 (YEKT) X-Spam-Status: No hits=-97.8 bayes=0.5 testhits RDNS_NONE=1.274, SPF_SOFTFAIL=0.972,USER_IN_WHITELIST=-100 autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on elf.hq.norma.perm.ru Subject: Re: Uanble to use mpd5 as a gateway VPN, FreeBSD X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2012 06:51:25 -0000 Hi. On 30.07.2012 20:14, Bernard Higonnet wrote: > Hello, > > Hope this is the right place to mail... > > I have two networks A and B. > > One machine on A runs an MPD5 server. > > On network B I have machine X which has an MPD5 client used to > establish a connection the VPN server on machine Z in network A. Seems > to work fine (ping, ssh, etc.). This machine is also set up as a > gateway. When I look at the routing table, it looks OK, all references > to A being sent to Z. > > On network B I also have machine Y. On this machine I have added a > route which specifies that network A is to accessed via machine X. > > It would appear (sic) that requests from Y to a machine on A are > received by that machine. However, nothing ever comes back. > > All these machines are running FreeBSD, 8 on Z, and 9.0 on X and Y. > > I'm hoping I have forgotten some very obvious thing which a kind soul > will point out to me so I don't have to tcpdump everything all over > the place... > So.... Z is an mpd, X is a client, Y is a machine behind a client. X sees Z, Y doesn't see Z because Z isn't answering, however, Z sees incoming packets. My guess - Z doesn't know where is the B network, as when X is exchanging packets with Z, it does it by using it's p2p-address. Try to see the output of 'route -n get ' on Z. If I'm right - add a route, via bundle matching or via up-script, or manually, or use nat on X. Eugene. From owner-freebsd-net@FreeBSD.ORG Tue Jul 31 12:48:01 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BF0A11065670 for ; Tue, 31 Jul 2012 12:48:01 +0000 (UTC) (envelope-from venkatduvvuru.ml@gmail.com) Received: from mail-gg0-f182.google.com (mail-gg0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7A8CF8FC2D for ; Tue, 31 Jul 2012 12:48:01 +0000 (UTC) Received: by ggnm2 with SMTP id m2so6962241ggn.13 for ; Tue, 31 Jul 2012 05:48:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=yAh5QznxRujt9gFUl3l7+hkPd8Kc2dG3wkCv+LZ2mPE=; b=lYqbSJOYnVa597G3TefoASwzrXfHmpEn0lyIckcRIppplQHIMt5nM5JNpM1xKCEAlA SFq1TdcGU2kjS2GeUfD2hIgfVgPX1um9e1gkQqqujinYMvkRz9a5eFg8MaxquG3/ctlT eI07X/cnd/pLyL79U3iKGwTrKu/fvzS2r4b3YjPpbo6Vfxvy7J7lbI93ehUfyobst/jq YfqQfQG4uVgGIkAOW1LltUwBhdzBlK8FENEhf1PEQFyfzAyy5xrl6NrltHgkHc6uFZwa MHd9X/DNRCnQx2Ro13bGPiNRZbWAP37PTLm1pP1IG8D3hANuQPKA58a7PPHvBrL7Ko3a 6hLA== MIME-Version: 1.0 Received: by 10.60.2.105 with SMTP id 9mr22790998oet.65.1343738880628; Tue, 31 Jul 2012 05:48:00 -0700 (PDT) Received: by 10.76.8.99 with HTTP; Tue, 31 Jul 2012 05:48:00 -0700 (PDT) Date: Tue, 31 Jul 2012 18:18:00 +0530 Message-ID: From: Venkat Duvvuru To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: PCI BAR mmap X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2012 12:48:01 -0000 Hi, How to mmap PCI BARs from userland in freebsd? In Linux the PCI BAR appears as a file in the sysfs file system. How can I access PCI BAR as a file in freebsd to mmap it? /Venkat From owner-freebsd-net@FreeBSD.ORG Tue Jul 31 13:22:21 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 85872106566B for ; Tue, 31 Jul 2012 13:22:21 +0000 (UTC) (envelope-from venkatduvvuru.ml@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4CFB08FC08 for ; Tue, 31 Jul 2012 13:22:21 +0000 (UTC) Received: by obbun3 with SMTP id un3so13678311obb.13 for ; Tue, 31 Jul 2012 06:22:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=oWMVfjxRbyBAZ+s3E6HkZClj7hUeEbxO/Ahh483CvoQ=; b=t7GLQ/ChdtCoIOuQODdZ4x4+Di/HTomJLnNaaOla+VDPxmqizYpAtDRiu1avuglqIs P1VMOMmr0eptgSOo6PXqIoQBDxVmw7SCuNzPwkXyS+1yJoPMwR6cgc7othFEu+Rdl4Qs Znq4dtP6Z8b2CZVyoX7v/O9rgm7lqaB2rvVyhcyuiQ1c+eSq+GYJtw8l+Ff69eocUuEp 0lRFXgjyw9E9nGylZo/qVZbV0Y0rEpxpGH2H5pCZL3d6AxjkRNWzx/KoHHdv/WTWy/c/ eHFtnrMabqklAfePim5MPlqi3XY4GgGDcLQu/13+89FlaJSirbEvLsTipn2NK4E0YDZ4 Drgg== MIME-Version: 1.0 Received: by 10.182.17.99 with SMTP id n3mr23248276obd.8.1343740940472; Tue, 31 Jul 2012 06:22:20 -0700 (PDT) Received: by 10.76.8.99 with HTTP; Tue, 31 Jul 2012 06:22:20 -0700 (PDT) Date: Tue, 31 Jul 2012 18:52:20 +0530 Message-ID: From: Venkat Duvvuru To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: IPv6 multi queue transmit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2012 13:22:21 -0000 Hi, I have a couple of questions related to flowid for IPv6. Please clarify. 1. Why is the below code (ip_output) absent for ip6_output? This is causing the ipv6 traffic to always flow in just one queue. if (inp != NULL) { INP_LOCK_ASSERT(inp); M_SETFIB(m, inp->inp_inc.inc_fibnum); if (inp->inp_flags & (INP_HW_FLOWID|INP_SW_FLOWID)) { m->m_pkthdr.flowid = inp->inp_flowid; m->m_flags |= M_FLOWID; } } 2. Why "fle" is NULL after enabling FLOWTABLE for IPv6 net/flowtable.c if (af == AF_INET6) { fle = flowtable_lookup_mbuf6(ft, m); if (fle != NULL && m != NULL && (m->m_flags & M_FLOWID) == 0) { m->m_flags |= M_FLOWID; m->m_pkthdr.flowid = fle->f_fhash; } } /Venkat From owner-freebsd-net@FreeBSD.ORG Tue Jul 31 14:22:02 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5661106566C for ; Tue, 31 Jul 2012 14:22:02 +0000 (UTC) (envelope-from prvs=155931d7d5=dunng@uncw.edu) Received: from co1outboundpool.messaging.microsoft.com (co1ehsobe003.messaging.microsoft.com [216.32.180.186]) by mx1.freebsd.org (Postfix) with ESMTP id 764728FC0C for ; Tue, 31 Jul 2012 14:22:02 +0000 (UTC) Received: from mail174-co1-R.bigfish.com (10.243.78.247) by CO1EHSOBE004.bigfish.com (10.243.66.67) with Microsoft SMTP Server id 14.1.225.23; Tue, 31 Jul 2012 14:21:56 +0000 Received: from mail174-co1 (localhost [127.0.0.1]) by mail174-co1-R.bigfish.com (Postfix) with ESMTP id 3F8FBDC0300 for ; Tue, 31 Jul 2012 14:21:56 +0000 (UTC) X-Forefront-Antispam-Report: CIP:152.20.5.38; KIP:(null); UIP:(null); IPV:NLI; H:mx1.uncw.edu; RD:mx1.uncw.edu; EFVD:NLI X-SpamScore: -1 X-BigFish: VPS-1(zzc85fh1443Izz1202hzz8275bh8275dhz2fh668h839hd25hf0ah107ah) Received-SPF: pass (mail174-co1: domain of uncw.edu designates 152.20.5.38 as permitted sender) client-ip=152.20.5.38; envelope-from=prvs=155931d7d5=dunng@uncw.edu; helo=mx1.uncw.edu ; mx1.uncw.edu ; Received: from mail174-co1 (localhost.localdomain [127.0.0.1]) by mail174-co1 (MessageSwitch) id 1343744514109999_29608; Tue, 31 Jul 2012 14:21:54 +0000 (UTC) Received: from CO1EHSMHS006.bigfish.com (unknown [10.243.78.236]) by mail174-co1.bigfish.com (Postfix) with ESMTP id 0F06D8A003F for ; Tue, 31 Jul 2012 14:21:54 +0000 (UTC) Received: from mx1.uncw.edu (152.20.5.38) by CO1EHSMHS006.bigfish.com (10.243.66.16) with Microsoft SMTP Server id 14.1.225.23; Tue, 31 Jul 2012 14:21:51 +0000 Received: from pps.filterd (mx1 [127.0.0.1]) by mx1.uncw.edu (8.14.4/8.14.4) with SMTP id q6VEISYW005433 for ; Tue, 31 Jul 2012 10:21:50 -0400 Received: from uncwexht1.dcs.uncw.edu (exchsmtp.uncw.edu [152.20.9.164]) by mx1.uncw.edu with ESMTP id 16eg2kgj61-1 for ; Tue, 31 Jul 2012 10:21:50 -0400 Received: from uncwexmb1.dcs.uncw.edu ([152.20.9.166]) by UNCWEXHT1.dcs.uncw.edu ([152.20.9.164]) with mapi; Tue, 31 Jul 2012 10:21:50 -0400 From: "Dunn, George Jr" To: "freebsd-net@freebsd.org" Date: Tue, 31 Jul 2012 10:21:50 -0400 Thread-Topic: networking perplexity Thread-Index: Ac1pCkZHgm4tEXEeT4WVmj1uBcQR7A== Message-ID: <1BB45AE37908DF40B3C2FAB9665E09453D3A14E179@uncwexmb1.dcs.uncw.edu> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-OriginatorOrg: uncw.edu Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: networking perplexity X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2012 14:22:02 -0000 Hi, I am running Freebsd 9 with all current updates and am having some serious = issues with the networking/routing stack. I have a machine that has 2 - 10gb interfaces and 2 - 1gb interfaces that I= wish to configure. The desired effect is to have all interfaces except one of the 1Gb ports to= be broadcast only private address spaces for running nfs. I have one public fully routable address. Trying to configure the interfaces with rc.conf I am able to get the 10gb i= nterfaces and the public working. However when I add in the third private address on the other 1 gb interface= the whole stack seems to freak. It will completely hang the boot usually r= equiring a hard power off and single user mode to fsck to reboot. I tried to work around by placing a script in the new rc.local place to bri= ng up the last interface and fix the routing table. It will boot then but s= hortly after (15-45 mins) I lose all connectivity again. I have tried diffe= rent ports on the box as well as several different switches with the same r= esult so I don't think it's a hardware issue per se. I really just need some input! Any takers? Thanks in advance! Eddie From owner-freebsd-net@FreeBSD.ORG Tue Jul 31 14:56:52 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 553151065672 for ; Tue, 31 Jul 2012 14:56:52 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 28E158FC14 for ; Tue, 31 Jul 2012 14:56:52 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 82B35B964; Tue, 31 Jul 2012 10:56:51 -0400 (EDT) From: John Baldwin To: freebsd-net@freebsd.org Date: Tue, 31 Jul 2012 09:43:00 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <4FFF3683.7020107@rawbw.com> <500066F4.2030102@rawbw.com> <20120714075125.GA566@DataIX.net> In-Reply-To: <20120714075125.GA566@DataIX.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201207310943.00547.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 31 Jul 2012 10:56:51 -0400 (EDT) Cc: Peter Jeremy , Yuri Subject: Re: System doesn't detect unplugged network cable and doesn't set interface up properly with DHCP X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2012 14:56:52 -0000 On Saturday, July 14, 2012 3:51:25 am Jason Hellenthal wrote: > > On Fri, Jul 13, 2012 at 11:20:36AM -0700, Yuri wrote: > > On 07/13/2012 02:48, Peter Jeremy wrote: > > > This is a bug in dhclient - see PR bin/166656, which includes a fix. > > > > I think this PR addresses part of the problem: dhclient doesn't exit when the link goes down. > > To the best of my knowledge this is the correct way to handle this. Why > not reuse whats already been set if the link was to be brought back up > ? ofcourse it should obviously change to the correct IP if another was > negotiated but that is rarely the case. The new dhclient will try to use an existing lease when it negotiates, so I think that it should DTRT. > > But even if it exits, it leaves the IP address that it has set, which is wrong. This IP address survives through the next DHCP setup process and ends up being the second IP address. > > Should be very easy to on exit remove any IP address that was set during dhclient process lifetime. > > I couldnt agree more. Interface tear down is definately needed here. Hmmm, this does seem true. Do you either of you have any patches for this, or Peter, can you extend your patch to do this? -- John Baldwin From owner-freebsd-net@FreeBSD.ORG Tue Jul 31 14:56:53 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01545106566B for ; Tue, 31 Jul 2012 14:56:53 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id CC85C8FC17 for ; Tue, 31 Jul 2012 14:56:52 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 37909B968; Tue, 31 Jul 2012 10:56:52 -0400 (EDT) From: John Baldwin To: freebsd-net@freebsd.org Date: Tue, 31 Jul 2012 09:51:12 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201207310951.12251.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 31 Jul 2012 10:56:52 -0400 (EDT) Cc: Venkat Duvvuru Subject: Re: PCI BAR mmap X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2012 14:56:53 -0000 On Tuesday, July 31, 2012 8:48:00 am Venkat Duvvuru wrote: > Hi, > How to mmap PCI BARs from userland in freebsd? > In Linux the PCI BAR appears as a file in the sysfs file system. How can I > access PCI BAR as a file in freebsd to mmap it? You can export a BAR via a d_mmap() method from a cdevsw device you create in your driver. -- John Baldwin From owner-freebsd-net@FreeBSD.ORG Tue Jul 31 15:22:26 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0C6C6106566C; Tue, 31 Jul 2012 15:22:26 +0000 (UTC) (envelope-from venkatduvvuru.ml@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id B82488FC14; Tue, 31 Jul 2012 15:22:25 +0000 (UTC) Received: by obbun3 with SMTP id un3so13859390obb.13 for ; Tue, 31 Jul 2012 08:22:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=xJEgnStkKMJ4SxdKJJqvErXHUYrkqDaTagXUQjG+tPM=; b=yXuw2rkBB2ExIqQsa4qEyXfiV291BR7fSghAVb/EVmns7stOUApZigd1bp9TjAB8CB l7fe88K0YgRb87WoZEOoLUOq15hdi+ir+rLjCi/Hy9Ctf81CA54HtmhIf4bv7W6oMWDt MP3SzgMXhjDn3+Hy1AYdsaZokKpsKtH1dLd3YIXobYv3QQjTvg04zMKo8wdecl+mtliQ qrs22V2/p9FD2pAVnFjB4ATFRmMABRXZ8/YAN7Ji5YOn2dQxvPgGbbdCr8glXlHv4plr sadPpBy3wJM8r5lyfUtOsQDWORzgWz/DX7Y2lz+vn1yHeb9dwqHl7m26LQ93T2pFkLys ApgA== MIME-Version: 1.0 Received: by 10.182.111.39 with SMTP id if7mr24019292obb.56.1343748145317; Tue, 31 Jul 2012 08:22:25 -0700 (PDT) Received: by 10.76.8.99 with HTTP; Tue, 31 Jul 2012 08:22:25 -0700 (PDT) In-Reply-To: <201207310951.12251.jhb@freebsd.org> References: <201207310951.12251.jhb@freebsd.org> Date: Tue, 31 Jul 2012 20:52:25 +0530 Message-ID: From: Venkat Duvvuru To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net@freebsd.org Subject: Re: PCI BAR mmap X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2012 15:22:26 -0000 Hi John, Thanks for your response. Is there an alternative to mmap the PCI BARs, I mean without implementing an mmap method in the driver, something like a pci subsystem mmap in Linux. Linux allows to mmap PCI BARs without any change in the device driver. /Venkat On Tue, Jul 31, 2012 at 7:21 PM, John Baldwin wrote: > On Tuesday, July 31, 2012 8:48:00 am Venkat Duvvuru wrote: > > Hi, > > How to mmap PCI BARs from userland in freebsd? > > In Linux the PCI BAR appears as a file in the sysfs file system. How can > I > > access PCI BAR as a file in freebsd to mmap it? > > You can export a BAR via a d_mmap() method from a cdevsw device you create > in > your driver. > > -- > John Baldwin > From owner-freebsd-net@FreeBSD.ORG Tue Jul 31 16:13:57 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 94FAD1065677 for ; Tue, 31 Jul 2012 16:13:57 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 6AC3A8FC1B for ; Tue, 31 Jul 2012 16:13:57 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D31ABB984; Tue, 31 Jul 2012 12:13:56 -0400 (EDT) From: John Baldwin To: Venkat Duvvuru Date: Tue, 31 Jul 2012 12:08:21 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201207310951.12251.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201207311208.21178.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 31 Jul 2012 12:13:56 -0400 (EDT) Cc: freebsd-net@freebsd.org Subject: Re: PCI BAR mmap X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2012 16:13:57 -0000 On Tuesday, July 31, 2012 11:22:25 am Venkat Duvvuru wrote: > Hi John, > Thanks for your response. > Is there an alternative to mmap the PCI BARs, I mean without implementing > an mmap method in the driver, something like a pci subsystem mmap in Linux. > Linux allows to mmap PCI BARs without any change in the device driver. No, we do not currently have a generic way to mmap PCI BARs. > /Venkat > > On Tue, Jul 31, 2012 at 7:21 PM, John Baldwin wrote: > > > On Tuesday, July 31, 2012 8:48:00 am Venkat Duvvuru wrote: > > > Hi, > > > How to mmap PCI BARs from userland in freebsd? > > > In Linux the PCI BAR appears as a file in the sysfs file system. How can > > I > > > access PCI BAR as a file in freebsd to mmap it? > > > > You can export a BAR via a d_mmap() method from a cdevsw device you create > > in > > your driver. > > > > -- > > John Baldwin > > > -- John Baldwin From owner-freebsd-net@FreeBSD.ORG Tue Jul 31 16:14:42 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A1BBA106564A; Tue, 31 Jul 2012 16:14:42 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6DA368FC17; Tue, 31 Jul 2012 16:14:42 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so12480413pbb.13 for ; Tue, 31 Jul 2012 09:14:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=/5pw8Lr2QvImm+MVNJiYem03xv0j1pn81piwialknNk=; b=w6cRJ3/r4VJ2spDukaTZhgQx9X3y9kosDHpSgl8qGyu8fyTBw9lMrgWg5awAehKwKW r5LvmLpcw4JWKxyvUwVDM/6vg5wE+fwWoq588Jgwq+LT/15Sp7EP7gd6yORzhS8iYmfN 7hknFfV/hzoOHzwBZVxnQN+YQB75eMQ+/G6ldalup8TJIAJaj0TUjxO/Rg0lxgYWc6Mi LiPcM+mGdchwdLcgT9GDebil2hQyEeY9LIFagDcp38h2q+nMXEdPltUFq2M/stBKOd0u nDQ99jpavCQzzkPCqS8l2bvnp33bVSW0BVZAoRHHRXMzGbn0TSjkdp87CgUc4k09R8E9 78Zg== MIME-Version: 1.0 Received: by 10.68.218.7 with SMTP id pc7mr44386356pbc.88.1343751281911; Tue, 31 Jul 2012 09:14:41 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.68.66.136 with HTTP; Tue, 31 Jul 2012 09:14:41 -0700 (PDT) In-Reply-To: References: <201207310951.12251.jhb@freebsd.org> Date: Tue, 31 Jul 2012 09:14:41 -0700 X-Google-Sender-Auth: vwOogdFsc8ljoNR-D26b6WWtRjI Message-ID: From: Adrian Chadd To: Venkat Duvvuru Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-net@freebsd.org, John Baldwin Subject: Re: PCI BAR mmap X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2012 16:14:42 -0000 On 31 July 2012 08:22, Venkat Duvvuru wrote: > Hi John, > Thanks for your response. > Is there an alternative to mmap the PCI BARs, I mean without implementing > an mmap method in the driver, something like a pci subsystem mmap in Linux. > Linux allows to mmap PCI BARs without any change in the device driver. I guess someone could implement a sysctl API to access PCI BAR registers, rather than mapping /dev/pci or however pciconf -r works. That way you'd implement it once and all devices would have their BAR registers show up in a userland-friendly way. 2c, Adrian From owner-freebsd-net@FreeBSD.ORG Tue Jul 31 16:22:01 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01F6F106566C for ; Tue, 31 Jul 2012 16:22:00 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id C17938FC1D for ; Tue, 31 Jul 2012 16:22:00 +0000 (UTC) Received: from JRE-MBP-2.local (c-67-180-24-15.hsd1.ca.comcast.net [67.180.24.15]) (authenticated bits=0) by vps1.elischer.org (8.14.5/8.14.5) with ESMTP id q6VGLwMc079354 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 31 Jul 2012 09:22:00 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <50180621.8040501@freebsd.org> Date: Tue, 31 Jul 2012 09:21:53 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: "Dunn, George Jr" References: <1BB45AE37908DF40B3C2FAB9665E09453D3A14E179@uncwexmb1.dcs.uncw.edu> In-Reply-To: <1BB45AE37908DF40B3C2FAB9665E09453D3A14E179@uncwexmb1.dcs.uncw.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "freebsd-net@freebsd.org" Subject: Re: networking perplexity X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2012 16:22:01 -0000 On 7/31/12 7:21 AM, Dunn, George Jr wrote: > Hi, > > I am running Freebsd 9 with all current updates and am having some serious issues with the networking/routing stack. > > I have a machine that has 2 - 10gb interfaces and 2 - 1gb interfaces that I wish to configure. > The desired effect is to have all interfaces except one of the 1Gb ports to be broadcast only private address spaces for running nfs. > I have one public fully routable address. > Trying to configure the interfaces with rc.conf I am able to get the 10gb interfaces and the public working. > However when I add in the third private address on the other 1 gb interface the whole stack seems to freak. It will completely hang the boot usually requiring a hard power off and single user mode to fsck to reboot. > > I tried to work around by placing a script in the new rc.local place to bring up the last interface and fix the routing table. It will boot then but shortly after (15-45 mins) I lose all connectivity again. I have tried different ports on the box as well as several different switches with the same result so I don't think it's a hardware issue per se. doesn't sound particularly hairy.. can you draw a quick diag,with numbers and then show your config files? > > I really just need some input! Any takers? > > Thanks in advance! > > Eddie > > > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > > From owner-freebsd-net@FreeBSD.ORG Tue Jul 31 16:23:25 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EDB41106566B; Tue, 31 Jul 2012 16:23:25 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id C0E788FC17; Tue, 31 Jul 2012 16:23:25 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 34FE8B918; Tue, 31 Jul 2012 12:23:25 -0400 (EDT) From: John Baldwin To: Adrian Chadd Date: Tue, 31 Jul 2012 12:22:55 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201207311222.55618.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 31 Jul 2012 12:23:25 -0400 (EDT) Cc: freebsd-net@freebsd.org, Venkat Duvvuru Subject: Re: PCI BAR mmap X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2012 16:23:26 -0000 On Tuesday, July 31, 2012 12:14:41 pm Adrian Chadd wrote: > On 31 July 2012 08:22, Venkat Duvvuru wrote: > > Hi John, > > Thanks for your response. > > Is there an alternative to mmap the PCI BARs, I mean without implementing > > an mmap method in the driver, something like a pci subsystem mmap in Linux. > > Linux allows to mmap PCI BARs without any change in the device driver. > > I guess someone could implement a sysctl API to access PCI BAR > registers, rather than mapping /dev/pci or however pciconf -r works. > > That way you'd implement it once and all devices would have their BAR > registers show up in a userland-friendly way. Eh, no sysctl. /dev/pci uses ioctls. However, having a generic way to mmap BARs may be useful. -- John Baldwin From owner-freebsd-net@FreeBSD.ORG Tue Jul 31 17:15:29 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 460A9106564A for ; Tue, 31 Jul 2012 17:15:29 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id BDF488FC12 for ; Tue, 31 Jul 2012 17:15:28 +0000 (UTC) Received: by lbon10 with SMTP id n10so5153297lbo.13 for ; Tue, 31 Jul 2012 10:15:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=opYefcyrFF6FS5RH81iUelx7ZQgOBvGzjWee7Ny+vs4=; b=sv9OZ2z0XFcUoUygYhOgHooCYD1UJSgInCw8zBMy/QubG3DBX00YUHbuE37UlpmG38 JprYZ8tn4lOB++cmxCcSguonPZDYdzSTNTna1dxhuOnlEKaHBNQ+s2HB3MQYi045UzKG jHk9dtiC0wa8UvNFrDgaDFbMjfFy9SIQeY6tmwjGHn2z5RSbRto710V29mlmO71+NhPu jTld7uLVd5YgotUW7Wl3T1+nEHnPcM08s3iHBv0mAxWslUlMVtULKL5mEqm3T49mc/TH xFpD9OEmAVBIdHdrEtPNsHKrBRVl20Ujb1nbQ3ebfrfJ+yo3oP/8Sk9JVpzGxO4JNR8q nEwg== MIME-Version: 1.0 Received: by 10.112.30.226 with SMTP id v2mr6945257lbh.103.1343754922463; Tue, 31 Jul 2012 10:15:22 -0700 (PDT) Received: by 10.112.132.99 with HTTP; Tue, 31 Jul 2012 10:15:22 -0700 (PDT) In-Reply-To: References: Date: Tue, 31 Jul 2012 10:15:22 -0700 Message-ID: From: Artem Belevich To: Venkat Duvvuru Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-net@freebsd.org Subject: Re: PCI BAR mmap X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2012 17:15:29 -0000 On Tue, Jul 31, 2012 at 5:48 AM, Venkat Duvvuru wrote: > Hi, > How to mmap PCI BARs from userland in freebsd? > In Linux the PCI BAR appears as a file in the sysfs file system. How can I > access PCI BAR as a file in freebsd to mmap it? It's a bit of a hack, but if you are root, you can access physical memory via /dev/mem. memfd = open(/dev/mem) ptr = mmap(NULL, bar_size, PROT_READ, 0, memfd, bar_address); You can even use dd: dd if=/dev/mem bs=4k skip= count= of=bar.dump --Artem From owner-freebsd-net@FreeBSD.ORG Tue Jul 31 17:41:05 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DFED106566C for ; Tue, 31 Jul 2012 17:41:05 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id D2E5A8FC08 for ; Tue, 31 Jul 2012 17:41:04 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q6VHfDZx074629; Tue, 31 Jul 2012 20:41:13 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q6VHf1Zd056624; Tue, 31 Jul 2012 20:41:01 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q6VHf1dj056623; Tue, 31 Jul 2012 20:41:01 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 31 Jul 2012 20:41:01 +0300 From: Konstantin Belousov To: Artem Belevich Message-ID: <20120731174101.GE2676@deviant.kiev.zoral.com.ua> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Lf5N93S3uGY/b6lN" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-net@freebsd.org, Venkat Duvvuru Subject: Re: PCI BAR mmap X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2012 17:41:05 -0000 --Lf5N93S3uGY/b6lN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 31, 2012 at 10:15:22AM -0700, Artem Belevich wrote: > On Tue, Jul 31, 2012 at 5:48 AM, Venkat Duvvuru > wrote: > > Hi, > > How to mmap PCI BARs from userland in freebsd? > > In Linux the PCI BAR appears as a file in the sysfs file system. How ca= n I > > access PCI BAR as a file in freebsd to mmap it? >=20 > It's a bit of a hack, but if you are root, you can access physical > memory via /dev/mem. >=20 > memfd =3D open(/dev/mem) > ptr =3D mmap(NULL, bar_size, PROT_READ, 0, memfd, bar_address); >=20 > You can even use dd: >=20 > dd if=3D/dev/mem bs=3D4k skip=3D count=3D of= =3Dbar.dump This probably only works on x86, only for memory BARs, and only if BAR is already activated. But yes, I did grabbed scanouts (i.e. screen) on Intel GPUs this way. --Lf5N93S3uGY/b6lN Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlAYGK0ACgkQC3+MBN1Mb4iH9ACgoTJJhSV/GWg6sFqtIoSNlWU8 7MYAoJ0M0yK2K2how1jdmkO8O16lqfbH =LpXT -----END PGP SIGNATURE----- --Lf5N93S3uGY/b6lN-- From owner-freebsd-net@FreeBSD.ORG Tue Jul 31 18:43:46 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 791971065673 for ; Tue, 31 Jul 2012 18:43:46 +0000 (UTC) (envelope-from andrey@zonov.org) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id D6A658FC17 for ; Tue, 31 Jul 2012 18:43:45 +0000 (UTC) Received: by lbon10 with SMTP id n10so5212785lbo.13 for ; Tue, 31 Jul 2012 11:43:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:x-gm-message-state; bh=v214ZvOmlJhXkugNl1vJqv25uH2lc53flB+BdC4pr/8=; b=gm53CSwwmhpQBkzYVgGV79+3xSDHAX8SZnWUgR6swPvZA39HzmQOe0WFFLxwsF23qt E0ZtCfh9GQ0ruKBFuGL6sWkN/NXZnzrt+w80NK///wX192WZtK0XYhZdgWRoPgbc24NT v7BoRX+XL/nt+tRFLA/Sly0FM9LRFLQWcIEa99SS0a451wrLC5QKYZYdDl1mH0zj8GDc HG1nY0p7KwMURAh9eFvPGE8HhTbx8JKvGkuSiGvt58h2cMPtetsJDdJLLFkBSmN/Yorg Ztmw8o6btsfXdjMCYCvQd9XEfxMTjrHrLyHvtfJWWoDpz8eTMiMGpfweER6JLpIFN9iW RUaw== Received: by 10.112.85.72 with SMTP id f8mr7054001lbz.65.1343760224500; Tue, 31 Jul 2012 11:43:44 -0700 (PDT) Received: from zont-osx.local (ppp95-165-158-194.pppoe.spdop.ru. [95.165.158.194]) by mx.google.com with ESMTPS id hm7sm720028lab.12.2012.07.31.11.43.43 (version=SSLv3 cipher=OTHER); Tue, 31 Jul 2012 11:43:44 -0700 (PDT) Message-ID: <5018275E.6090901@zonov.org> Date: Tue, 31 Jul 2012 22:43:42 +0400 From: Andrey Zonov User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Ryan Stone References: <201203090930.q299UCPX057950@freefall.freebsd.org> <20120410065432.GJ9391@glebius.int.ru> In-Reply-To: Content-Type: multipart/mixed; boundary="------------080100000002080300020404" X-Gm-Message-State: ALoCoQlBcEkngMXvEDosR0H/2O9EwIKfANoCNt+vCJHta2xcFwCIY7lKNImuE7L5tdDmvs9YOIsF Cc: freebsd-net@freebsd.org Subject: Re: kern/165863 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2012 18:43:46 -0000 This is a multi-part message in MIME format. --------------080100000002080300020404 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 4/11/12 12:26 AM, Ryan Stone wrote: > 2012/4/10 Gleb Smirnoff : >> Thanks, Ryan! > (snip) >> Looks okay from my viewpoint. Have you stress tested it? My snap patch >> definitely had problems, AFAIR. >> >> If this patch fixes panics observed by kern/165863 and passes stress >> testing, then it should be committed ASAP, and shouldn't depend on >> IPv6 part. >> >> -- >> Totus tuus, Glebius. > > Hm, I was all ready to commit this, but I've realized that there is a > problem. According to callout_reset(9), any caller to callout_reset > must hold any mutex associated with the callout, but the two places > that call callout_reset on the la_timer are not done with the > if_afdata_lock held, and changing that looks to be non-trivial without > making the if_afdata_lock a huge contention point. > > At this point I'm not sure what the best way to proceed is. > Hi, Please review attached patch. I used Gleb's ideas. He almost fixed the issue, but he didn't observe that entry can be safely unlocked in arptimer() because it has refcnt incremented and cannot be removed. I also fixed entry removing based on refcnt that was totally broken. With my patch system doesn't panic in arp code anymore. Stress-test as follows: for h in $hosts; do ssh $h sysctl net.inet.icmp.icmplim=100000 ping -f $h > /dev/null 2>&1 & done sysctl net.link.ether.inet.max_age=1 while :; do ifconfig $if $ip/$mask done & IPv6 was not fix so far. It still didn't free lltable on IP deletion, but I will look at this sometime later. # vmstat -m | grep llt lltable 117 31K - 117 256,512 # for i in `jot 1000`; do ifconfig lo0 inet6 fe80::2/128; done # vmstat -m | grep llt lltable 1117 281K - 1117 256,512 -- Andrey Zonov --------------080100000002080300020404 Content-Type: text/plain; charset=UTF-8; name="lla.patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="lla.patch.txt" Index: sys/net/if_var.h =================================================================== --- sys/net/if_var.h (revision 238945) +++ sys/net/if_var.h (working copy) @@ -415,6 +415,8 @@ EVENTHANDLER_DECLARE(group_change_event, group_cha #define IF_AFDATA_DESTROY(ifp) rw_destroy(&(ifp)->if_afdata_lock) #define IF_AFDATA_LOCK_ASSERT(ifp) rw_assert(&(ifp)->if_afdata_lock, RA_LOCKED) +#define IF_AFDATA_RLOCK_ASSERT(ifp) rw_assert(&(ifp)->if_afdata_lock, RA_RLOCKED) +#define IF_AFDATA_WLOCK_ASSERT(ifp) rw_assert(&(ifp)->if_afdata_lock, RA_WLOCKED) #define IF_AFDATA_UNLOCK_ASSERT(ifp) rw_assert(&(ifp)->if_afdata_lock, RA_UNLOCKED) int if_handoff(struct ifqueue *ifq, struct mbuf *m, struct ifnet *ifp, Index: sys/net/if_llatbl.c =================================================================== --- sys/net/if_llatbl.c (revision 238945) +++ sys/net/if_llatbl.c (working copy) @@ -106,10 +106,10 @@ llentry_free(struct llentry *lle) size_t pkts_dropped; struct mbuf *next; - pkts_dropped = 0; LLE_WLOCK_ASSERT(lle); - LIST_REMOVE(lle, lle_next); + IF_AFDATA_WLOCK_ASSERT(lle->lle_tbl->llt_ifp); + pkts_dropped = 0; while ((lle->la_numheld > 0) && (lle->la_hold != NULL)) { next = lle->la_hold->m_nextpkt; m_freem(lle->la_hold); @@ -182,17 +182,16 @@ lltable_free(struct lltable *llt) SLIST_REMOVE(&V_lltables, llt, lltable, llt_link); LLTABLE_WUNLOCK(); + IF_AFDATA_WLOCK(llt->llt_ifp); for (i = 0; i < LLTBL_HASHTBL_SIZE; i++) { LIST_FOREACH_SAFE(lle, &llt->lle_head[i], lle_next, next) { - int canceled; - - canceled = callout_drain(&lle->la_timer); LLE_WLOCK(lle); - if (canceled) + if (callout_stop(&lle->la_timer)) LLE_REMREF(lle); llentry_free(lle); } } + IF_AFDATA_WUNLOCK(llt->llt_ifp); free(llt, M_LLTABLE); } Index: sys/net/if_llatbl.h =================================================================== --- sys/net/if_llatbl.h (revision 238945) +++ sys/net/if_llatbl.h (working copy) @@ -102,7 +102,7 @@ struct llentry { #define LLE_ADDREF(lle) do { \ LLE_WLOCK_ASSERT(lle); \ - KASSERT((lle)->lle_refcnt >= 0, \ + KASSERT((lle)->lle_refcnt > 0, \ ("negative refcnt %d", (lle)->lle_refcnt)); \ (lle)->lle_refcnt++; \ } while (0) @@ -115,12 +115,14 @@ struct llentry { } while (0) #define LLE_FREE_LOCKED(lle) do { \ - if ((lle)->lle_refcnt <= 1) \ - (lle)->lle_free((lle)->lle_tbl, (lle));\ - else { \ - (lle)->lle_refcnt--; \ + KASSERT((lle)->lle_refcnt > 0, \ + ("negative refcnt %d", (lle)->lle_refcnt)); \ + (lle)->lle_refcnt--; \ + if ((lle)->lle_refcnt == 0) { \ + LIST_REMOVE((lle), lle_next); \ + (lle)->lle_free((lle)->lle_tbl, (lle)); \ + } else \ LLE_WUNLOCK(lle); \ - } \ /* guard against invalid refs */ \ lle = NULL; \ } while (0) @@ -172,7 +174,7 @@ MALLOC_DECLARE(M_LLTABLE); #define LLE_VALID 0x0008 /* ll_addr is valid */ #define LLE_PROXY 0x0010 /* proxy entry ??? */ #define LLE_PUB 0x0020 /* publish entry ??? */ -#define LLE_EXCLUSIVE 0x2000 /* return lle xlocked */ +#define LLE_EXCLUSIVE 0x2000 /* return lle xlocked */ #define LLE_DELETE 0x4000 /* delete on a lookup - match LLE_IFADDR */ #define LLE_CREATE 0x8000 /* create on a lookup miss */ Index: sys/netinet/in.c =================================================================== --- sys/netinet/in.c (revision 238945) +++ sys/netinet/in.c (working copy) @@ -1280,7 +1280,6 @@ in_lltable_new(const struct sockaddr *l3addr, u_in if (lle == NULL) /* NB: caller generates msg */ return NULL; - callout_init(&lle->base.la_timer, CALLOUT_MPSAFE); /* * For IPv4 this will trigger "arpresolve" to generate * an ARP request. @@ -1290,7 +1289,10 @@ in_lltable_new(const struct sockaddr *l3addr, u_in lle->base.lle_refcnt = 1; lle->base.lle_free = in_lltable_free; LLE_LOCK_INIT(&lle->base); - return &lle->base; + callout_init_rw(&lle->base.la_timer, &lle->base.lle_lock, + CALLOUT_RETURNUNLOCKED); + + return (&lle->base); } #define IN_ARE_MASKED_ADDR_EQUAL(d, a, m) ( \ @@ -1306,26 +1308,24 @@ in_lltable_prefix_free(struct lltable *llt, const int i; size_t pkts_dropped; + IF_AFDATA_WLOCK(llt->llt_ifp); for (i = 0; i < LLTBL_HASHTBL_SIZE; i++) { LIST_FOREACH_SAFE(lle, &llt->lle_head[i], lle_next, next) { /* * (flags & LLE_STATIC) means deleting all entries * including static ARP entries. */ - if (IN_ARE_MASKED_ADDR_EQUAL(satosin(L3_ADDR(lle)), - pfx, msk) && ((flags & LLE_STATIC) || - !(lle->la_flags & LLE_STATIC))) { - int canceled; - - canceled = callout_drain(&lle->la_timer); + if (IN_ARE_MASKED_ADDR_EQUAL(satosin(L3_ADDR(lle)), pfx, msk) && + ((flags & LLE_STATIC) || !(lle->la_flags & LLE_STATIC))) { LLE_WLOCK(lle); - if (canceled) + if (callout_stop(&lle->la_timer)) LLE_REMREF(lle); pkts_dropped = llentry_free(lle); ARPSTAT_ADD(dropped, pkts_dropped); } } } + IF_AFDATA_WUNLOCK(llt->llt_ifp); } @@ -1431,7 +1431,8 @@ in_lltable_lookup(struct lltable *llt, u_int flags if (lle == NULL) { #ifdef DIAGNOSTIC if (flags & LLE_DELETE) - log(LOG_INFO, "interface address is missing from cache = %p in delete\n", lle); + log(LOG_INFO, "interface address is missing from " + "cache = %p in delete\n", lle); #endif if (!(flags & LLE_CREATE)) return (NULL); Index: sys/netinet/if_ether.c =================================================================== --- sys/netinet/if_ether.c (revision 238945) +++ sys/netinet/if_ether.c (working copy) @@ -163,49 +163,37 @@ arp_ifscrub(struct ifnet *ifp, uint32_t addr) static void arptimer(void *arg) { + struct llentry *lle = (struct llentry *)arg; struct ifnet *ifp; - struct llentry *lle; - int pkts_dropped; + size_t pkts_dropped; - KASSERT(arg != NULL, ("%s: arg NULL", __func__)); - lle = (struct llentry *)arg; + if (lle->la_flags & LLE_STATIC) { + LLE_WUNLOCK(lle); + return; + } + ifp = lle->lle_tbl->llt_ifp; CURVNET_SET(ifp->if_vnet); - IF_AFDATA_LOCK(ifp); - LLE_WLOCK(lle); - if (lle->la_flags & LLE_STATIC) - LLE_WUNLOCK(lle); - else { - if (!callout_pending(&lle->la_timer) && - callout_active(&lle->la_timer)) { - callout_stop(&lle->la_timer); - LLE_REMREF(lle); - if (lle->la_flags != LLE_DELETED) { - int evt; + if (lle->la_flags != LLE_DELETED) { + int evt; - if (lle->la_flags & LLE_VALID) - evt = LLENTRY_EXPIRED; - else - evt = LLENTRY_TIMEDOUT; - EVENTHANDLER_INVOKE(lle_event, lle, evt); - } + if (lle->la_flags & LLE_VALID) + evt = LLENTRY_EXPIRED; + else + evt = LLENTRY_TIMEDOUT; + EVENTHANDLER_INVOKE(lle_event, lle, evt); + } - pkts_dropped = llentry_free(lle); - ARPSTAT_ADD(dropped, pkts_dropped); - ARPSTAT_INC(timeouts); - } else { -#ifdef DIAGNOSTIC - struct sockaddr *l3addr = L3_ADDR(lle); - log(LOG_INFO, - "arptimer issue: %p, IPv4 address: \"%s\"\n", lle, - inet_ntoa( - ((const struct sockaddr_in *)l3addr)->sin_addr)); -#endif - LLE_WUNLOCK(lle); - } - } + callout_stop(&lle->la_timer); + LLE_WUNLOCK(lle); + IF_AFDATA_LOCK(ifp); + LLE_WLOCK(lle); + LLE_REMREF(lle); + pkts_dropped = llentry_free(lle); IF_AFDATA_UNLOCK(ifp); + ARPSTAT_ADD(dropped, pkts_dropped); + ARPSTAT_INC(timeouts); CURVNET_RESTORE(); } Index: sys/netinet6/in6.c =================================================================== --- sys/netinet6/in6.c (revision 238945) +++ sys/netinet6/in6.c (working copy) @@ -2497,12 +2497,12 @@ in6_lltable_prefix_free(struct lltable *llt, const * (flags & LLE_STATIC) means deleting all entries * including static ND6 entries. */ + IF_AFDATA_WLOCK(llt->llt_ifp); for (i = 0; i < LLTBL_HASHTBL_SIZE; i++) { LIST_FOREACH_SAFE(lle, &llt->lle_head[i], lle_next, next) { if (IN6_ARE_MASKED_ADDR_EQUAL( - &((struct sockaddr_in6 *)L3_ADDR(lle))->sin6_addr, - &pfx->sin6_addr, - &msk->sin6_addr) && + &satosin6(L3_ADDR(lle))->sin6_addr, + &pfx->sin6_addr, &msk->sin6_addr) && ((flags & LLE_STATIC) || !(lle->la_flags & LLE_STATIC))) { int canceled; @@ -2514,6 +2514,7 @@ in6_lltable_prefix_free(struct lltable *llt, const } } } + IF_AFDATA_WUNLOCK(llt->llt_ifp); } static int --------------080100000002080300020404-- From owner-freebsd-net@FreeBSD.ORG Tue Jul 31 19:31:27 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51663106566C; Tue, 31 Jul 2012 19:31:27 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vps.rulingia.com (host-122-100-2-194.octopus.com.au [122.100.2.194]) by mx1.freebsd.org (Postfix) with ESMTP id D46D08FC14; Tue, 31 Jul 2012 19:31:26 +0000 (UTC) Received: from server.rulingia.com (c220-239-247-45.belrs5.nsw.optusnet.com.au [220.239.247.45]) by vps.rulingia.com (8.14.5/8.14.5) with ESMTP id q6VJVOmu091951 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 1 Aug 2012 05:31:25 +1000 (EST) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.14.5/8.14.5) with ESMTP id q6VJV9YD014533 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 1 Aug 2012 05:31:10 +1000 (EST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.14.5/8.14.5/Submit) id q6VJV87V014466; Wed, 1 Aug 2012 05:31:08 +1000 (EST) (envelope-from peter) Date: Wed, 1 Aug 2012 05:31:05 +1000 From: Peter Jeremy To: John Baldwin Message-ID: <20120731193104.GB29153@server.rulingia.com> References: <4FFF3683.7020107@rawbw.com> <500066F4.2030102@rawbw.com> <20120714075125.GA566@DataIX.net> <201207310943.00547.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JYK4vJDZwFMowpUq" Content-Disposition: inline In-Reply-To: <201207310943.00547.jhb@freebsd.org> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-net@freebsd.org Subject: Re: System doesn't detect unplugged network cable and doesn't set interface up properly with DHCP X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2012 19:31:27 -0000 --JYK4vJDZwFMowpUq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2012-Jul-31 09:43:00 -0400, John Baldwin wrote: >On Saturday, July 14, 2012 3:51:25 am Jason Hellenthal wrote: >>=20 >> On Fri, Jul 13, 2012 at 11:20:36AM -0700, Yuri wrote: >> > But even if it exits, it leaves the IP address that it has set, which = is wrong. This IP address survives through the next DHCP setup process and= =20 >ends up being the second IP address. >> > Should be very easy to on exit remove any IP address that was set duri= ng dhclient process lifetime. >>=20 >> I couldnt agree more. Interface tear down is definately needed here. > >Hmmm, this does seem true. Do you either of you have any patches for this, >or Peter, can you extend your patch to do this? It's not a case that I initially considered and I don't currently have a patch for this. I'll have a look into it. --=20 Peter Jeremy --JYK4vJDZwFMowpUq Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlAYMngACgkQ/opHv/APuIcgsQCeN4W1rOEpgRStHirDEX46CGtW 3QIAoKOMTKi8SWSlqWiO7KCxRaWCgrrl =SA+0 -----END PGP SIGNATURE----- --JYK4vJDZwFMowpUq-- From owner-freebsd-net@FreeBSD.ORG Tue Jul 31 19:32:19 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 298FF1065672 for ; Tue, 31 Jul 2012 19:32:19 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id ADD888FC08 for ; Tue, 31 Jul 2012 19:32:18 +0000 (UTC) Received: by eeke52 with SMTP id e52so1773591eek.13 for ; Tue, 31 Jul 2012 12:32:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=0hzbQ63oZJw7fkmbuOVyIqZVKfbNdVRWgl8EXVLjesY=; b=0N58HT4heogq2JkeTJ2n91iwqvzJ035MMnOv/tOXQxUJofGReN/V0Am8k/Kniuv6ts jvXOjVjeaFE3HvFuZ109CFhsFUnnQTSfZjSakITwM0G8uUvrRpZWc+2jsGphVt2huXch 6RoCzHXwigIOasfFHhqyE3Hzk/pkoOdsJ1br8CuHun/TnwHhPKy8HbInLP6QK7wOf2X+ ci+mpF63jqHrTcKFnu87QZzHEdbqGl0qBGYQhENEER8+lM6m6Mrmyeez/3rX3OXrIIKv 9LSpClxy8KxsqdDynhVhDneSUn8TTAsCtC7AImKu0o70wls0O7mX6STPzQqlswmNAEYe UlKw== MIME-Version: 1.0 Received: by 10.14.198.200 with SMTP id v48mr19458107een.3.1343763131917; Tue, 31 Jul 2012 12:32:11 -0700 (PDT) Sender: artemb@gmail.com Received: by 10.14.182.199 with HTTP; Tue, 31 Jul 2012 12:32:11 -0700 (PDT) In-Reply-To: <20120731174101.GE2676@deviant.kiev.zoral.com.ua> References: <20120731174101.GE2676@deviant.kiev.zoral.com.ua> Date: Tue, 31 Jul 2012 12:32:11 -0700 X-Google-Sender-Auth: sGKwD4ExSy3e4ShTXO5elLF-VzI Message-ID: From: Artem Belevich To: Konstantin Belousov Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-net@freebsd.org, Venkat Duvvuru Subject: Re: PCI BAR mmap X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2012 19:32:19 -0000 On Tue, Jul 31, 2012 at 10:41 AM, Konstantin Belousov wrote: >> It's a bit of a hack, but if you are root, you can access physical >> memory via /dev/mem. >> >> memfd = open(/dev/mem) >> ptr = mmap(NULL, bar_size, PROT_READ, 0, memfd, bar_address); >> >> You can even use dd: >> >> dd if=/dev/mem bs=4k skip= count= of=bar.dump > > This probably only works on x86, only for memory BARs, and only if BAR > is already activated. But yes, I did grabbed scanouts (i.e. screen) on > Intel GPUs this way. Indeed, the hack above makes number of assumptions. * BARs indeed should be enabled. * one should know where on particular architecture BARs are mapped. BAR address is not necessarily the address kernel will see it at. * MD part of mem driver should cover that address range. The last one is a problem even on i386/amd64. It appears that, at least on i386/amd64, implicit assumption is that /dev/mem is for accessing RAM (or that peripherals are mapped in the hole below 4GB). /dev/mem does not work for devices that are mapped way above RAM in physical address space. On one of industrial boards I worked with 64-bit BARs were mapped at addresses 0xffff_xxxx_xxxx and those devices could not be accesses via /dev/mem because DMM didn't cover that range. I think DMM size got bumped up since then, but I don't think it covers complete physical address range. If device is not in that range, one can't use /dev/mem to access it. --Artem From owner-freebsd-net@FreeBSD.ORG Wed Aug 1 08:12:34 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EC3EA106564A for ; Wed, 1 Aug 2012 08:12:34 +0000 (UTC) (envelope-from bschmidt@techwires.net) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6B0938FC0A for ; Wed, 1 Aug 2012 08:12:34 +0000 (UTC) Received: by lbon10 with SMTP id n10so245713lbo.13 for ; Wed, 01 Aug 2012 01:12:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:x-originating-ip:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :x-gm-message-state; bh=YK8zKXydiyCbYKCuCi6xO7QdpRb5LAPRo1VZkWCKFzA=; b=D5JfdCVoOWnDuWF7hqT6FMxDZ/X1FbMFtAqBZ7pYEXWQWXJi2sw4KSRNbmvTjx+S0u wAZ9SIOoWWwow4iLLlSHCIPviS2Ziwx8Q/A3LeeUHFZrGWCp2x7Sn48wWrpkt9m9+YH3 iKykUafvmWCXRbmBw5J3yQvNWu2P0MROYJBom/RzhlAuwmKMCkKudgWZNTumeIVikXxx TR1fGMHDMWcJQ+lJ3x3nsdzi1YeJkD9Bu1e3dxskGKLCIDCG0G46EihutMmmwz1qjnjh IEuhgLdmPB0VQuMONVtGYcJcqShQS/pplMfJj/TgNACl3cJUJjG//otZtzxSSaRaN8j1 zDrw== MIME-Version: 1.0 Received: by 10.112.24.229 with SMTP id x5mr7884917lbf.23.1343808752979; Wed, 01 Aug 2012 01:12:32 -0700 (PDT) Sender: bschmidt@techwires.net Received: by 10.152.106.167 with HTTP; Wed, 1 Aug 2012 01:12:32 -0700 (PDT) X-Originating-IP: [79.140.39.245] In-Reply-To: References: Date: Wed, 1 Aug 2012 10:12:32 +0200 X-Google-Sender-Auth: vpL8GzKwds0kNd6By05bJ2jaRhQ Message-ID: From: Bernhard Schmidt To: Andreas Nilsson Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQknshMHgj62bE43cAAPFl/HvFL41Pk3p1wUCT+2mJcy8gIVJseXJynVffn2ku9xOwaWqFtu Cc: FreeBSD Net Subject: Re: iwn adhoc mode X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2012 08:12:35 -0000 On Fri, Jul 27, 2012 at 11:25 AM, Andreas Nilsson wrote: > and when I try to setup the connection manually with ifconfig I get > ifconfig: SIOCIFCREATE2: Operation not supported > and from reading older postings it seems that iwn has a problem with ad-hoc > mode. Indeed, adding Adhoc/IBSS support to iwn(4) is *still* on my TODO list. -- Bernhard From owner-freebsd-net@FreeBSD.ORG Wed Aug 1 08:17:29 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3781106566B; Wed, 1 Aug 2012 08:17:28 +0000 (UTC) (envelope-from andrnils@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 997AE8FC0A; Wed, 1 Aug 2012 08:17:28 +0000 (UTC) Received: by yenl8 with SMTP id l8so8218050yen.13 for ; Wed, 01 Aug 2012 01:17:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Q8xGB5GdsaIDEOdM1yY05yUbQC4AIJ3nj/WLFbPsHBE=; b=t0JNZlOWNVRyBpQFuK5OoLfmkX97xsllCSbZ5pvvhPcG7RWpLEeL1vMMRe3p4vSoyw czzHjImovzXhg90vMjLkdGXaqlnXtFa/AukT1zwe8MYb5ohcJxJSXX2P0WUGnyIDyrcC Hevmblxu6/dwJw4+pSEnryE/AEzdIUj1ydIZ6yCqh5ttHfEwOGQ5mGy0R+aiVodFSeYv lWQRpUd9EMbIoO9fwuMkoCStgAbjf40/uJoMvpjmdGoRJGISUSYNuT24qXY+GEPhgq7O NVqZVoD/n+OrCPxNdkhzoJQxNaduUJULMGPiYvI+I4YEh/5yeD/CpHaOeLM4kaqhwr6n vk2g== MIME-Version: 1.0 Received: by 10.60.3.202 with SMTP id e10mr5012434oee.52.1343809042393; Wed, 01 Aug 2012 01:17:22 -0700 (PDT) Received: by 10.60.32.81 with HTTP; Wed, 1 Aug 2012 01:17:22 -0700 (PDT) In-Reply-To: References: Date: Wed, 1 Aug 2012 10:17:22 +0200 Message-ID: From: Andreas Nilsson To: Bernhard Schmidt Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: FreeBSD Net Subject: Re: iwn adhoc mode X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2012 08:17:29 -0000 On Wed, Aug 1, 2012 at 10:12 AM, Bernhard Schmidt wrote: > On Fri, Jul 27, 2012 at 11:25 AM, Andreas Nilsson > wrote: > > and when I try to setup the connection manually with ifconfig I get > > ifconfig: SIOCIFCREATE2: Operation not supported > > and from reading older postings it seems that iwn has a problem with > ad-hoc > > mode. > > Indeed, adding Adhoc/IBSS support to iwn(4) is *still* on my TODO list. > > -- > Bernhard > Thanks for clarifying. Do you have an ETA for it as well? ;) In the meantime maybe the IWN(4) should not claim support for adhoc, or is it supported on some cards and not on others? Best regards Andreas From owner-freebsd-net@FreeBSD.ORG Wed Aug 1 13:16:27 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEC631065672 for ; Wed, 1 Aug 2012 13:16:27 +0000 (UTC) (envelope-from bschmidt@techwires.net) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 392DB8FC0C for ; Wed, 1 Aug 2012 13:16:26 +0000 (UTC) Received: by lbbgm13 with SMTP id gm13so20824lbb.13 for ; Wed, 01 Aug 2012 06:16:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:x-originating-ip:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :x-gm-message-state; bh=ldP8zRIm2CRibqnMGLzT6QAKPVH8RadtROU/HLkGxJ0=; b=Q1toxKAFwhc818Y9Tr2/guqwwDeCt8sQ5wndB/cusJq0o7ze73FFFVLAHG5d6G9GoR R+DQ5VUoRnQMHfwbs5sPV7yAdJ4NVzTeBqwm6wGHY+o7fmiWt7MzWhvyUKreD50lpuHF swtzjAnvFPoR9obphDrtAiVvuLo//Io0vv8H2Vw0B3G1dY8x6sQGLHNl7eI9/bY9qdZ6 QaoI+RNYlEnFLB1Y08jMrgZcnrof4Y7OcF+W7gjNYiR3i7H9ZbyLvkKDLrXRLd+xLASf Wls8Fl81asJ+JFHvLJo33gUQWv42GZYkPd8qIe8LOnL5/0EYUIwPGf6MNZWHietzDOMP rzjA== MIME-Version: 1.0 Received: by 10.112.84.39 with SMTP id v7mr8278957lby.15.1343826985475; Wed, 01 Aug 2012 06:16:25 -0700 (PDT) Sender: bschmidt@techwires.net Received: by 10.152.106.167 with HTTP; Wed, 1 Aug 2012 06:16:25 -0700 (PDT) X-Originating-IP: [79.140.39.245] In-Reply-To: References: Date: Wed, 1 Aug 2012 15:16:25 +0200 X-Google-Sender-Auth: 2iQIhSeH2EXoIeF5U4QNx9e4W3c Message-ID: From: Bernhard Schmidt To: Andreas Nilsson Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQnkesjVd/NQ6ETaaMTz8TKWsL4dmFlupxvDQKfrcHIXxTe4R993L8ngPFS3tjYt5qK1JMYi Cc: FreeBSD Net Subject: Re: iwn adhoc mode X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2012 13:16:27 -0000 On Wed, Aug 1, 2012 at 10:17 AM, Andreas Nilsson wrote: > > > On Wed, Aug 1, 2012 at 10:12 AM, Bernhard Schmidt > wrote: >> >> On Fri, Jul 27, 2012 at 11:25 AM, Andreas Nilsson >> wrote: >> > and when I try to setup the connection manually with ifconfig I get >> > ifconfig: SIOCIFCREATE2: Operation not supported >> > and from reading older postings it seems that iwn has a problem with >> > ad-hoc >> > mode. >> >> Indeed, adding Adhoc/IBSS support to iwn(4) is *still* on my TODO list. >> >> -- >> Bernhard > > > Thanks for clarifying. Do you have an ETA for it as well? ;) Not really.. not soon I guess. > In the meantime maybe the IWN(4) should not claim support for adhoc, or is > it supported on some cards and not on others? There was some basic, half-working, support before I've touched the code, back when only 4965 was supported. I guess the manpage needs indeed some updating. -- Bernhard From owner-freebsd-net@FreeBSD.ORG Wed Aug 1 22:12:40 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 821) id 6F3F7106566B; Wed, 1 Aug 2012 22:12:40 +0000 (UTC) Date: Wed, 1 Aug 2012 22:12:40 +0000 From: John To: FreeBSD Net Message-ID: <20120801221240.GA24976@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: 0 frame length? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2012 22:12:40 -0000 Hi Folks, On a Dell R610 system, I've been tracking down some nework issues and ran across this in a tcpdump: 0000 84 2b 2b fd be 2e f0 4d a2 08 c4 13 08 00 45 00 .++....M ......E. 0010 00 00 f0 2a 40 00 40 06 00 00 0a 18 09 ee 0a 18 ...*@.@. ........ 0020 1e 08 58 57 14 02 5e 30 ea dc 61 84 62 b3 80 18 ..XW..^0 ..a.b... 0030 08 00 42 10 00 00 01 01 08 0a 1e 67 b2 58 dc 56 ..B..... ...g.X.V 0040 81 12 4e 45 54 50 41 43 4b 04 00 00 00 00 00 00 ..NETPAC K....... .... additional packet data offset 0x10 should be the frame length - not 0. This only seems to happen in packets being sent from this system/interface. Corresponding interface: bce0: flags=8943 metric 0 mtu 1500 options=c01bb ether f0:4d:a2:08:c4:13 inet 10.24.9.238 netmask 0xffff0000 broadcast 10.24.255.255 media: Ethernet autoselect (1000baseT ) status: active 8.2-RELEASE Wireshark reports: Bogus IP len (0, less than header length 20) In googling, I've seen comments about lro/tso & the *csum options. I have those set to off for the next time the systems get rebooted. The firmware is also slightly out-of-date and I'll probably update that also after finding out what the updates target. Does anyone have any ideas what the problem might be, or place I might want to look? I have a 9.1 system being put in to run some comparison benchmarks against to see if the same problem occurs. Thanks! John From owner-freebsd-net@FreeBSD.ORG Wed Aug 1 22:26:54 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8E5F7106564A; Wed, 1 Aug 2012 22:26:54 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 4A4828FC08; Wed, 1 Aug 2012 22:26:54 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 4F2917300A; Thu, 2 Aug 2012 00:47:01 +0200 (CEST) Date: Thu, 2 Aug 2012 00:47:01 +0200 From: Luigi Rizzo To: John Message-ID: <20120801224701.GA31112@onelab2.iet.unipi.it> References: <20120801221240.GA24976@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120801221240.GA24976@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: FreeBSD Net Subject: Re: 0 frame length? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2012 22:26:54 -0000 On Wed, Aug 01, 2012 at 10:12:40PM +0000, John wrote: > Hi Folks, > > On a Dell R610 system, I've been tracking down some nework issues > and ran across this in a tcpdump: > > 0000 84 2b 2b fd be 2e f0 4d a2 08 c4 13 08 00 45 00 .++....M ......E. > 0010 00 00 f0 2a 40 00 40 06 00 00 0a 18 09 ee 0a 18 ...*@.@. ........ > 0020 1e 08 58 57 14 02 5e 30 ea dc 61 84 62 b3 80 18 ..XW..^0 ..a.b... > 0030 08 00 42 10 00 00 01 01 08 0a 1e 67 b2 58 dc 56 ..B..... ...g.X.V > 0040 81 12 4e 45 54 50 41 43 4b 04 00 00 00 00 00 00 ..NETPAC K....... > .... additional packet data > > offset 0x10 should be the frame length - not 0. This only seems to happen > in packets being sent from this system/interface. > > Corresponding interface: > > bce0: flags=8943 metric 0 mtu 1500 > options=c01bb > ether f0:4d:a2:08:c4:13 > inet 10.24.9.238 netmask 0xffff0000 broadcast 10.24.255.255 > media: Ethernet autoselect (1000baseT ) > status: active > > > 8.2-RELEASE > > Wireshark reports: > > Bogus IP len (0, less than header length 20) > > > In googling, I've seen comments about lro/tso & the *csum options. > I have those set to off for the next time the systems get rebooted. you do not need to reboot to enable/disable the various offloading options, just "ifconfig bce0 -rxcsum -tso4 -txcsum" should do the job. cheers luigi From owner-freebsd-net@FreeBSD.ORG Thu Aug 2 01:24:00 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88153106564A; Thu, 2 Aug 2012 01:24:00 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2AD608FC12; Thu, 2 Aug 2012 01:23:59 +0000 (UTC) Received: by yenl8 with SMTP id l8so9470350yen.13 for ; Wed, 01 Aug 2012 18:23:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=esykDP3l9Ll+n8i6GUZSRtqhkdjeMyefi9F8xH12Zfk=; b=b5XMRi5VJ1w1XC2mB9ObNLteW1nCvMXlpel+eJFnRBNlN0V4Fxo7Nkget7oxpMtTTv oRNC4owxUUAZLGzMM5Fpe523d6QFBCF015vmRot53DMfDKDKrCfrcntKXkiBe/akEBCb QBU+3OyNs21idB+2xl81Y6IkfkBTUWpKAPMgCa8G062TA2++sd6eb5CGOhjUOG1dxj7B HfNg89e0XQy8QEElKkGARkOT2hMtEcWBUQ7lLlVYLtvT220zaD6kL++xHrnv0vVCCIYu oEW2ZXEERRGuYmp0hCYknOoMMmwYhA5nh5+njqrsy3mNzAZ9I/4NioqEDRvKGiXmyzwF 9uSA== Received: by 10.50.219.136 with SMTP id po8mr25046igc.70.1343870639065; Wed, 01 Aug 2012 18:23:59 -0700 (PDT) Received: from pyunyh@gmail.com (lpe4.p59-icn.cdngp.net. [114.111.62.249]) by mx.google.com with ESMTPS id ua2sm9034001igb.7.2012.08.01.18.23.55 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 01 Aug 2012 18:23:58 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Thu, 02 Aug 2012 10:23:50 -0700 From: YongHyeon PYUN Date: Thu, 2 Aug 2012 10:23:50 -0700 To: John Message-ID: <20120802172350.GA3097@michelle.cdnetworks.com> References: <20120801221240.GA24976@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120801221240.GA24976@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: FreeBSD Net Subject: Re: 0 frame length? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2012 01:24:00 -0000 On Wed, Aug 01, 2012 at 10:12:40PM +0000, John wrote: > Hi Folks, > > On a Dell R610 system, I've been tracking down some nework issues > and ran across this in a tcpdump: > > 0000 84 2b 2b fd be 2e f0 4d a2 08 c4 13 08 00 45 00 .++....M ......E. > 0010 00 00 f0 2a 40 00 40 06 00 00 0a 18 09 ee 0a 18 ...*@.@. ........ > 0020 1e 08 58 57 14 02 5e 30 ea dc 61 84 62 b3 80 18 ..XW..^0 ..a.b... > 0030 08 00 42 10 00 00 01 01 08 0a 1e 67 b2 58 dc 56 ..B..... ...g.X.V > 0040 81 12 4e 45 54 50 41 43 4b 04 00 00 00 00 00 00 ..NETPAC K....... > .... additional packet data > > offset 0x10 should be the frame length - not 0. This only seems to happen > in packets being sent from this system/interface. > > Corresponding interface: > > bce0: flags=8943 metric 0 mtu 1500 > options=c01bb > ether f0:4d:a2:08:c4:13 > inet 10.24.9.238 netmask 0xffff0000 broadcast 10.24.255.255 > media: Ethernet autoselect (1000baseT ) > status: active > > > 8.2-RELEASE > > Wireshark reports: > > Bogus IP len (0, less than header length 20) > > > In googling, I've seen comments about lro/tso & the *csum options. > I have those set to off for the next time the systems get rebooted. > The firmware is also slightly out-of-date and I'll probably update > that also after finding out what the updates target. > > > Does anyone have any ideas what the problem might be, or place > I might want to look? I have a 9.1 system being put in to run some > comparison benchmarks against to see if the same problem occurs. > Try disabling TSO and see whether that makes any difference. (You don't need to reboot the box) I recall there were several reports that frames generated via TSO had bad IP length. And the issue seems to happen on several ethernet drivers. Unfortunately I was not able to reproduce that. From owner-freebsd-net@FreeBSD.ORG Thu Aug 2 09:00:29 2012 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 20C60106564A for ; Thu, 2 Aug 2012 09:00:29 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E5AF38FC15 for ; Thu, 2 Aug 2012 09:00:28 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q7290Sw6009804 for ; Thu, 2 Aug 2012 09:00:28 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q7290Sve009803; Thu, 2 Aug 2012 09:00:28 GMT (envelope-from gnats) Date: Thu, 2 Aug 2012 09:00:28 GMT Message-Id: <201208020900.q7290Sve009803@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: Andreas Longwitz Cc: Subject: Re: kern/169620: [ng] [pf] ng_l2tp incoming packet bypass pf firewall X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Andreas Longwitz List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2012 09:00:29 -0000 The following reply was made to PR kern/169620; it has been noted by GNATS. From: Andreas Longwitz To: bug-followup@freebsd.org, hashiz@meridiani.jp Cc: Subject: Re: kern/169620: [ng] [pf] ng_l2tp incoming packet bypass pf firewall Date: Thu, 02 Aug 2012 10:39:20 +0200 Hi, > PF firewall does not examine incomming packet on ng_l2tp interface. If your incoming packets are handled by IPSec before ng_l2tp your problem is explained in lists.freebsd.org/pipermail/freebsd-net/2012-January/031161.html -- Andreas Longwitz From owner-freebsd-net@FreeBSD.ORG Thu Aug 2 10:20:47 2012 Return-Path: Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 80D4E106566B for ; Thu, 2 Aug 2012 10:20:47 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id D3B488FC19 for ; Thu, 2 Aug 2012 10:20:46 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q72AKd5N077715; Thu, 2 Aug 2012 14:20:39 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q72AKdTs077714; Thu, 2 Aug 2012 14:20:39 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 2 Aug 2012 14:20:39 +0400 From: Gleb Smirnoff To: Andrey Zonov Message-ID: <20120802102039.GC70185@glebius.int.ru> References: <201203090930.q299UCPX057950@freefall.freebsd.org> <20120410065432.GJ9391@glebius.int.ru> <5018275E.6090901@zonov.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="CE+1k2dSO48ffgeK" Content-Disposition: inline In-Reply-To: <5018275E.6090901@zonov.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-net@FreeBSD.org, Ryan Stone Subject: Re: kern/165863 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2012 10:20:47 -0000 --CE+1k2dSO48ffgeK Content-Type: text/plain; charset=koi8-r Content-Disposition: inline On Tue, Jul 31, 2012 at 10:43:42PM +0400, Andrey Zonov wrote: A> Please review attached patch. I used Gleb's ideas. He almost fixed the A> issue, but he didn't observe that entry can be safely unlocked in A> arptimer() because it has refcnt incremented and cannot be removed. I A> also fixed entry removing based on refcnt that was totally broken. Another try. :) Same as Andrey's patch, but I do not remove the lle from single linked list in the LLE_FREE macro. This requires a protection against sequential llentry_free() calls on same lle. diff also includes: - some cleanup of llentry_update and its rename to llentry_alloc(), would be committed sepearately - ktr tracing in macros, won't be commited. -- Totus tuus, Glebius. --CE+1k2dSO48ffgeK Content-Type: text/x-diff; charset=koi8-r Content-Disposition: attachment; filename="lle.diff" Index: netinet/in.c =================================================================== --- netinet/in.c (revision 238967) +++ netinet/in.c (working copy) @@ -1280,7 +1280,6 @@ if (lle == NULL) /* NB: caller generates msg */ return NULL; - callout_init(&lle->base.la_timer, CALLOUT_MPSAFE); /* * For IPv4 this will trigger "arpresolve" to generate * an ARP request. @@ -1290,7 +1289,10 @@ lle->base.lle_refcnt = 1; lle->base.lle_free = in_lltable_free; LLE_LOCK_INIT(&lle->base); - return &lle->base; + callout_init_rw(&lle->base.la_timer, &lle->base.lle_lock, + CALLOUT_RETURNUNLOCKED); + + return (&lle->base); } #define IN_ARE_MASKED_ADDR_EQUAL(d, a, m) ( \ @@ -1306,6 +1308,7 @@ int i; size_t pkts_dropped; + IF_AFDATA_WLOCK(llt->llt_ifp); for (i = 0; i < LLTBL_HASHTBL_SIZE; i++) { LIST_FOREACH_SAFE(lle, &llt->lle_head[i], lle_next, next) { /* @@ -1315,17 +1318,15 @@ if (IN_ARE_MASKED_ADDR_EQUAL(satosin(L3_ADDR(lle)), pfx, msk) && ((flags & LLE_STATIC) || !(lle->la_flags & LLE_STATIC))) { - int canceled; - - canceled = callout_drain(&lle->la_timer); LLE_WLOCK(lle); - if (canceled) + if (callout_stop(&lle->la_timer)) LLE_REMREF(lle); pkts_dropped = llentry_free(lle); ARPSTAT_ADD(dropped, pkts_dropped); } } } + IF_AFDATA_WUNLOCK(llt->llt_ifp); } @@ -1457,11 +1458,12 @@ lle->lle_tbl = llt; lle->lle_head = lleh; + lle->la_flags |= LLE_LINKED; LIST_INSERT_HEAD(lleh, lle, lle_next); } else if (flags & LLE_DELETE) { if (!(lle->la_flags & LLE_IFADDR) || (flags & LLE_IFADDR)) { LLE_WLOCK(lle); - lle->la_flags = LLE_DELETED; + lle->la_flags |= LLE_DELETED; EVENTHANDLER_INVOKE(lle_event, lle, LLENTRY_DELETED); LLE_WUNLOCK(lle); #ifdef DIAGNOSTIC Index: netinet/if_ether.c =================================================================== --- netinet/if_ether.c (revision 238967) +++ netinet/if_ether.c (working copy) @@ -163,49 +163,40 @@ static void arptimer(void *arg) { + struct llentry *lle = (struct llentry *)arg; struct ifnet *ifp; - struct llentry *lle; - int pkts_dropped; + size_t pkts_dropped; - KASSERT(arg != NULL, ("%s: arg NULL", __func__)); - lle = (struct llentry *)arg; + if (lle->la_flags & LLE_STATIC) { + LLE_WUNLOCK(lle); + return; + } + ifp = lle->lle_tbl->llt_ifp; CURVNET_SET(ifp->if_vnet); + + if (lle->la_flags != LLE_DELETED) { + int evt; + + if (lle->la_flags & LLE_VALID) + evt = LLENTRY_EXPIRED; + else + evt = LLENTRY_TIMEDOUT; + EVENTHANDLER_INVOKE(lle_event, lle, evt); + } + + callout_stop(&lle->la_timer); + + /* XXX: LOR avoidance. We still have ref on lle. */ + LLE_WUNLOCK(lle); IF_AFDATA_LOCK(ifp); LLE_WLOCK(lle); - if (lle->la_flags & LLE_STATIC) - LLE_WUNLOCK(lle); - else { - if (!callout_pending(&lle->la_timer) && - callout_active(&lle->la_timer)) { - callout_stop(&lle->la_timer); - LLE_REMREF(lle); - if (lle->la_flags != LLE_DELETED) { - int evt; - - if (lle->la_flags & LLE_VALID) - evt = LLENTRY_EXPIRED; - else - evt = LLENTRY_TIMEDOUT; - EVENTHANDLER_INVOKE(lle_event, lle, evt); - } - - pkts_dropped = llentry_free(lle); - ARPSTAT_ADD(dropped, pkts_dropped); - ARPSTAT_INC(timeouts); - } else { -#ifdef DIAGNOSTIC - struct sockaddr *l3addr = L3_ADDR(lle); - log(LOG_INFO, - "arptimer issue: %p, IPv4 address: \"%s\"\n", lle, - inet_ntoa( - ((const struct sockaddr_in *)l3addr)->sin_addr)); -#endif - LLE_WUNLOCK(lle); - } - } + LLE_REMREF(lle); + pkts_dropped = llentry_free(lle); IF_AFDATA_UNLOCK(ifp); + ARPSTAT_ADD(dropped, pkts_dropped); + ARPSTAT_INC(timeouts); CURVNET_RESTORE(); } Index: netinet6/in6.c =================================================================== --- netinet6/in6.c (revision 238967) +++ netinet6/in6.c (working copy) @@ -2497,23 +2497,22 @@ * (flags & LLE_STATIC) means deleting all entries * including static ND6 entries. */ + IF_AFDATA_WLOCK(llt->llt_ifp); for (i = 0; i < LLTBL_HASHTBL_SIZE; i++) { LIST_FOREACH_SAFE(lle, &llt->lle_head[i], lle_next, next) { if (IN6_ARE_MASKED_ADDR_EQUAL( - &((struct sockaddr_in6 *)L3_ADDR(lle))->sin6_addr, - &pfx->sin6_addr, - &msk->sin6_addr) && - ((flags & LLE_STATIC) || !(lle->la_flags & LLE_STATIC))) { - int canceled; - - canceled = callout_drain(&lle->la_timer); + &satosin6(L3_ADDR(lle))->sin6_addr, + &pfx->sin6_addr, &msk->sin6_addr) && + ((flags & LLE_STATIC) || + !(lle->la_flags & LLE_STATIC))) { LLE_WLOCK(lle); - if (canceled) + if (callout_stop(&lle->la_timer)) LLE_REMREF(lle); llentry_free(lle); } } } + IF_AFDATA_WUNLOCK(llt->llt_ifp); } static int @@ -2605,11 +2604,12 @@ lle->lle_tbl = llt; lle->lle_head = lleh; + lle->la_flags |= LLE_LINKED; LIST_INSERT_HEAD(lleh, lle, lle_next); } else if (flags & LLE_DELETE) { if (!(lle->la_flags & LLE_IFADDR) || (flags & LLE_IFADDR)) { LLE_WLOCK(lle); - lle->la_flags = LLE_DELETED; + lle->la_flags |= LLE_DELETED; LLE_WUNLOCK(lle); #ifdef DIAGNOSTIC log(LOG_INFO, "ifaddr cache = %p is deleted\n", lle); Index: net/if_var.h =================================================================== --- net/if_var.h (revision 238967) +++ net/if_var.h (working copy) @@ -415,6 +415,8 @@ #define IF_AFDATA_DESTROY(ifp) rw_destroy(&(ifp)->if_afdata_lock) #define IF_AFDATA_LOCK_ASSERT(ifp) rw_assert(&(ifp)->if_afdata_lock, RA_LOCKED) +#define IF_AFDATA_RLOCK_ASSERT(ifp) rw_assert(&(ifp)->if_afdata_lock, RA_RLOCKED) +#define IF_AFDATA_WLOCK_ASSERT(ifp) rw_assert(&(ifp)->if_afdata_lock, RA_WLOCKED) #define IF_AFDATA_UNLOCK_ASSERT(ifp) rw_assert(&(ifp)->if_afdata_lock, RA_UNLOCKED) int if_handoff(struct ifqueue *ifq, struct mbuf *m, struct ifnet *ifp, Index: net/flowtable.c =================================================================== --- net/flowtable.c (revision 238967) +++ net/flowtable.c (working copy) @@ -1258,7 +1258,7 @@ else l3addr = (struct sockaddr_storage *)&ro->ro_dst; - llentry_update(&lle, LLTABLE6(ifp), l3addr, ifp); + lle = llentry_alloc(ifp, LLTABLE6(ifp), l3addr); } #endif #ifdef INET @@ -1267,7 +1267,7 @@ l3addr = (struct sockaddr_storage *)rt->rt_gateway; else l3addr = (struct sockaddr_storage *)&ro->ro_dst; - llentry_update(&lle, LLTABLE(ifp), l3addr, ifp); + lle = llentry_alloc(ifp, LLTABLE(ifp), l3addr); } #endif Index: net/if_llatbl.c =================================================================== --- net/if_llatbl.c (revision 238967) +++ net/if_llatbl.c (working copy) @@ -106,10 +106,19 @@ size_t pkts_dropped; struct mbuf *next; - pkts_dropped = 0; + IF_AFDATA_WLOCK_ASSERT(lle->lle_tbl->llt_ifp); LLE_WLOCK_ASSERT(lle); + + /* XXX: guard against race with other llentry_free(). */ + if (!(lle->la_flags & LLE_LINKED)) { + LLE_FREE_LOCKED(lle); + return (0); + } + LIST_REMOVE(lle, lle_next); + lle->la_flags &= ~(LLE_VALID | LLE_LINKED); + pkts_dropped = 0; while ((lle->la_numheld > 0) && (lle->la_hold != NULL)) { next = lle->la_hold->m_nextpkt; m_freem(lle->la_hold); @@ -122,49 +131,39 @@ ("%s: la_numheld %d > 0, pkts_droped %zd", __func__, lle->la_numheld, pkts_dropped)); - lle->la_flags &= ~LLE_VALID; LLE_FREE_LOCKED(lle); return (pkts_dropped); } /* - * Update an llentry for address dst (equivalent to rtalloc for new-arp) - * Caller must pass in a valid struct llentry * (or NULL) + * (al)locate an llentry for address dst (equivalent to rtalloc for new-arp). * - * if found the llentry * is returned referenced and unlocked + * If found the llentry * is returned referenced and unlocked. */ -int -llentry_update(struct llentry **llep, struct lltable *lt, - struct sockaddr_storage *dst, struct ifnet *ifp) +struct llentry * +llentry_alloc(struct ifnet *ifp, struct lltable *lt, + struct sockaddr_storage *dst) { struct llentry *la; IF_AFDATA_RLOCK(ifp); - la = lla_lookup(lt, LLE_EXCLUSIVE, - (struct sockaddr *)dst); + la = lla_lookup(lt, LLE_EXCLUSIVE, (struct sockaddr *)dst); IF_AFDATA_RUNLOCK(ifp); if ((la == NULL) && (ifp->if_flags & (IFF_NOARP | IFF_STATICARP)) == 0) { IF_AFDATA_WLOCK(ifp); - la = lla_lookup(lt, - (LLE_CREATE | LLE_EXCLUSIVE), + la = lla_lookup(lt, (LLE_CREATE | LLE_EXCLUSIVE), (struct sockaddr *)dst); IF_AFDATA_WUNLOCK(ifp); } - if (la != NULL && (*llep != la)) { - if (*llep != NULL) - LLE_FREE(*llep); + + if (la != NULL) { LLE_ADDREF(la); LLE_WUNLOCK(la); - *llep = la; - } else if (la != NULL) - LLE_WUNLOCK(la); + } - if (la == NULL) - return (ENOENT); - - return (0); + return (la); } /* @@ -182,17 +181,16 @@ SLIST_REMOVE(&V_lltables, llt, lltable, llt_link); LLTABLE_WUNLOCK(); + IF_AFDATA_WLOCK(llt->llt_ifp); for (i = 0; i < LLTBL_HASHTBL_SIZE; i++) { LIST_FOREACH_SAFE(lle, &llt->lle_head[i], lle_next, next) { - int canceled; - - canceled = callout_drain(&lle->la_timer); LLE_WLOCK(lle); - if (canceled) + if (callout_stop(&lle->la_timer)) LLE_REMREF(lle); llentry_free(lle); } } + IF_AFDATA_WUNLOCK(llt->llt_ifp); free(llt, M_LLTABLE); } Index: net/if_llatbl.h =================================================================== --- net/if_llatbl.h (revision 238967) +++ net/if_llatbl.h (working copy) @@ -33,6 +33,7 @@ #include "opt_ofed.h" #include +#include #include struct ifnet; @@ -103,26 +104,31 @@ #define LLE_ADDREF(lle) do { \ LLE_WLOCK_ASSERT(lle); \ KASSERT((lle)->lle_refcnt >= 0, \ - ("negative refcnt %d", (lle)->lle_refcnt)); \ + ("negative refcnt %d on lle %p", \ + (lle)->lle_refcnt, (lle))); \ + CTR2(KTR_SPARE3, "LLE_ADDREF %p %d", (lle), (lle)->lle_refcnt); \ (lle)->lle_refcnt++; \ } while (0) #define LLE_REMREF(lle) do { \ LLE_WLOCK_ASSERT(lle); \ - KASSERT((lle)->lle_refcnt > 1, \ - ("bogus refcnt %d", (lle)->lle_refcnt)); \ + KASSERT((lle)->lle_refcnt > 0, \ + ("bogus refcnt %d on lle %p", \ + (lle)->lle_refcnt, (lle))); \ + CTR2(KTR_SPARE3, "LLE_REMREF %p %d", (lle), (lle)->lle_refcnt); \ (lle)->lle_refcnt--; \ } while (0) #define LLE_FREE_LOCKED(lle) do { \ - if ((lle)->lle_refcnt <= 1) \ - (lle)->lle_free((lle)->lle_tbl, (lle));\ + CTR2(KTR_SPARE3, "LLE_FREE %p %d", (lle), (lle)->lle_refcnt); \ + if ((lle)->lle_refcnt == 1) \ + (lle)->lle_free((lle)->lle_tbl, (lle)); \ else { \ - (lle)->lle_refcnt--; \ + LLE_REMREF(lle); \ LLE_WUNLOCK(lle); \ } \ /* guard against invalid refs */ \ - lle = NULL; \ + (lle) = NULL; \ } while (0) #define LLE_FREE(lle) do { \ @@ -172,6 +178,7 @@ #define LLE_VALID 0x0008 /* ll_addr is valid */ #define LLE_PROXY 0x0010 /* proxy entry ??? */ #define LLE_PUB 0x0020 /* publish entry ??? */ +#define LLE_LINKED 0x0040 /* linked to lookup structure */ #define LLE_EXCLUSIVE 0x2000 /* return lle xlocked */ #define LLE_DELETE 0x4000 /* delete on a lookup - match LLE_IFADDR */ #define LLE_CREATE 0x8000 /* create on a lookup miss */ @@ -189,8 +196,8 @@ int lltable_sysctl_dumparp(int, struct sysctl_req *); size_t llentry_free(struct llentry *); -int llentry_update(struct llentry **, struct lltable *, - struct sockaddr_storage *, struct ifnet *); +struct llentry *llentry_alloc(struct ifnet *, struct lltable *, + struct sockaddr_storage *); /* * Generic link layer address lookup function. --CE+1k2dSO48ffgeK-- From owner-freebsd-net@FreeBSD.ORG Thu Aug 2 11:10:13 2012 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 272461065680 for ; Thu, 2 Aug 2012 11:10:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 124FC8FC1A for ; Thu, 2 Aug 2012 11:10:13 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q72BAC3b031098 for ; Thu, 2 Aug 2012 11:10:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q72BACuk031097; Thu, 2 Aug 2012 11:10:12 GMT (envelope-from gnats) Date: Thu, 2 Aug 2012 11:10:12 GMT Message-Id: <201208021110.q72BACuk031097@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: HASHI Hiroaki Cc: Subject: Re: kern/169620: [ng] [pf] ng_l2tp incoming packet bypass pf firewall X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: HASHI Hiroaki List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2012 11:10:13 -0000 The following reply was made to PR kern/169620; it has been noted by GNATS. From: HASHI Hiroaki To: longwitz@incore.de Cc: bug-followup@freebsd.org Subject: Re: kern/169620: [ng] [pf] ng_l2tp incoming packet bypass pf firewall Date: Thu, 02 Aug 2012 19:20:48 +0900 (JST) In "Re: kern/169620: [ng] [pf] ng_l2tp incoming packet bypass pf firewall" at Thu, 02 Aug 2012 10:39:20 +0200 Andreas Longwitz wrote: > Hi, >> PF firewall does not examine incomming packet on ng_l2tp interface. > > If your incoming packets are handled by IPSec before ng_l2tp your > problem is explained in Yes, handled by IPSec. > > lists.freebsd.org/pipermail/freebsd-net/2012-January/031161.html I will try it. Thanks. From owner-freebsd-net@FreeBSD.ORG Thu Aug 2 12:19:46 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 85CA41065670 for ; Thu, 2 Aug 2012 12:19:46 +0000 (UTC) (envelope-from venkatduvvuru.ml@gmail.com) Received: from mail-qa0-f54.google.com (mail-qa0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3F1B28FC1A for ; Thu, 2 Aug 2012 12:19:45 +0000 (UTC) Received: by qaat11 with SMTP id t11so1258559qaa.13 for ; Thu, 02 Aug 2012 05:19:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=aP5yHvcr2m/V3d1131oSAwObbNF+q9VzPm+05Z3yopo=; b=lVRKZFzWfKRKDE3/rhOtgE/Bkh8TeP84NvJauRCSkGNA0h1H0vS/guK1tJtWaylaIT YnZNmQ3iLDtQ54CyE3AaXIMYiZ3HpqfXBj1O3YUJJ7x+ZdbQUM3OBxno/nWRa7H3MsZ4 ywmmbvB9ttNWYtTX5wB3YNTGnkYeSBfFydxZcAM8w7iRyhf/LBFInZVtq9mZ4s3n6Z/j RwQPWgfSk8z6c0jLTC0WdkRboAPpbBv4VHvV6mk4k3FfavFdjwC8ZF7CgAQ4aFHlZzKt k6gtp0ArmpVuhHzX4VbBO31onEmswd2FZBFhy7K0tCAOu83Jgjq8zXv9foEmWsTKSKvM ZS5w== MIME-Version: 1.0 Received: by 10.60.12.234 with SMTP id b10mr36113475oec.72.1343909984640; Thu, 02 Aug 2012 05:19:44 -0700 (PDT) Received: by 10.76.8.99 with HTTP; Thu, 2 Aug 2012 05:19:44 -0700 (PDT) In-Reply-To: References: Date: Thu, 2 Aug 2012 17:49:44 +0530 Message-ID: From: Venkat Duvvuru To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: IPv6 multi queue transmit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2012 12:19:46 -0000 Folks - any inputs? /Venkat On Tue, Jul 31, 2012 at 6:52 PM, Venkat Duvvuru wrote: > Hi, > I have a couple of questions related to flowid for IPv6. Please clarify. > > 1. Why is the below code (ip_output) absent for ip6_output? This is > causing the ipv6 traffic to always flow in just one queue. > > if (inp != NULL) { > INP_LOCK_ASSERT(inp); > M_SETFIB(m, inp->inp_inc.inc_fibnum); > if (inp->inp_flags & (INP_HW_FLOWID|INP_SW_FLOWID)) { > m->m_pkthdr.flowid = inp->inp_flowid; > m->m_flags |= M_FLOWID; > } > } > 2. Why "fle" is NULL after enabling FLOWTABLE for IPv6 > > net/flowtable.c > if (af == AF_INET6) > { > fle = flowtable_lookup_mbuf6(ft, m); > if (fle != NULL && m != NULL && (m->m_flags & M_FLOWID) == > 0) { > m->m_flags |= M_FLOWID; > m->m_pkthdr.flowid = fle->f_fhash; > } > } > > /Venkat > From owner-freebsd-net@FreeBSD.ORG Thu Aug 2 14:00:27 2012 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 32C45106566C for ; Thu, 2 Aug 2012 14:00:27 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 1CD5B8FC19 for ; Thu, 2 Aug 2012 14:00:27 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q72E0QwT057089 for ; Thu, 2 Aug 2012 14:00:26 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q72E0Qu2057088; Thu, 2 Aug 2012 14:00:26 GMT (envelope-from gnats) Date: Thu, 2 Aug 2012 14:00:26 GMT Message-Id: <201208021400.q72E0Qu2057088@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: kern/165863: commit references a PR X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2012 14:00:27 -0000 The following reply was made to PR kern/165863; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/165863: commit references a PR Date: Thu, 2 Aug 2012 13:58:02 +0000 (UTC) Author: glebius Date: Thu Aug 2 13:57:49 2012 New Revision: 238990 URL: http://svn.freebsd.org/changeset/base/238990 Log: Fix races between in_lltable_prefix_free(), lla_lookup(), llentry_free() and arptimer(): o Use callout_init_rw() for lle timeout, this allows us safely disestablish them. - This allows us to simplify the arptimer() and make it race safe. o Consistently use ifp->if_afdata_lock to lock access to linked lists in the lle hashes. o Introduce new lle flag LLE_LINKED, which marks an entry that is attached to the hash. - Use LLE_LINKED to avoid double unlinking via consequent calls to llentry_free(). - Mark lle with LLE_DELETED via |= operation istead of =, so that other flags won't be lost. o Make LLE_ADDREF(), LLE_REMREF() and LLE_FREE_LOCKED() more consistent and provide more informative KASSERTs. The patch is a collaborative work of all submitters and myself. PR: kern/165863 Submitted by: Andrey Zonov Submitted by: Ryan Stone Submitted by: Eric van Gyzen Modified: head/sys/net/if_llatbl.c head/sys/net/if_llatbl.h head/sys/net/if_var.h head/sys/netinet/if_ether.c head/sys/netinet/in.c head/sys/netinet6/in6.c Modified: head/sys/net/if_llatbl.c ============================================================================== --- head/sys/net/if_llatbl.c Thu Aug 2 13:20:44 2012 (r238989) +++ head/sys/net/if_llatbl.c Thu Aug 2 13:57:49 2012 (r238990) @@ -106,10 +106,19 @@ llentry_free(struct llentry *lle) size_t pkts_dropped; struct mbuf *next; - pkts_dropped = 0; + IF_AFDATA_WLOCK_ASSERT(lle->lle_tbl->llt_ifp); LLE_WLOCK_ASSERT(lle); + + /* XXX: guard against race with other llentry_free(). */ + if (!(lle->la_flags & LLE_LINKED)) { + LLE_FREE_LOCKED(lle); + return (0); + } + LIST_REMOVE(lle, lle_next); + lle->la_flags &= ~(LLE_VALID | LLE_LINKED); + pkts_dropped = 0; while ((lle->la_numheld > 0) && (lle->la_hold != NULL)) { next = lle->la_hold->m_nextpkt; m_freem(lle->la_hold); @@ -122,7 +131,6 @@ llentry_free(struct llentry *lle) ("%s: la_numheld %d > 0, pkts_droped %zd", __func__, lle->la_numheld, pkts_dropped)); - lle->la_flags &= ~LLE_VALID; LLE_FREE_LOCKED(lle); return (pkts_dropped); @@ -173,17 +181,16 @@ lltable_free(struct lltable *llt) SLIST_REMOVE(&V_lltables, llt, lltable, llt_link); LLTABLE_WUNLOCK(); + IF_AFDATA_WLOCK(llt->llt_ifp); for (i = 0; i < LLTBL_HASHTBL_SIZE; i++) { LIST_FOREACH_SAFE(lle, &llt->lle_head[i], lle_next, next) { - int canceled; - - canceled = callout_drain(&lle->la_timer); LLE_WLOCK(lle); - if (canceled) + if (callout_stop(&lle->la_timer)) LLE_REMREF(lle); llentry_free(lle); } } + IF_AFDATA_WUNLOCK(llt->llt_ifp); free(llt, M_LLTABLE); } Modified: head/sys/net/if_llatbl.h ============================================================================== --- head/sys/net/if_llatbl.h Thu Aug 2 13:20:44 2012 (r238989) +++ head/sys/net/if_llatbl.h Thu Aug 2 13:57:49 2012 (r238990) @@ -103,26 +103,28 @@ struct llentry { #define LLE_ADDREF(lle) do { \ LLE_WLOCK_ASSERT(lle); \ KASSERT((lle)->lle_refcnt >= 0, \ - ("negative refcnt %d", (lle)->lle_refcnt)); \ + ("negative refcnt %d on lle %p", \ + (lle)->lle_refcnt, (lle))); \ (lle)->lle_refcnt++; \ } while (0) #define LLE_REMREF(lle) do { \ LLE_WLOCK_ASSERT(lle); \ - KASSERT((lle)->lle_refcnt > 1, \ - ("bogus refcnt %d", (lle)->lle_refcnt)); \ + KASSERT((lle)->lle_refcnt > 0, \ + ("bogus refcnt %d on lle %p", \ + (lle)->lle_refcnt, (lle))); \ (lle)->lle_refcnt--; \ } while (0) #define LLE_FREE_LOCKED(lle) do { \ - if ((lle)->lle_refcnt <= 1) \ - (lle)->lle_free((lle)->lle_tbl, (lle));\ + if ((lle)->lle_refcnt == 1) \ + (lle)->lle_free((lle)->lle_tbl, (lle)); \ else { \ - (lle)->lle_refcnt--; \ + LLE_REMREF(lle); \ LLE_WUNLOCK(lle); \ } \ /* guard against invalid refs */ \ - lle = NULL; \ + (lle) = NULL; \ } while (0) #define LLE_FREE(lle) do { \ @@ -172,6 +174,7 @@ MALLOC_DECLARE(M_LLTABLE); #define LLE_VALID 0x0008 /* ll_addr is valid */ #define LLE_PROXY 0x0010 /* proxy entry ??? */ #define LLE_PUB 0x0020 /* publish entry ??? */ +#define LLE_LINKED 0x0040 /* linked to lookup structure */ #define LLE_EXCLUSIVE 0x2000 /* return lle xlocked */ #define LLE_DELETE 0x4000 /* delete on a lookup - match LLE_IFADDR */ #define LLE_CREATE 0x8000 /* create on a lookup miss */ Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Thu Aug 2 13:20:44 2012 (r238989) +++ head/sys/net/if_var.h Thu Aug 2 13:57:49 2012 (r238990) @@ -415,6 +415,8 @@ EVENTHANDLER_DECLARE(group_change_event, #define IF_AFDATA_DESTROY(ifp) rw_destroy(&(ifp)->if_afdata_lock) #define IF_AFDATA_LOCK_ASSERT(ifp) rw_assert(&(ifp)->if_afdata_lock, RA_LOCKED) +#define IF_AFDATA_RLOCK_ASSERT(ifp) rw_assert(&(ifp)->if_afdata_lock, RA_RLOCKED) +#define IF_AFDATA_WLOCK_ASSERT(ifp) rw_assert(&(ifp)->if_afdata_lock, RA_WLOCKED) #define IF_AFDATA_UNLOCK_ASSERT(ifp) rw_assert(&(ifp)->if_afdata_lock, RA_UNLOCKED) int if_handoff(struct ifqueue *ifq, struct mbuf *m, struct ifnet *ifp, Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Thu Aug 2 13:20:44 2012 (r238989) +++ head/sys/netinet/if_ether.c Thu Aug 2 13:57:49 2012 (r238990) @@ -163,49 +163,40 @@ arp_ifscrub(struct ifnet *ifp, uint32_t static void arptimer(void *arg) { + struct llentry *lle = (struct llentry *)arg; struct ifnet *ifp; - struct llentry *lle; - int pkts_dropped; + size_t pkts_dropped; + + if (lle->la_flags & LLE_STATIC) { + LLE_WUNLOCK(lle); + return; + } - KASSERT(arg != NULL, ("%s: arg NULL", __func__)); - lle = (struct llentry *)arg; ifp = lle->lle_tbl->llt_ifp; CURVNET_SET(ifp->if_vnet); + + if (lle->la_flags != LLE_DELETED) { + int evt; + + if (lle->la_flags & LLE_VALID) + evt = LLENTRY_EXPIRED; + else + evt = LLENTRY_TIMEDOUT; + EVENTHANDLER_INVOKE(lle_event, lle, evt); + } + + callout_stop(&lle->la_timer); + + /* XXX: LOR avoidance. We still have ref on lle. */ + LLE_WUNLOCK(lle); IF_AFDATA_LOCK(ifp); LLE_WLOCK(lle); - if (lle->la_flags & LLE_STATIC) - LLE_WUNLOCK(lle); - else { - if (!callout_pending(&lle->la_timer) && - callout_active(&lle->la_timer)) { - callout_stop(&lle->la_timer); - LLE_REMREF(lle); - - if (lle->la_flags != LLE_DELETED) { - int evt; - - if (lle->la_flags & LLE_VALID) - evt = LLENTRY_EXPIRED; - else - evt = LLENTRY_TIMEDOUT; - EVENTHANDLER_INVOKE(lle_event, lle, evt); - } - pkts_dropped = llentry_free(lle); - ARPSTAT_ADD(dropped, pkts_dropped); - ARPSTAT_INC(timeouts); - } else { -#ifdef DIAGNOSTIC - struct sockaddr *l3addr = L3_ADDR(lle); - log(LOG_INFO, - "arptimer issue: %p, IPv4 address: \"%s\"\n", lle, - inet_ntoa( - ((const struct sockaddr_in *)l3addr)->sin_addr)); -#endif - LLE_WUNLOCK(lle); - } - } + LLE_REMREF(lle); + pkts_dropped = llentry_free(lle); IF_AFDATA_UNLOCK(ifp); + ARPSTAT_ADD(dropped, pkts_dropped); + ARPSTAT_INC(timeouts); CURVNET_RESTORE(); } Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Thu Aug 2 13:20:44 2012 (r238989) +++ head/sys/netinet/in.c Thu Aug 2 13:57:49 2012 (r238990) @@ -1280,7 +1280,6 @@ in_lltable_new(const struct sockaddr *l3 if (lle == NULL) /* NB: caller generates msg */ return NULL; - callout_init(&lle->base.la_timer, CALLOUT_MPSAFE); /* * For IPv4 this will trigger "arpresolve" to generate * an ARP request. @@ -1290,7 +1289,10 @@ in_lltable_new(const struct sockaddr *l3 lle->base.lle_refcnt = 1; lle->base.lle_free = in_lltable_free; LLE_LOCK_INIT(&lle->base); - return &lle->base; + callout_init_rw(&lle->base.la_timer, &lle->base.lle_lock, + CALLOUT_RETURNUNLOCKED); + + return (&lle->base); } #define IN_ARE_MASKED_ADDR_EQUAL(d, a, m) ( \ @@ -1306,6 +1308,7 @@ in_lltable_prefix_free(struct lltable *l int i; size_t pkts_dropped; + IF_AFDATA_WLOCK(llt->llt_ifp); for (i = 0; i < LLTBL_HASHTBL_SIZE; i++) { LIST_FOREACH_SAFE(lle, &llt->lle_head[i], lle_next, next) { /* @@ -1315,17 +1318,15 @@ in_lltable_prefix_free(struct lltable *l if (IN_ARE_MASKED_ADDR_EQUAL(satosin(L3_ADDR(lle)), pfx, msk) && ((flags & LLE_STATIC) || !(lle->la_flags & LLE_STATIC))) { - int canceled; - - canceled = callout_drain(&lle->la_timer); LLE_WLOCK(lle); - if (canceled) + if (callout_stop(&lle->la_timer)) LLE_REMREF(lle); pkts_dropped = llentry_free(lle); ARPSTAT_ADD(dropped, pkts_dropped); } } } + IF_AFDATA_WUNLOCK(llt->llt_ifp); } @@ -1457,11 +1458,12 @@ in_lltable_lookup(struct lltable *llt, u lle->lle_tbl = llt; lle->lle_head = lleh; + lle->la_flags |= LLE_LINKED; LIST_INSERT_HEAD(lleh, lle, lle_next); } else if (flags & LLE_DELETE) { if (!(lle->la_flags & LLE_IFADDR) || (flags & LLE_IFADDR)) { LLE_WLOCK(lle); - lle->la_flags = LLE_DELETED; + lle->la_flags |= LLE_DELETED; EVENTHANDLER_INVOKE(lle_event, lle, LLENTRY_DELETED); LLE_WUNLOCK(lle); #ifdef DIAGNOSTIC Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Thu Aug 2 13:20:44 2012 (r238989) +++ head/sys/netinet6/in6.c Thu Aug 2 13:57:49 2012 (r238990) @@ -2497,23 +2497,22 @@ in6_lltable_prefix_free(struct lltable * * (flags & LLE_STATIC) means deleting all entries * including static ND6 entries. */ + IF_AFDATA_WLOCK(llt->llt_ifp); for (i = 0; i < LLTBL_HASHTBL_SIZE; i++) { LIST_FOREACH_SAFE(lle, &llt->lle_head[i], lle_next, next) { if (IN6_ARE_MASKED_ADDR_EQUAL( - &((struct sockaddr_in6 *)L3_ADDR(lle))->sin6_addr, - &pfx->sin6_addr, - &msk->sin6_addr) && - ((flags & LLE_STATIC) || !(lle->la_flags & LLE_STATIC))) { - int canceled; - - canceled = callout_drain(&lle->la_timer); + &satosin6(L3_ADDR(lle))->sin6_addr, + &pfx->sin6_addr, &msk->sin6_addr) && + ((flags & LLE_STATIC) || + !(lle->la_flags & LLE_STATIC))) { LLE_WLOCK(lle); - if (canceled) + if (callout_stop(&lle->la_timer)) LLE_REMREF(lle); llentry_free(lle); } } } + IF_AFDATA_WUNLOCK(llt->llt_ifp); } static int @@ -2605,11 +2604,12 @@ in6_lltable_lookup(struct lltable *llt, lle->lle_tbl = llt; lle->lle_head = lleh; + lle->la_flags |= LLE_LINKED; LIST_INSERT_HEAD(lleh, lle, lle_next); } else if (flags & LLE_DELETE) { if (!(lle->la_flags & LLE_IFADDR) || (flags & LLE_IFADDR)) { LLE_WLOCK(lle); - lle->la_flags = LLE_DELETED; + lle->la_flags |= LLE_DELETED; LLE_WUNLOCK(lle); #ifdef DIAGNOSTIC log(LOG_INFO, "ifaddr cache = %p is deleted\n", lle); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-net@FreeBSD.ORG Fri Aug 3 04:30:14 2012 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5C91106564A for ; Fri, 3 Aug 2012 04:30:14 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id CED0F8FC0C for ; Fri, 3 Aug 2012 04:30:14 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q734UESt071053 for ; Fri, 3 Aug 2012 04:30:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q734UEVD071052; Fri, 3 Aug 2012 04:30:14 GMT (envelope-from gnats) Date: Fri, 3 Aug 2012 04:30:14 GMT Message-Id: <201208030430.q734UEVD071052@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: HASHI Hiroaki (=?iso-2022-jp?B?GyRCNjYbKEIgGyRCOSg+NBsoQg==?=) Cc: Subject: Re: kern/169620: [ng] [pf] ng_l2tp incoming packet bypass pf firewall X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "HASHI Hiroaki \(=?iso-2022-jp?B?GyRCNjYbKEIgGyRCOSg+NBsoQg==?=\)" List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Aug 2012 04:30:15 -0000 The following reply was made to PR kern/169620; it has been noted by GNATS. From: HASHI Hiroaki (=?iso-2022-jp?B?GyRCNjYbKEIgGyRCOSg+NBsoQg==?=) To: longwitz@incore.de Cc: bug-followup@freebsd.org Subject: Re: kern/169620: [ng] [pf] ng_l2tp incoming packet bypass pf firewall Date: Fri, 03 Aug 2012 12:39:15 +0900 (JST) Hi. In "Re: kern/169620: [ng] [pf] ng_l2tp incoming packet bypass pf firewall" at Thu, 02 Aug 2012 19:20:48 +0900 (JST) HASHI Hiroaki wrote: > In "Re: kern/169620: [ng] [pf] ng_l2tp incoming packet bypass pf firewall" at Thu, 02 Aug 2012 10:39:20 +0200 > Andreas Longwitz wrote: >> Hi, >>> PF firewall does not examine incomming packet on ng_l2tp interface. >> >> If your incoming packets are handled by IPSec before ng_l2tp your >> problem is explained in > > Yes, handled by IPSec. > >> >> lists.freebsd.org/pipermail/freebsd-net/2012-January/031161.html > > I will try it. This patch work fine for me. From owner-freebsd-net@FreeBSD.ORG Fri Aug 3 08:02:11 2012 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 816981065670; Fri, 3 Aug 2012 08:02:11 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 52CEE8FC12; Fri, 3 Aug 2012 08:02:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q7382BSX008401; Fri, 3 Aug 2012 08:02:11 GMT (envelope-from glebius@freefall.freebsd.org) Received: (from glebius@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q7382Bmt008395; Fri, 3 Aug 2012 08:02:11 GMT (envelope-from glebius) Date: Fri, 3 Aug 2012 08:02:11 GMT Message-Id: <201208030802.q7382Bmt008395@freefall.freebsd.org> To: eric_van_gyzen@dell.com, glebius@FreeBSD.org, freebsd-net@FreeBSD.org, glebius@FreeBSD.org From: glebius@FreeBSD.org Cc: Subject: Re: kern/165863: [panic] [netinet] [patch] in_lltable_prefix_free() races with lla_lookup() and arptimer() X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Aug 2012 08:02:11 -0000 Synopsis: [panic] [netinet] [patch] in_lltable_prefix_free() races with lla_lookup() and arptimer() State-Changed-From-To: open->patched State-Changed-By: glebius State-Changed-When: Fri Aug 3 08:01:48 UTC 2012 State-Changed-Why: Fix committed to head/. Responsible-Changed-From-To: freebsd-net->glebius Responsible-Changed-By: glebius Responsible-Changed-When: Fri Aug 3 08:01:48 UTC 2012 Responsible-Changed-Why: Fix committed to head/. http://www.freebsd.org/cgi/query-pr.cgi?pr=165863 From owner-freebsd-net@FreeBSD.ORG Fri Aug 3 16:19:43 2012 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 29DF5106566B for ; Fri, 3 Aug 2012 16:19:43 +0000 (UTC) (envelope-from vijju.singh@gmail.com) Received: from mail-gg0-f182.google.com (mail-gg0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id DD30F8FC0A for ; Fri, 3 Aug 2012 16:19:42 +0000 (UTC) Received: by ggnk4 with SMTP id k4so1244988ggn.13 for ; Fri, 03 Aug 2012 09:19:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=vh8LMVnd5Pvh3hOac4CkeHY8GqJnO1NMtSmUQL4L+So=; b=dHWqQFJoaM9CJztW4hDFrpBfY1RmXUqiEU1nzuLAUhwk2Viu3H8lpPBxQKtvmdYWC7 A94tX7I6Fy1GwFwzx5nMTPu9BIV15ln8xtKIGpFn2NnuqM29CWbl+2mee4xdDpeBlImp siJ6ow4me2aGJJO2LPBLat5DjBY6HoJn48cA0I6xDFduWBk+WLvzjp8oRO1zrpe+tY0/ f6X51atYMRPW8+iGUEIwpYGPRfNN2vpVlmFyQaUFvtpUQvVBKp/CGAXpWOe82E5Nagt7 of/YIz6au3LqeCyQ8lWDTFrqZ59RTEliNKyQGy9qDHVlJRpP9hmfQySHnSpNa+7PpmIR +PVA== MIME-Version: 1.0 Received: by 10.66.74.100 with SMTP id s4mr289550pav.27.1344010781900; Fri, 03 Aug 2012 09:19:41 -0700 (PDT) Received: by 10.142.173.15 with HTTP; Fri, 3 Aug 2012 09:19:41 -0700 (PDT) Date: Fri, 3 Aug 2012 09:19:41 -0700 Message-ID: From: Vijay Singh To: net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: question in ixgbe_legacy_irq X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Aug 2012 16:19:43 -0000 Folks, the ixgbe_legacy_irq() interrupt handler kicks the taskqueue if there is more rx or tx. 1440 if (more_rx || more_tx) 1441 taskqueue_enqueue(que->tq, &que->que_task); But then it enables interrupts unconditionally: 1454 1455 ixgbe_enable_intr(adapter); Is this correct? -vijay From owner-freebsd-net@FreeBSD.ORG Fri Aug 3 16:46:22 2012 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B3811065673 for ; Fri, 3 Aug 2012 16:46:22 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id B4B288FC24 for ; Fri, 3 Aug 2012 16:46:21 +0000 (UTC) Received: by vbmv11 with SMTP id v11so1089055vbm.13 for ; Fri, 03 Aug 2012 09:46:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=w0LU1Sk1P8XeY9VwIjrm+dwT9p9pMuAFtGjlGpOuPx8=; b=Hf1tBbvM8oFCUYOmORZv39qnc/9zBHlJ7BzXKlwFVl0oV2t+EA9ko/od83eIt5vsjU YQTC6OsgCxbsPmSNWYZSww6GnztfSFcU6UsAtAByl8PZQZsQqWIQvXQws894U7Ju8WOA g5m1pHH7S8vWGoGheWlqtsM0WzJn350c4fwdm3OiXmwnqcJORMDMGM2r2KCsbFkugNtR 2MOiGHxpNYQ7f2kfFzwtN84rLH6Ah2RdZtFnz6dzsIAxUUwlvUT0xtWDgk63bq1q4ud2 yc4GrQRcSKSE9To4tz8qKdpngw7qbnFtdNEWOxKsxzUFO2Fn4tcuLkD8Eh26xO/aOWRj iZlg== MIME-Version: 1.0 Received: by 10.52.23.107 with SMTP id l11mr1630277vdf.6.1344012380730; Fri, 03 Aug 2012 09:46:20 -0700 (PDT) Received: by 10.58.187.225 with HTTP; Fri, 3 Aug 2012 09:46:20 -0700 (PDT) In-Reply-To: References: Date: Fri, 3 Aug 2012 09:46:20 -0700 Message-ID: From: Jack Vogel To: Vijay Singh Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: net@freebsd.org Subject: Re: question in ixgbe_legacy_irq X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Aug 2012 16:46:22 -0000 No, that's probably wrong, but was not noticed because the legacy interrupt path has been unused. The only time I've ever used it was during initial development and debug :) I'm taking the day off, but I'll take a closer look at the code shortly. Jack On Fri, Aug 3, 2012 at 9:19 AM, Vijay Singh wrote: > Folks, the ixgbe_legacy_irq() interrupt handler kicks the taskqueue if > there is more rx or tx. > > > 1440 if (more_rx || more_tx) > 1441 taskqueue_enqueue(que->tq, &que->que_task); > > But then it enables interrupts unconditionally: > > 1454 > 1455 ixgbe_enable_intr(adapter); > > Is this correct? > > -vijay > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > From owner-freebsd-net@FreeBSD.ORG Sat Aug 4 16:43:37 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECA66106564A for ; Sat, 4 Aug 2012 16:43:37 +0000 (UTC) (envelope-from bthcom@higonnet.net) Received: from smtp2-g21.free.fr (smtp2-g21.free.fr [IPv6:2a01:e0c:1:1599::11]) by mx1.freebsd.org (Postfix) with ESMTP id 0341E8FC0A for ; Sat, 4 Aug 2012 16:43:35 +0000 (UTC) Received: from freebsd.higonnet.net (unknown [82.238.41.134]) by smtp2-g21.free.fr (Postfix) with ESMTP id DAE964B00BB for ; Sat, 4 Aug 2012 18:43:29 +0200 (CEST) Received: from [192.168.4.17] (unknown [192.168.4.17]) by freebsd.higonnet.net (Postfix) with ESMTP id 6E3AF284B8 for ; Sat, 4 Aug 2012 18:44:38 +0200 (CEST) Message-ID: <501D5147.9070905@higonnet.net> Date: Sat, 04 Aug 2012 18:43:51 +0200 From: Bernard Higonnet User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: freebsd-net@freebsd.org References: <501696C6.4040208@higonnet.net> <5017806A.8050608@norma.perm.ru> In-Reply-To: <5017806A.8050608@norma.perm.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Uanble to use mpd5 as a gateway VPN, FreeBSD - solved X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Aug 2012 16:43:38 -0000 On 31/07/2012 08:51, Eugene M. Zheganin wrote: > Hi. > > On 30.07.2012 20:14, Bernard Higonnet wrote: >> Hello, >> >> Hope this is the right place to mail... >> >> I have two networks A and B. >> >> One machine on A runs an MPD5 server. >> >> On network B I have machine X which has an MPD5 client used to >> establish a connection the VPN server on machine Z in network A. Seems >> to work fine (ping, ssh, etc.). This machine is also set up as a >> gateway. When I look at the routing table, it looks OK, all references >> to A being sent to Z. >> >> On network B I also have machine Y. On this machine I have added a >> route which specifies that network A is to accessed via machine X. >> >> It would appear (sic) that requests from Y to a machine on A are >> received by that machine. However, nothing ever comes back. >> >> All these machines are running FreeBSD, 8 on Z, and 9.0 on X and Y. >> >> I'm hoping I have forgotten some very obvious thing which a kind soul >> will point out to me so I don't have to tcpdump everything all over >> the place... >> > So.... Z is an mpd, X is a client, Y is a machine behind a client. X > sees Z, Y doesn't see Z because Z isn't answering, however, Z sees > incoming packets. > My guess - Z doesn't know where is the B network, as when X is > exchanging packets with Z, it does it by using it's p2p-address. > > Try to see the output of 'route -n get ' on Z. > If I'm right - add a route, via bundle matching or via up-script, or > manually, or use nat on X. > > Eugene. > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" Yes, I had to route add B X Thanks Bernard Higonnet