lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e9ef3235-8e35-4918-a2a4-76573034ca59@quicinc.com>
Date: Wed, 4 Sep 2024 19:05:22 -0700
From: "Abhishek Chauhan (ABC)" <quic_abchauha@...cinc.com>
To: Sagar Cheluvegowda <quic_scheluve@...cinc.com>,
        Alexandre Torgue
	<alexandre.torgue@...s.st.com>,
        Jose Abreu <joabreu@...opsys.com>,
        "David S.
 Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        "Jakub
 Kicinski" <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
        Maxime Coquelin
	<mcoquelin.stm32@...il.com>, <netdev@...r.kernel.org>,
        <linux-stm32@...md-mailman.stormreply.com>,
        <linux-arm-kernel@...ts.infradead.org>,
        Andrew Halaney <ahalaney@...hat.com>
CC: <kernel@...cinc.com>
Subject: Re: [PATCH net-next v1] net: stmmac: Programming sequence for VLAN
 packets with split header



On 9/4/2024 6:12 PM, Sagar Cheluvegowda wrote:
> 
>> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
>> index e0165358c4ac..dbd1be4e4a92 100644
>> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
>> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
>> @@ -526,6 +526,17 @@ static void dwmac4_enable_sph(struct stmmac_priv *priv, void __iomem *ioaddr,
>>  	value |= GMAC_CONFIG_HDSMS_256; /* Segment max 256 bytes */
>>  	writel(value, ioaddr + GMAC_EXT_CONFIG);
>>  
>> +	/* Additional configuration to handle VLAN tagged packets */
>> +	value = readl(ioaddr + GMAC_EXT_CFG1);
>> +	value &= ~GMAC_CONFIG1_SPLM;
>> +	/* Enable Split mode for header and payload at L2  */
>> +	value |= GMAC_CONFIG1_SPLM_L2OFST_EN << GMAC_CONFIG1_SPLM_SHIFT;
>> +	value &= ~GMAC_CONFIG1_SAVO;
>> +	/* Enables the MAC to distinguish between tagged vs untagged pkts */
>> +	value |= 4 << GMAC_CONFIG1_SAVO_SHIFT;
> I checked the data book internally and see SAVO bit is used to indicate the
> valueof the offset from the beginning of Length/Type field at which the header 
> should be split, i see the length/type field remains to be 2bytes even in case
> of tagged packets may be you need to keep the value of this field to 2bytes as
> it was before but one thing which i am still not able to understand is that even
> with the value of this field configured to 4 i don't see any packet corruption
> issue, something which needs to be checked with HW folks. 

Good catch Sagar. Let me check this internally and get back. 

>> +	value |= GMAC_CONFIG1_SAVE_EN;
>> +	writel(value, ioaddr + GMAC_EXT_CFG1);
>> +
>>  	value = readl(ioaddr + DMA_CHAN_CONTROL(dwmac4_addrs, chan));
>>  	if (en)
>>  		value |= DMA_CONTROL_SPH;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ