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: <53FB4D68.9020300@intel.com>
Date:	Mon, 25 Aug 2014 07:51:20 -0700
From:	Alexander Duyck <alexander.h.duyck@...el.com>
To:	Florian Fainelli <f.fainelli@...il.com>,
	Alexander Duyck <alexander.duyck@...il.com>,
	netdev@...r.kernel.org
CC:	davem@...emloft.net, jhs@...atatu.com, linville@...driver.com
Subject: Re: [PATCH net-next v3 09/12] net: dsa: add Broadcom tag RX/TX handler

On 08/24/2014 07:37 PM, Florian Fainelli wrote:
> Le 24/08/2014 15:51, Alexander Duyck a écrit :
>> On 08/24/2014 11:44 AM, Florian Fainelli wrote:
>>> +
>>> +static int brcm_tag_rcv(struct sk_buff *skb, struct net_device *dev,
>>> +            struct packet_type *pt, struct net_device *orig_dev)
>>> +{
>>> +    struct dsa_switch_tree *dst = dev->dsa_ptr;
>>> +    struct dsa_switch *ds;
>>> +    int source_port;
>>> +    u8 *brcm_tag;
>>> +
>>> +    if (unlikely(dst == NULL))
>>> +        goto out_drop;
>>> +
>>> +    ds = dst->ds[0];
>>> +
>>> +    skb = skb_unshare(skb, GFP_ATOMIC);
>>> +    if (skb == NULL)
>>> +        goto out;
>>
>> At this point here we already have the dsa pointers and could just pull
>> up a function pointer so all of the code below could potentially be
>> moved into a separate function allowing us to drop the need to have
>> multiple Ethertypes and so we could just use ETH_P_DSA for all DSA
>> tagging type.
> 
> I see, or rather maybe just use ETH_P_EDSA which is a real assigned
> ethertype?
> -- 
> Florian

I suppose we could probably do that.  Although I would probably say we
should just rename it to ETH_P_DSA since we can just go through and drop
all of the other defined Ethertypes for DSA.  In addition since the EDSA
isn't actually a registered type we probably don't need to bother with
conserving the name anyway.

Thanks,

Alex
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ