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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171207153016.GC24750@lunn.ch>
Date:   Thu, 7 Dec 2017 16:30:16 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     sean.wang@...iatek.com
Cc:     davem@...emloft.net, f.fainelli@...il.com,
        vivien.didelot@...oirfairelinux.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH net-next 2/3] net: dsa: mediatek: combine MediaTek tag
 with VLAN tag

> @@ -25,20 +28,37 @@ static struct sk_buff *mtk_tag_xmit(struct sk_buff *skb,
>  {
>  	struct dsa_port *dp = dsa_slave_to_port(dev);
>  	u8 *mtk_tag;
> +	bool is_vlan_skb = true;

..

> +	/* Mark tag attribute on special tag insertion to notify hardware
> +	 * whether that's a combined special tag with 802.1Q header.
> +	 */
> +	mtk_tag[0] = is_vlan_skb ? MTK_HDR_XMIT_TAGGED_TPID_8100 :
> +		     MTK_HDR_XMIT_UNTAGGED;
>  	mtk_tag[1] = (1 << dp->index) & MTK_HDR_XMIT_DP_BIT_MASK;
> -	mtk_tag[2] = 0;
> -	mtk_tag[3] = 0;
> +
> +	/* Tag control information is kept for 802.1Q */
> +	if (!is_vlan_skb) {
> +		mtk_tag[2] = 0;
> +		mtk_tag[3] = 0;
> +	}
>  
>  	return skb;
>  }

Hi Sean

So you can mark a packet for egress. What about ingress? How do you
know the VLAN/PORT combination for packets the CPU receives? I would
of expected a similar change to mtk_tag_rcv().

   Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ