From patchwork Sat Jun 16 08:36:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Richard via openwrt-devel X-Patchwork-Id: 930353 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="C33QCguS"; 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 4179gQ2H8Dz9s4V for ; Sat, 16 Jun 2018 18:36:18 +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=8PUlrBG20WMhaJv78EI4dYlGT2l+45LYJ5+bo69jT04=; b=C33QCguSE+QcnM5PqNebqDyDzO ZnxSEDv8VgHwJF0pAXuSlVEgCTp3viKv7UGwYuBwtXMUIqfJJycbbikA0Hy/H4LdLGewvgbfJgLLu rtZWhCapMsZhIarjE+Vzp24HEV3mVw5kfVvQ3dpnZoKMokzvt0JA/gzGhky+tT7BcNeJuQLcWWc5R BdL9UHOgHBN3+BcE3axIitMDPTEPj0BXp66tPj2aNEvI6sIr//FKr6aDhWcPpdE/fYEuN+DtMGCPz GJtd8c4WYwtEcFpA1PsJ5eeFVzerouuk34/QA/c7tDNCSdH1mhixf6e1wXd7R1Y//nsRfGhP7cRgI ChD5f8vA==; 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 1fU6gj-00028c-CH; Sat, 16 Jun 2018 08:36:01 +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: Thomas Richard 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 v2 1/2] lantiq: atm: fix ifx_atm driver integration Sender: "openwrt-devel" Date: Sat, 16 Jun 2018 08:36:01 +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 --- v2 - tweak to contributor credits, signed off by typo and a bit of original fix residue that was missed. .../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