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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 19 Dec 2020 10:13:37 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     <stefanc@...vell.com>
Cc:     <netdev@...r.kernel.org>, <thomas.petazzoni@...tlin.com>,
        <davem@...emloft.net>, <nadavh@...vell.com>,
        <ymarkman@...vell.com>, <linux-kernel@...r.kernel.org>,
        <linux@...linux.org.uk>, <mw@...ihalf.com>, <andrew@...n.ch>,
        <rmk+kernel@...linux.org.uk>
Subject: Re: [PATCH net v2] net: mvpp2: Add TCAM entry to drop flow control
 pause frames

On Thu, 17 Dec 2020 20:30:17 +0200 stefanc@...vell.com wrote:
> From: Stefan Chulski <stefanc@...vell.com>
> 
> Issue:
> Flow control frame used to pause GoP(MAC) was delivered to the CPU
> and created a load on the CPU. Since XOFF/XON frames are used only
> by MAC, these frames should be dropped inside MAC.
> 
> Fix:
> According to 802.3-2012 - IEEE Standard for Ethernet pause frame
> has unique destination MAC address 01-80-C2-00-00-01.
> Add TCAM parser entry to track and drop pause frames by destination MAC.
> 
> Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit")
> Signed-off-by: Stefan Chulski <stefanc@...vell.com>

Applied, thanks..

> diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c
> index 1a272c2..3a9c747 100644
> --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c
> +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c
> @@ -405,6 +405,39 @@ static int mvpp2_prs_tcam_first_free(struct mvpp2 *priv, unsigned char start,
>  	return -EINVAL;
>  }
>  
> +/* Drop flow control pause frames */
> +static void mvpp2_prs_drop_fc(struct mvpp2 *priv)
> +{
> +	struct mvpp2_prs_entry pe;
> +	unsigned int len;
> +	unsigned char da[ETH_ALEN] = {
> +			0x01, 0x80, 0xC2, 0x00, 0x00, 0x01 };

but I reordered these so they follow the reverse xmas tree ordering
netdev prefers.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ