From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 D359630BB81 for ; Wed, 28 Jan 2026 09:05:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769591150; cv=none; b=We5iNaJ6oN2FQ4u0wlRm8OFvQEzI7XTC6RqkjtirV1yb+2HiNyMsDfBzMFh67JYSOc//0iG2PMRE+VOW+qbsb12XK0SXWI/ZBA9G08mZbYvFtrlisjlVkZ27J4fLI8nZpRWhb9SwQLfcE2FTn7+XZ+n6VhjL1XHIbBAC7sgLEQ0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769591150; c=relaxed/simple; bh=vHvtxzPEXOaSc58IA9aVoKEeNSkoXrevYV133ucx2iA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=hq6sfuMIPzjwGJZZO9BUT/tcDMwb8MEUwhS+mkoKwiaLJfEz5JQsEvJCcCd7PEB3DWPgC6xJASU5QfR5DlXcq2dstsiO1bEGEG1O7EOm4/Zb66EUacLDapZ5o1l08tGfAxcnXw1/0UiN2ZlNFnzPod8jiypEnt7TVEeuVuQMzzE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=GS1Mee1z; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=LMQgQQXr; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="GS1Mee1z"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="LMQgQQXr" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769591147; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=v/j23iN+UkMbSN4vMrWrOPjNdDh2HD+7QDGW6v7K/og=; b=GS1Mee1z5qxnk0kbAznOu3A4HCfAHtKqXeFcJB1wJT7Qdlcz8HdcxgXV0vEh6+QxNUjPUf NFmDSuDXtSnq44+7vIDXqpLfupUz1cxcujA2ySGlXhE9JReoQZv8+7S1Se5pPfm/icLgzL oM0FHNzGjkpzejiZ/WXUFrruuDhN9ns= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-679-ysSd1b2GNNyDS8t4JQpHZQ-1; Wed, 28 Jan 2026 04:05:46 -0500 X-MC-Unique: ysSd1b2GNNyDS8t4JQpHZQ-1 X-Mimecast-MFC-AGG-ID: ysSd1b2GNNyDS8t4JQpHZQ_1769591145 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-477c49f273fso71107125e9.3 for ; Wed, 28 Jan 2026 01:05:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1769591145; x=1770195945; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=v/j23iN+UkMbSN4vMrWrOPjNdDh2HD+7QDGW6v7K/og=; b=LMQgQQXrHQOdsYfg9bQc9Bh3NSAs30ZUy+3eLTm4ndR43KaC/PvmN2fnBaloYp1Q49 iS0v7LLgrfOOk3aTdcqizXM7Q6ms+1T6GEK3a1VTLsxjFUzPhuOkw62wPyi3PfSb2oco NWGQsZbNDkFMG+cBpNR1cPNrp+a7hUgu1jFlfveQjfccUv5CqiFOkJR0S0yqPXZkPpx9 TdYUw9E0kaje/iTz4cl0v6srsJ1NloyHIDr+8Mdu+biJH85aNLTwjU8m6hxuyRaTdZpT rA4ttwxEpHBQmTsEDv97MY/4mGMZuH22bqbs9SRsVjeihIVFClpXZHXAGcQFXb4C+0Rd MbiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769591145; x=1770195945; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=v/j23iN+UkMbSN4vMrWrOPjNdDh2HD+7QDGW6v7K/og=; b=iR5/LB978EAAVHFMAFp2gI+q42z7oxsqwhiy+bhyjkeZl5wSBxLxE78yxe+VGqJ+bk L6JjjDzoHr3rw+wYTjIFaCnQtQnzFms6Gcamb3yOGj0hNacbOHTSJ9SFi5Tv0Ea7TEqe F2Bqztcyd5Hnph8THt0KfQp+pVa3RqDU3EOwwfQxlTr0jg+uip2DqCqTzfN+WTBumdxd doynBEq8w7JJrqzVMORt4aHo0+pVy3+6mo3RWmiqk2zrgNgO1qWQwKY8GHAK2J1ydUva zv5pmlLLhWDi4sTEd/nPuGsR7pjzET3YuGSZABScvRkPfYGaRFz1GGEAczRABp/tFR6m QOaA== X-Forwarded-Encrypted: i=1; AJvYcCXvXjFiLW64wSqN883iCUJ5xnaiXNctBQaVVBen5fyd+tKRGVdzKZMWju4bHK7LracIsXNQPAj4JVSI4dE=@vger.kernel.org X-Gm-Message-State: AOJu0YxM04pnFJXZnl+r82X/PaKNgxmnMvzCttRd+aCDS0n/pWjQgElU CEQVNyPRiF9szxRNPE0OKIr0gNPJ9qvoK4zjBkDBYw8IHAY1p/m+0GIcrKA1nNBVemYjAhovPrj OpyVLqPsJK078Wi4xg87GJSgJXvRKCwqalD2P6werpNkBTz3f3mAXWGC5UbyFVm2qQQ== X-Gm-Gg: AZuq6aIy01ePvgviJgBApV1OsLOCmxg0gdGD310N+Eig7eR+m+pk3NcNlETdGVUOmL5 1YU4D2i/BnvFdKKS5Q9bzn07IB+i+aVBWw0BdtC5wsqlcBFXB/lPTLooinoFo4uiApj26RSscPo 88LwLEd6qxcymfFYixBBp/+r1S7LVKCErnAtsktqJIfecWrfSebycDPYAEuH1E1MZQQFUVrADi5 u8Nxl5VC2VWdtdmIG/1elDPN1dABdMRM2W8ZWsgxg8Ud9CimJ/xfcwt9Mv79hayeyFm0U5x3t4I 9K/nePtI/L1NaYI9U6TBNQkQjd+/KOAJ69KihiO6Sv6hc8VQpnx70QJxFNAvPyCiQhATihmMnUO 0a/i3unb3D/6p X-Received: by 2002:a05:600c:8211:b0:480:4c45:aff5 with SMTP id 5b1f17b1804b1-48069c755e6mr50508615e9.34.1769591145055; Wed, 28 Jan 2026 01:05:45 -0800 (PST) X-Received: by 2002:a05:600c:8211:b0:480:4c45:aff5 with SMTP id 5b1f17b1804b1-48069c755e6mr50508385e9.34.1769591144647; Wed, 28 Jan 2026 01:05:44 -0800 (PST) Received: from [192.168.88.32] ([212.105.153.56]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4806cdd77b8sm50526305e9.3.2026.01.28.01.05.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Jan 2026 01:05:43 -0800 (PST) Message-ID: <53ce393d-7071-40d8-b57e-df14405066ca@redhat.com> Date: Wed, 28 Jan 2026 10:05:42 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next v3] ppp: enable TX scatter-gather To: Qingfang Deng Cc: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , linux-ppp@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?Q?Toke_H=C3=B8iland-J=C3=B8rgensen?= References: <20260123014214.225278-1-dqfext@gmail.com> Content-Language: en-US From: Paolo Abeni In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 1/27/26 3:31 PM, Qingfang Deng wrote: > Hi Paolo, > > On Tue, Jan 27, 2026 at 8:34 PM Paolo Abeni wrote: >> I spent a little time trying to understanding the logic here and I think >> that enabling features depending on IFF_NO_QUEUE is fragile at best. >> >> It looks like that the IFF_NO_QUEUE bit is an inconsistent state for >> multilink devices using different type of channels. >> Moreover the user-space could attaching a qdisc to the ppp device after >> channel initialization. >> >> Instead you could always expose the features and linearize as needed >> when transmitting on !direct_xmit channel; no need to touch the >> individual channel implementation, you could do such check before >> calling the ops->start_xmit() calls (possibly creating a new >> wrapper/helper for that). > > Attaching a new qdisc won't clear the IFF_NO_QUEUE bit. (The flag > means the interface _can_ run without a qdisc). Correct. > As for multilink devices, one is not supposed to bundle channels with > inconsistent direct_xmit (for example, mix ppp_synctty with pptp) and > expect better results. But as the driver does not reject that, I may > add a skb_linearize() to ppp_mp_explode(), or add a check for > SC_MULTILINK flag in ppp_fix_features(). > > What do you think? AFAICS nothing prevent the user-space from creating multiple channels with different type even without SC_MULTILINK, so ppp_fix_features() should likely check the whole channel list. Also packets could be being transmitted after channel creation and before the features are updated, so ppp_start_xmit could observe transient mismatching features and skb layout. It's not a matter of bad performances: if skb is not linear and the channel start_xmit assumes linear layout bad things will happen. I think that even with a correct ppp_fix_features() you will need to check for linearization in the datapath (as an unlikely condition). /P