From patchwork Mon Jun 18 09:09:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gio--- via openwrt-devel X-Patchwork-Id: 930754 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=lists.openwrt.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bSEc5I8c"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 418QJh60tkz9s19 for ; Mon, 18 Jun 2018 19:09:24 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Date:Sender:Content-Type: Subject:List-Help:Reply-To:List-Archive:List-Unsubscribe:List-Subscribe:Cc: From:List-Post:List-Id:Message-ID:MIME-Version:To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=0Psee/C80EWWTZTtxWVP10I7hPgWyGnCIMDyyRc9j6E=; b=bSEc5I8cchEHtxJYZFosrHSl3I 3CTVCFifzI3oXdeR8UTg2TdS8OR4PPOi1Tt4W+rmU76x6umBWnx1XdQynAr/o9Vqa0udtFySgYZwl HGJZSyiW7/DNuG6B0Aw1wcAUYzcAP9HMRhETcWGLWf9WSkvKTjViioeq9NqahC4gbQZd2FccImKvP 8yrsRKChyEgZj0UK5ZPO6CURaYXvPlSj8LBo6nk96b8IozuDS08ddPjD1H4jAm8tEa5u/BnMjqZ4X ifJZMxC5cu4tgf7638rlEOaaQD3gmK/NRNGlyMmEl2q9Q8Fs0Dqk4X6souTi2eF6EH5giK9nD2nsX ClQFDP5A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fUq9t-0007Ie-Sn; Mon, 18 Jun 2018 09:09:09 +0000 To: openwrt-devel@lists.openwrt.org MIME-Version: 1.0 Message-ID: List-Id: List-Post: X-Patchwork-Original-From: Kevin Darbyshire-Bryant via openwrt-devel From: gio--- via openwrt-devel Precedence: list Cc: Kevin Darbyshire-Bryant X-Mailman-Version: 2.1.21 X-BeenThere: openwrt-devel@lists.openwrt.org List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: Kevin Darbyshire-Bryant List-Help: Subject: [OpenWrt-Devel] [PATCH] lantiq: atm: fix ifx_atm driver integration Sender: "openwrt-devel" Date: Mon, 18 Jun 2018 09:09:09 +0000 Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software. When upstream kernel introduced commit c55fa3cccbc2c672e7f118be8f7484e53a8e9e77 we incorrectly updated our hack integration patch that updates atm/common.c +++ b/net/atm/common.c @@ -62,10 +62,16 @@ static void vcc_remove_socket(struct soc write_unlock_irq(&vcc_sklist_lock); } +struct sk_buff* (*ifx_atm_alloc_tx)(struct atm_vcc *, unsigned int) = NULL; +EXPORT_SYMBOL(ifx_atm_alloc_tx); + static bool vcc_tx_ready(struct atm_vcc *vcc, unsigned int size) { struct sock *sk = sk_atm(vcc); + if (ifx_atm_alloc_tx != NULL) + return ifx_atm_alloc_tx(vcc, size) The correct solution is to drop our ifx_atm_alloc_tx replacement hack entirely and let the kernel do its thing. In reality neither pppoatm or BR2684 interfaces actually hit this code, so the incorrect integration would only be noticed with direct socket calls which we are unaware of a use-case. This is not the solution to pppoatm vc-mux failing to work which started the whole investigation, but let's fix it up anyway. With sincerest thanks to David Woodhouse & Mathias Kresin . Tested-on: lantiq, BT HomeHub 5a Signed-off-by: Kevin Darbyshire-Bryant --- .../patches-4.14/0004-MIPS-lantiq-add-atm-hack.patch | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/target/linux/lantiq/patches-4.14/0004-MIPS-lantiq-add-atm-hack.patch b/target/linux/lantiq/patches-4.14/0004-MIPS-lantiq-add-atm-hack.patch index 2c73cec55c..66ca2fd5ac 100644 --- a/target/linux/lantiq/patches-4.14/0004-MIPS-lantiq-add-atm-hack.patch +++ b/target/linux/lantiq/patches-4.14/0004-MIPS-lantiq-add-atm-hack.patch @@ -467,25 +467,6 @@ Signed-off-by: John Crispin struct atm_trafprm { unsigned char traffic_class; /* traffic class (ATM_UBR, ...) */ int max_pcr; /* maximum PCR in cells per second */ ---- a/net/atm/common.c -+++ b/net/atm/common.c -@@ -62,10 +62,16 @@ static void vcc_remove_socket(struct soc - write_unlock_irq(&vcc_sklist_lock); - } - -+struct sk_buff* (*ifx_atm_alloc_tx)(struct atm_vcc *, unsigned int) = NULL; -+EXPORT_SYMBOL(ifx_atm_alloc_tx); -+ - static bool vcc_tx_ready(struct atm_vcc *vcc, unsigned int size) - { - struct sock *sk = sk_atm(vcc); - -+ if (ifx_atm_alloc_tx != NULL) -+ return ifx_atm_alloc_tx(vcc, size); -+ - if (sk_wmem_alloc_get(sk) && !atm_may_send(vcc, size)) { - pr_debug("Sorry: wmem_alloc = %d, size = %d, sndbuf = %d\n", - sk_wmem_alloc_get(sk), size, sk->sk_sndbuf); --- a/net/atm/proc.c +++ b/net/atm/proc.c @@ -155,7 +155,7 @@ static void *vcc_seq_next(struct seq_fil