Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp4581480pxy; Tue, 27 Apr 2021 08:10:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzTnGPS6385nfYxSirVnLmlVY4hI9uqivAKmHEQmoShFbhhf37a9H9CJjt/fVn8rWfkeut X-Received: by 2002:a17:90b:3852:: with SMTP id nl18mr5305864pjb.119.1619536232411; Tue, 27 Apr 2021 08:10:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619536232; cv=none; d=google.com; s=arc-20160816; b=lJ9+hJ5Gq7WodNdRorIQ3CD9uHJIoUJDUrXbNvo0qufStGZxM4ewRRF4mg+vJIib5X toacl5JpHBM9aajvcIBIEw70GUKJgdmk1dFx766fN8LNHAHyBVKd881Bu60HWqbAY0mf 17f7ZMHRGmh2rjaRPbf7/9dGrBVA2Lx4gaBwO1Q1bMvY46SdKKenngSTK9hmOEsfIBvw vEvPGaTIRJB0y4LMMTZH2nnRTrnmoTYqvs/BG5SJs98pKa5SSgpaBaD1CXWQghGUp5o8 2vFe6EYtECM8fGzWQbgHUMcWCvfAu2VWwkrT9Yz8p0iSipZdfoH6EdKMRxE3GEHtnmQn nu7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=hpPaaeNnDQDzXenK2DRxqA8fQ/9qhGhVcGouqEQ3NOg=; b=wffXIq/aVSlFXkLbC68SJL2uG+aZsgh1tzBUQ32EiR29xuYtkpLShGvNtC9BtfyRyB cusL8Wr2okGQTu8ry+TrNgJiTGqbxZzUO14BkNhfLhhCUCNFmuOP57YYdMVsFR578wCW zDr8EQTrFdiRcnoHx7yaewFDelrV1LipQDmAEyAC6kkaTuDcOndFvWX9IeVN2TUYgC+R Df/bOja4scFU6NSdQrf4yuC7JffN5YD8bHmRqy1hvjxeL0QcG0KdXsBGoj0UTVH4+5bY JmN9f2ANFrZkfXUGbtMf4PzpKL2epg/ZXNiWS0vrUoLlAqLD/8k/7f/8vvB+aoXKsbKb nyOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mu33WPcs; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f10si3764168pfj.60.2021.04.27.08.10.18; Tue, 27 Apr 2021 08:10:32 -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=@gmail.com header.s=20161025 header.b=mu33WPcs; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238726AbhD0PJR (ORCPT + 99 others); Tue, 27 Apr 2021 11:09:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238659AbhD0PJO (ORCPT ); Tue, 27 Apr 2021 11:09:14 -0400 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B05ECC061574; Tue, 27 Apr 2021 08:08:29 -0700 (PDT) Received: by mail-pf1-x42d.google.com with SMTP id d124so41530653pfa.13; Tue, 27 Apr 2021 08:08:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=hpPaaeNnDQDzXenK2DRxqA8fQ/9qhGhVcGouqEQ3NOg=; b=mu33WPcsU+Tt1pVw/xbsCSUJVgwDtghadn4anGynXS2Auxr7JH2pvxbY7c5v9Bzld/ YM4F3K0M644FMpjdVzMdiLUHJIxtSTrtKbQHCjxQ16GyYfPUrL9k0wt5+i5i5xMMwqmU q9WrjFiB8I9FxN4+ZCArk3VS+NKr0ZKG43sP02yKr9KDENtPZhocrNUQOnRjrfqzpil+ V7nb/Vusilf0e5X9o0HVdiZ99i4os8yPisDYXLq4xtRTbR0KarmKYawAYpEqXMssT4+4 v4rLJ8enWjQ3N/86eS+UuOVoFslrIKb1sQeSvtdrAqjJv8N8peYCtHym02XN2RBrLi1A aDtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=hpPaaeNnDQDzXenK2DRxqA8fQ/9qhGhVcGouqEQ3NOg=; b=OjU26ip4OND20yQ5U9qSsGtUYCSCprsnOCGAg1uTOauDUtR8dkriykLDGbr7mfh4np eOWJes6vHCvJJ/ZDmYAcsiQE6UfN/zyRiYs1hWi+7L0f+p66YUhKRSVpGsVNtFcBSB9q jiR1Gk7/KAgVLpvlzph9foKIPbImUz8v09+ADRyiukaRq551jPKwhI48JJ7xQGdfr2AE bm5y5VJNRmekDsCDVbF7pxDWenVBwTKHEHGaQwELL2v5s0AniuNtSEWXCB91dronBuCh ZV52EmslchzdGCJ2CP0fBlXwkMqeYyIjVDv9A48AEoBEMpa0JLhs+52rDkGgRwVGc6VZ ga3w== X-Gm-Message-State: AOAM531Mn0PVLsot2Q4IZ++zEWE6v2mdz8ESHcnLYUThKOMt+897Z2We SlBUY4O3gEuyvTuT/LK0ujyIt5zh6v0= X-Received: by 2002:a63:7703:: with SMTP id s3mr3125657pgc.339.1619536109238; Tue, 27 Apr 2021 08:08:29 -0700 (PDT) Received: from skbuf ([86.127.41.210]) by smtp.gmail.com with ESMTPSA id br10sm2551511pjb.13.2021.04.27.08.08.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Apr 2021 08:08:28 -0700 (PDT) Date: Tue, 27 Apr 2021 18:08:16 +0300 From: Vladimir Oltean To: "Ismail, Mohammad Athari" Cc: Alexandre Torgue , Jose Abreu , "David S . Miller" , Jakub Kicinski , Andrew Lunn , Heiner Kallweit , Russell King , "Ong, Boon Leong" , "Voon, Weifeng" , "Wong, Vee Khee" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2 net-next] net: pcs: Enable pre-emption packet for 10/100Mbps Message-ID: <20210427150816.5lro2zawucnxu6xq@skbuf> References: <20210422230645.23736-1-mohammad.athari.ismail@intel.com> <20210422235317.erltirtrxnva5o2d@skbuf> <20210423005308.wnhpxryw6emgohaa@skbuf> <20210423181133.cl5ooguhdm5rfbch@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ismail, On Fri, Apr 23, 2021 at 10:03:58PM +0000, Ismail, Mohammad Athari wrote: > Hi Vladimir, > > > -----Original Message----- > > From: Vladimir Oltean > > Sent: Saturday, April 24, 2021 2:12 AM > > To: Ismail, Mohammad Athari > > Cc: Alexandre Torgue ; Jose Abreu > > ; David S . Miller ; Jakub > > Kicinski ; Andrew Lunn ; Heiner Kallweit > > ; Russell King ; Ong, Boon > > Leong ; Voon, Weifeng > > ; Wong, Vee Khee ; > > netdev@vger.kernel.org; linux-kernel@vger.kernel.org > > Subject: Re: [PATCH v2 net-next] net: pcs: Enable pre-emption packet for > > 10/100Mbps > > > > On Fri, Apr 23, 2021 at 09:30:07AM +0000, Ismail, Mohammad Athari wrote: > > > Hi Vladimir, > > > > > > > -----Original Message----- > > > > From: Vladimir Oltean > > > > Sent: Friday, April 23, 2021 8:53 AM > > > > To: Ismail, Mohammad Athari > > > > Cc: Alexandre Torgue ; Jose Abreu > > > > ; David S . Miller ; > > > > Jakub Kicinski ; Andrew Lunn ; > > > > Heiner Kallweit ; Russell King > > > > ; Ong, Boon Leong ; > > > > Voon, Weifeng ; Wong, Vee Khee > > > > ; netdev@vger.kernel.org; > > > > linux-kernel@vger.kernel.org > > > > Subject: Re: [PATCH v2 net-next] net: pcs: Enable pre-emption packet > > > > for 10/100Mbps > > > > > > > > On Fri, Apr 23, 2021 at 12:45:25AM +0000, Ismail, Mohammad Athari wrote: > > > > > Hi Vladimir, > > > > > > > > > > > -----Original Message----- > > > > > > From: Vladimir Oltean > > > > > > Sent: Friday, April 23, 2021 7:53 AM > > > > > > To: Ismail, Mohammad Athari > > > > > > Cc: Alexandre Torgue ; Jose Abreu > > > > > > ; David S . Miller ; > > > > > > Jakub Kicinski ; Andrew Lunn ; > > > > > > Heiner Kallweit ; Russell King > > > > > > ; Ong, Boon Leong > > > > > > ; Voon, Weifeng > > > > > > ; Wong, Vee Khee > > > > > > ; netdev@vger.kernel.org; > > > > > > linux-kernel@vger.kernel.org > > > > > > Subject: Re: [PATCH v2 net-next] net: pcs: Enable pre-emption > > > > > > packet for 10/100Mbps > > > > > > > > > > > > Hi Mohammad, > > > > > > > > > > > > On Fri, Apr 23, 2021 at 07:06:45AM +0800, > > > > > > mohammad.athari.ismail@intel.com > > > > > > wrote: > > > > > > > From: Mohammad Athari Bin Ismail > > > > > > > > > > > > > > > > > > > > > Set VR_MII_DIG_CTRL1 bit-6(PRE_EMP) to enable pre-emption > > > > > > > packet for 10/100Mbps by default. This setting doesn`t impact > > > > > > > pre-emption capability for other speeds. > > > > > > > > > > > > > > Signed-off-by: Mohammad Athari Bin Ismail > > > > > > > > > > > > > > --- > > > > > > > > > > > > What is a "pre-emption packet"? > > > > > > > > > > In IEEE 802.1 Qbu (Frame Preemption), pre-emption packet is used > > > > > to differentiate between MAC Frame packet, Express Packet, > > > > > Non-fragmented Normal Frame Packet, First Fragment of Preemptable > > > > > Packet, Intermediate Fragment of Preemptable Packet and Last > > > > > Fragment of Preemptable Packet. > > > > > > > > Citation needed, which clause are you referring to? > > > > > > Cited from IEEE802.3-2018 Clause 99.3. > > > > Aha, you know that what you just said is not what's in the "MAC Merge sublayer" > > clause, right? There is no such thing as "pre-emption packet" > > in the standard, this is a made-up name, maybe preemptable packets, but the > > definition of preemptable packets is not that, hence my question. > > > > Thank you for the knowledge sharing. My guess, this "pre-emption > packet" might be referring to "preamble" byte in Ethernet frame. > > > > > > > > > > > > > > > This bit "VR_MII_DIG_CTRL1 bit-6(PRE_EMP)" defined in DesignWare > > > > > Cores Ethernet PCS Databook is to allow the IP to properly > > > > > receive/transmit pre-emption packets in SGMII 10M/100M Modes. > > > > > > > > Shouldn't everything be handled at the MAC merge sublayer? What > > > > business does the PCS have in frame preemption? > > > > > > There is no further detail explained in the databook w.r.t to > > > VR_MII_DIG_CTRL1 bit-6(PRE_EMP). The only statement it mentions is > > > "This bit should be set to 1 to allow the DWC_xpcs to properly > > > receive/transmit pre-emption packets in SGMII 10M/100M Modes". > > > > Correct, I see this too. I asked our hardware design team, and at least on NXP > > LS1028A (no Synopsys PCS), the PCS layer has nothing to do with frame > > preemption, as mentioned. > > > > But indeed, I do see this obscure bit in the Digital Control 1 register too, I've no > > idea what it does. I'll ask around. Odd anyway. If you have to set it, you have to > > set it, I guess. But it is interesting to see why is it even a configurable bit, why it > > is not enabled by default, what is the drawback of enabling it?! > > The databook states that the default value is 0. We don`t see any > drawback of enabling it. As the databook mentions that, enabling the > bit will allow SGMII 10/100M to receive/transmit preamble properly, so > I think it is recommended to enable it for IP that support SGMII > 10/100M speed. Why do you need this patch, exactly? Is there anything that doesn't work if you don't make the change? For example, if you leave the PRE_EMP bit in the PCS set to zero, you set the link to 100 Mbps, configure all queues to go to the pMAC and stress the interface with some iperf3 traffic for a while, do you see any issues at all?