From owner-freebsd-mips@freebsd.org Tue Jul 31 13:45:52 2018 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C114E105ABA1 for ; Tue, 31 Jul 2018 13:45:52 +0000 (UTC) (envelope-from mail.gery@gmail.com) Received: from mail-it0-x234.google.com (mail-it0-x234.google.com [IPv6:2607:f8b0:4001:c0b::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 58A908B897; Tue, 31 Jul 2018 13:45:52 +0000 (UTC) (envelope-from mail.gery@gmail.com) Received: by mail-it0-x234.google.com with SMTP id h20-v6so4411935itf.2; Tue, 31 Jul 2018 06:45:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=pS607VOiPmB9jg/czJrdfJof/FEtfUSbuqVaKSLc+Qs=; b=JT9kGrR1Ysh9fy+3mJXbMnnQBOtm0DQKC6hZX0gJZWhbbojxyg2owoErIk/hphRNfF zX4Gk7um3yAVLZkxHPgXR0mmK88LxHLvQ+tjXikCanWy3g4cuw7Wj6eIeTFIoVgpTik+ 9+VgQpe8QHNcQE96THau8SOITOfv9fQnCUXK4Ba1NaQx4iihyOzNSMibo8csib/6cuP6 0SvW/eZiROhjZqSe5A9TJ7WEG5RTM5hVt2FS/5Z8HLdpu0IYQT5e9jo1ynEcpkhdT1Cp PFhUBUwlfBac5LkBzNvPA1bkgta35yJC4jcNkwd+wh9PPYHpBGXsBMsKBS5I428pJplB AEsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=pS607VOiPmB9jg/czJrdfJof/FEtfUSbuqVaKSLc+Qs=; b=fH2ctHipsKhKnFjwN+5amDI4DIunLnk1c3oEpFcdmn37BKllbnKAMCs7oLiDLu1svp aIhFDZhe4ipBoUZqS84qiV5SL7G1Pua8PiMn5rL5Zo59HtrkA8llOc83+L5JGhEYz5OQ qhHsTg0SerM5wjTGntozum5AClQ185k99e7MvmRHNlPvJ9UKyxOceDCaCrZWxZIGpL+6 UdSMz2t6fsrIyZefuJS5/CdK/XQjCZ5807peqYo3qiERkZTdBrewh/SPhH3cOgdrPsT3 Z+s3WRoQLBSeerilZDDPbwWwbchYzuhnmrCK8LpBWQo6I+dSF/qjTDLo72Rdkhrki3Mt 597A== X-Gm-Message-State: AOUpUlH2rENaj070F1AICYk2kwC1RuaAMHcGuV4RVNH2NeWfG1sO1xRX YpZ04KWRWPLAc4qe2esNc3WUIIfeTQpmoB3WMo46Zerm X-Google-Smtp-Source: AAOMgpfqPODn4XH1qNViJ0oXZwWS6NU1JlFv0vaZ4nWIctQ3u+ETjs2OSl/8kM6l7PKyJCKd7P2jg3a/RU1slICbRZs= X-Received: by 2002:a24:4511:: with SMTP id y17-v6mr3211317ita.67.1533044751420; Tue, 31 Jul 2018 06:45:51 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4f:c4ca:0:0:0:0:0 with HTTP; Tue, 31 Jul 2018 06:45:50 -0700 (PDT) From: Gergely Kiss Date: Tue, 31 Jul 2018 15:45:50 +0200 Message-ID: Subject: Possible arge driver bug - interrupt storm on int2 To: freebsd-mips@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2018 13:45:53 -0000 Hi, I'm working on improving the freebsd-wifi-build project to have an out-of-the-box gateway solution built on FreeBSD for SOHO routers. For more information, please see below link: https://github.com/kissg1988/freebsd-wifi-build I've created a build script that should simplify creating a build environment from scratch: https://github.com/kissg1988/freebsd-wifi-build/blob/buildscript/scripts/build.sh The goal is to make the distribution easy to build and use so it can be flashed just as simple as OpenWrt or DD-WRT. The device I'm working with is a TP-Link WN-1043ND v1.8 which has a Realtek RTL8366RB switch and is built around the AR9132 SoC. The board runs 11.2-RELEASE currently. The ethernet controller works perfectly with a static or DHCP provided IP address, however it seems something is wrong with the way the driver handles the TX queue in case 802.1Q tagging is in use and the system tries sending PPP frames over the tagged interface (eg. vlan2). Once ppp starts establishing the connection, packets to be sent are queued but not being transmitted by the controller and an interrupt storm is generated with only the TX_UNDERRUN flag set (without the TX_PKT_SENT flag). This might be related to an issue seen a few years back: https://lists.freebsd.org/pipermail/freebsd-mips/2015-October/004137.html As PPPoE has an 8-byte overhead and VLAN tagging needs an additional 4-byte field, I have lowered the MTU on arge0 and vlan2 to 1488 bytes but it didn't make any difference, the interrupt storm still happens and it's always reproducible. Once it starts, the only way to stop the storm is to bring down arge0. If I destroy the vlan interface, and put the WAN port to an access VLAN with no tagging, the PPPoE connection works fine. I'll make some more tests later today with -HEAD to see if it makes any difference. Any help or ideas would be much appreciated in the meantime. Thanks, Gergely