Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1732454lql; Wed, 13 Mar 2024 06:53:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUOZgfTodWBn4jGEX9Sva+4Oo0TQPZ64c4WusH7l5hS2IZFSUloG0xnQta3+5sI0Fy0d3FWWILoujoc9UjNgLSCBrzINjdDAnGwAVxLJg== X-Google-Smtp-Source: AGHT+IG+8WcGg3Jgxpu3xA3yMvNRGB28I4GgZRTPcDNRGvDQGdlwtC80hofeF3wELy8MH9iX5PSd X-Received: by 2002:a05:6a00:1a89:b0:6e5:fb97:ed35 with SMTP id e9-20020a056a001a8900b006e5fb97ed35mr2713028pfv.18.1710338031588; Wed, 13 Mar 2024 06:53:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710338031; cv=pass; d=google.com; s=arc-20160816; b=TC3Z/SPdcBlfqGojM6PKCKnOk4uDTIobhxgN/N0sisnP6ZSdofDmewQZv1+51iHN4+ j05xu5iYxwVAmW5cQd4gZpapFJ/F3eeon2chaiEAJjUGOvMpW9XmN965f5th3wRl8GC/ vZRngp4N7A2EZ9cg5UFLHykIwCH1TNAQajO0dtX/aSAgPi8K5zkczpa2Adexsge9jBGu AG8WhZvUetbNx2v6RZu4bGKZveRieg74fGV0jzMimwpHdwlyb1sQ2PT5EBjXrpsgcjyG gh2x+LNorNdpidTpB6jkrN/oTUfsssTzuXYYH8RAughy/80voPmWQcx+1WJPGaBIkvFg ErUQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:feedback-id:dkim-signature :dkim-signature; bh=hlJNMnPDZ47iGewL2R5tNcfmY0Ncoyko7ICHGM78HtI=; fh=gQKk/zQ1uJLcYvPO94qCHvYD13ZbkhA+0BzRttKyiPw=; b=go4G9y3FEx3BK/vl67ugCqqS/HDEU23/prXEHnHLLSVCCFkPn9vKu0fO62iVIJ1Scb 2O8rcZ/5NYo7oCN2ni5pEQzskXFbPMUS3FpQG0M1pTrNZ+5rKWxj1GnmKVystWVne+7+ jvGCk7e0EmvUaE6fNSXj0pz38CbBjNdNGPIhXfoe+vsC9pUmZ1Mcn4eG1Qzo4Lg7A6IK wGCMAJ4l2Tw2fVuASy67Um+gaDf9Kszx+eu+sCOeRnV3m3+GbQPXxBqcb88EzRlEY8PL S7ZDx7H4CEYI+SYr5fEYZSP4w4h1pBFRCLYu01P8jBdcqR/PRbyCHLoJaHj3hLlk3r3n +Q4A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@yotsuba.nl header.s=fm3 header.b="Z4/lruuK"; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=kTiGgZnV; arc=pass (i=1 spf=pass spfdomain=yotsuba.nl dkim=pass dkdomain=yotsuba.nl dkim=pass dkdomain=messagingengine.com); spf=pass (google.com: domain of linux-kernel+bounces-101565-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101565-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id l8-20020a056a00140800b006e5a9292cd3si9022429pfu.295.2024.03.13.06.53.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 06:53:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-101565-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@yotsuba.nl header.s=fm3 header.b="Z4/lruuK"; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=kTiGgZnV; arc=pass (i=1 spf=pass spfdomain=yotsuba.nl dkim=pass dkdomain=yotsuba.nl dkim=pass dkdomain=messagingengine.com); spf=pass (google.com: domain of linux-kernel+bounces-101565-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101565-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1FAA0287A54 for ; Wed, 13 Mar 2024 13:53:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 346E643AD1; Wed, 13 Mar 2024 13:53:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=yotsuba.nl header.i=@yotsuba.nl header.b="Z4/lruuK"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="kTiGgZnV" Received: from wfhigh1-smtp.messagingengine.com (wfhigh1-smtp.messagingengine.com [64.147.123.152]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B9D5D3FB96; Wed, 13 Mar 2024 13:53:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.152 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710338022; cv=none; b=dczPnopUrW2W+Hdyjp3zeEE/9MsA/xYnPmsKyAdzYLqbhvFKqa5XWwn7cctklKGYdQiKRKCewb/JWNF4x0ABG/y2aEXH7yQmbuPPDHj9PLxSV1YM/PcOPJ/dscglHgCDLbOIJdwOruEDI7MtuwJagGAsI4npmeMsfMCLO2GQWtw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710338022; c=relaxed/simple; bh=jOmLX9ygpmZOCRGB3UnwkgJ3dC6PNOA9d5iZ5hUwSno=; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc: Message-Id:References:To; b=eKDCQS7S5x12fVXR8zM25EyURfhjschq5FgEVO/5pIfluaT0CMaYxvuKDyAuxIf8DpoMYhNi0tDV23RynEbrqtgUoXoqHdSgnm5bfwPmFVPlsHr1T7KRbGaD5GUACRcVCOSdc+r90A8iOqkbyPorkfrA6WbUZZx2DMyOZFYE3zU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=yotsuba.nl; spf=pass smtp.mailfrom=yotsuba.nl; dkim=pass (2048-bit key) header.d=yotsuba.nl header.i=@yotsuba.nl header.b=Z4/lruuK; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=kTiGgZnV; arc=none smtp.client-ip=64.147.123.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=yotsuba.nl Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=yotsuba.nl Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfhigh.west.internal (Postfix) with ESMTP id 9D0291800179; Wed, 13 Mar 2024 09:53:37 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Wed, 13 Mar 2024 09:53:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yotsuba.nl; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1710338017; x=1710424417; bh=hlJNMnPDZ47iGewL2R5tNcfmY0Ncoyko7ICHGM78HtI=; b= Z4/lruuKIlDPERzDJJKOi47zVhtM07JblQBSOg/x1KOj64WuSuVs+ZwEHwaNKVCE PvBcH1atP8EzMsH/I6L2OHwOdyYiR6HRFlzeoGGNd5NlW/SeJhNPQH2Iw1QAuQNm RJS61lGMLY30GfbbQHln0yu2wdF98lwH0mBFcvWBukALOhtk3IRRsLN+DlhYLjHb qFWoVbjOlZobQTQ1ckABWDZNQun5//NhQuEBTAuMFWsYknHoGnf0ZFT9U+fmCMXa GlqjxLkXHcbGBekRzD0L2djv+I9NlqUsdJBlIRe2uDaoh1rldsQqr4Zj4jfap52W 5DX7ELjKEykC6bxH2YHr6A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1710338017; x= 1710424417; bh=hlJNMnPDZ47iGewL2R5tNcfmY0Ncoyko7ICHGM78HtI=; b=k TiGgZnVa9MBX8K1GO3PvlKjJz9UvRRqGLnzhq78PKh27BZ/2dI9Pgs79lzkADe8I 2vcCnYb2MeN5weAgd3MVepWVKXEusr/pp4iIojp9ZuwPA28wwoidFNbCbil2tJ20 gGitIXS7OgnUmK82WUTZ4lSDnagfJmxpmflL0gLzBL+GIRIDV5UrHYgl+ZuopMmv A6MQRvGkjdmtHAJjyIetLUck8TruyNvZwdl/7X8k9+cDGzi1woMPhY3hg6VfecAf j+ka1/UEkRnOqaQtIbjSg4l4X5FM1+S1Myrkg1G2jkd4FzZ7YXOdM8G5Zu0qgjEm ld/xatpNm7BX7Akx5dn2w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrjeehgdehiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpegtggfuhfgjffevgffkfhfvofesthhqmhdthhdtjeenucfhrhhomhepofgrrhhk uceomhgrrhhkseihohhtshhusggrrdhnlheqnecuggftrfgrthhtvghrnhephfffjeefje eutedvjeekleduteettdehkeeugefgjedvgfevteffffeukefggedtnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgrrhhkseihohhtshhusg grrdhnlh X-ME-Proxy: Feedback-ID: i85e1472c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 13 Mar 2024 09:53:35 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.300.61.1.2\)) Subject: Re: [PATCH] netpoll: support sending over raw IP interfaces From: Mark In-Reply-To: <20240313133602.GA1263314@maili.marvell.com> Date: Wed, 13 Mar 2024 14:53:23 +0100 Cc: netdev@vger.kernel.org, Hans de Goede , Eric Dumazet , Jakub Kicinski , Breno Leitao , Ingo Molnar , "David S. Miller" , Paolo Abeni , linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Message-Id: <7C42FC4B-D803-4194-8FBB-19A432D37124@yotsuba.nl> References: <20240313124613.51399-1-mark@yotsuba.nl> <20240313133602.GA1263314@maili.marvell.com> To: Ratheesh Kannoth X-Mailer: Apple Mail (2.3774.300.61.1.2) Hi Ratheesh, > Op 13 mrt 6 Reiwa, om 14:36 heeft Ratheesh Kannoth = het volgende geschreven: >=20 > On 2024-03-13 at 18:16:13, Mark Cilissen (mark@yotsuba.nl) wrote: >> [=E2=80=A6] > Taking an assumption based on dev=E2=80=99s lower layer does not look = to be good. > why not transmit packet from skb_network_header() in your driver (by = making > changes in your driver) There=E2=80=99s two assumptions at play here: - The lower layer is ethernet: this has always been present in netpoll, = and is even documented in netconsole.rst. This comment just mentions it because we = add a way to bypass the assumption; it is not an assumption this patch adds to = the code. - hard_header_len=3D=3D0 means that there is no exposed link layer: this = is a rather conservative assumption in my opinion, and is also mentioned in the = definition of LL_RESERVED_SPACE: > * Alternative is: > * dev->hard_header_len ? (dev->hard_header_len + > * (HH_DATA_MOD - 1)) & ~(HH_DATA_MOD - 1) : = 0 The same assumption is also made in more places in the core network = code, like af_packet: > - If the device has no dev->header_ops->create, there is no LL = header > visible above the device. In this case, its hard_header_len should = be 0. > The device may prepend its own header internally. In this case, = its > needed_headroom should be set to the space needed for it to add = its > internal header. I could change it to, like af_packet, check `dev->header_ops` instead if = that is preferred, but I don=E2=80=99t think that patching every single raw IP driver to = deal with skbs that managed to somehow have link layer data would be preferred here, especially = since netpoll is kind of a special case to begin with. I am open to suggestions and ideas, = though. > [=E2=80=A6] Thanks and regards, Mark=