Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1098297pxa; Fri, 28 Aug 2020 03:46:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxf/b7hKs7uHAcdc50t8id0qZBU1/QIvAH4la6v/BtT+lWuaE72q3zR0vPxD99MJlcotFws X-Received: by 2002:a05:6402:339:: with SMTP id q25mr1114960edw.268.1598611586735; Fri, 28 Aug 2020 03:46:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598611586; cv=none; d=google.com; s=arc-20160816; b=EBcVpS6CH/cgvQRgG1XvBQmVegywVrnNHaAPpy/eAyvQbOAGBMMoSNlnIRESoaEnI9 wP9kueb73BHjHXRmdYQEpBZSStcmEmRxxY7r2MBiFOO2ybVYIrmqKNCT8MWLwKBopgtx lX6bd7m3hpC+675sfA3z6uWoh9mLYOTnJrOPl2sbWAQHX44JK8lF8ItYrrtlY5WU2gMi p26YD18cSAjy2bRHDPWyCBE2G8VDCH2bfMfNIftYNj3EAMxqCOjdlNsQ3iEgZGiSG8ag 1TB+EDTfnERpUbQT9KPbx1bqb9OPdlaQUpB5zY6QKd6owoHzBZG6BR/Uq4P8SvrFIvmW BUeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:in-reply-to:date:references:subject:cc:to:from :dkim-signature:dkim-filter; bh=mX0r45ob5AWEtdzdyfUiUKYeTekKi7l1NPoWWKilQlM=; b=PxfeuiWXyyb9gbaQCZis7+sByPJZBPXk+WFZUclL2M/EywnnIwKtTsfo0AhW67YKRY Pomb9ZhD99KkauFpodwtkFhpRzX5Ahp7ZjaI27pwx4HkYC/qblpdYuuwC1YmZ44PXDRU XMPrvTwInptm4lXuLhwzY0KC5OOrNYura5QcTeKPYpzE7uoXRo5/GwKxXuvFAb1Lqz1x d2Jx1kDOUZojv1445XodAm67llJnIu6LGxNAXsY1DYZRk+x245yVC3euOFUr/vVTB1hT iwi1Gjem0cj6XeSWRdCHrrAnXmCE4KrKaZsx0wV+sqbIupLCHQYV3gaQvyie7KK7QgAz Civg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@piap.pl header.s=mail header.b=OoDPMwtJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=piap.pl Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u7si386361ejn.161.2020.08.28.03.46.03; Fri, 28 Aug 2020 03:46:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@piap.pl header.s=mail header.b=OoDPMwtJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=piap.pl Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729028AbgH1KnS (ORCPT + 99 others); Fri, 28 Aug 2020 06:43:18 -0400 Received: from ni.piap.pl ([195.187.100.5]:41266 "EHLO ni.piap.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728218AbgH1KnO (ORCPT ); Fri, 28 Aug 2020 06:43:14 -0400 X-Greylist: delayed 330 seconds by postgrey-1.27 at vger.kernel.org; Fri, 28 Aug 2020 06:43:12 EDT Received: from t19.piap.pl (OSB1819.piap.pl [10.0.9.19]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ni.piap.pl (Postfix) with ESMTPSA id 0E631442480; Fri, 28 Aug 2020 12:37:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 ni.piap.pl 0E631442480 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=piap.pl; s=mail; t=1598611058; bh=mX0r45ob5AWEtdzdyfUiUKYeTekKi7l1NPoWWKilQlM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=OoDPMwtJFpQc2LrfhaaKDD+q447F4tx4ZJIgcWgin8MXQFyoe/ma+LcEzzIaf0pkR bFoLkUIoCJ9LpCjRDDPiALP5H+B6obenk7u2NHdYrUemrqSsxY8lkWIXacpxh55Vyo KTRPVV7xsjc2BjcBmM/h+1+HMgxj81wqtrNwFIw8= From: =?utf-8?Q?Krzysztof_Ha=C5=82asa?= To: Xie He Cc: "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Martin Schiller Subject: Re: [PATCH net] drivers/net/wan/hdlc_cisco: Add hard_header_len References: <20200828070752.54444-1-xie.he.0141@gmail.com> Date: Fri, 28 Aug 2020 12:37:37 +0200 In-Reply-To: <20200828070752.54444-1-xie.he.0141@gmail.com> (Xie He's message of "Fri, 28 Aug 2020 00:07:52 -0700") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-KLMS-Rule-ID: 4 X-KLMS-Message-Action: skipped X-KLMS-AntiSpam-Status: not scanned, whitelist X-KLMS-AntiPhishing: not scanned, whitelist X-KLMS-AntiVirus: Kaspersky Security 8.0 for Linux Mail Server, version 8.0.1.721, not scanned, whitelist Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Xie, Xie He writes: > This driver didn't set hard_header_len. This patch sets hard_header_len > for it according to its header_ops->create function. BTW it's 4 bytes long: struct hdlc_header { u8 address; u8 control; __be16 protocol; }__packed; OTOH hdlc_setup_dev() initializes hard_header_len to 16, but in this case I guess 4 bytes are better. Acked-by: Krzysztof Halasa > Cc: Martin Schiller > Signed-off-by: Xie He > --- > --- a/drivers/net/wan/hdlc_cisco.c > +++ b/drivers/net/wan/hdlc_cisco.c > @@ -370,6 +370,7 @@ static int cisco_ioctl(struct net_device *dev, struct= ifreq *ifr) > memcpy(&state(hdlc)->settings, &new_settings, size); > spin_lock_init(&state(hdlc)->lock); > dev->header_ops =3D &cisco_header_ops; > + dev->hard_header_len =3D sizeof(struct hdlc_header); > dev->type =3D ARPHRD_CISCO; > call_netdevice_notifiers(NETDEV_POST_TYPE_CHANGE, dev); > netif_dormant_on(dev); --=20 Krzysztof Halasa Sie=C4=87 Badawcza =C5=81ukasiewicz Przemys=C5=82owy Instytut Automatyki i Pomiar=C3=B3w PIAP Al. Jerozolimskie 202, 02-486 Warszawa