Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Overlapping header include additions in macsec.c A bug fix in 'net' overlapping with the removal of 'version' string in ena_netdev.c Overlapping test additions in selftests Makefile Overlapping PCI ID table adjustments in iwlwifi driver. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -298,47 +298,4 @@ struct sk_buff *dsa_8021q_xmit(struct sk_buff *skb, struct net_device *netdev,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dsa_8021q_xmit);
|
||||
|
||||
/* In the DSA packet_type handler, skb->data points in the middle of the VLAN
|
||||
* tag, after tpid and before tci. This is because so far, ETH_HLEN
|
||||
* (DMAC, SMAC, EtherType) bytes were pulled.
|
||||
* There are 2 bytes of VLAN tag left in skb->data, and upper
|
||||
* layers expect the 'real' EtherType to be consumed as well.
|
||||
* Coincidentally, a VLAN header is also of the same size as
|
||||
* the number of bytes that need to be pulled.
|
||||
*
|
||||
* skb_mac_header skb->data
|
||||
* | |
|
||||
* v v
|
||||
* | | | | | | | | | | | | | | | | | | |
|
||||
* +-----------------------+-----------------------+-------+-------+-------+
|
||||
* | Destination MAC | Source MAC | TPID | TCI | EType |
|
||||
* +-----------------------+-----------------------+-------+-------+-------+
|
||||
* ^ | |
|
||||
* |<--VLAN_HLEN-->to <---VLAN_HLEN--->
|
||||
* from |
|
||||
* >>>>>>> v
|
||||
* >>>>>>> | | | | | | | | | | | | | | |
|
||||
* >>>>>>> +-----------------------+-----------------------+-------+
|
||||
* >>>>>>> | Destination MAC | Source MAC | EType |
|
||||
* +-----------------------+-----------------------+-------+
|
||||
* ^ ^
|
||||
* (now part of | |
|
||||
* skb->head) skb_mac_header skb->data
|
||||
*/
|
||||
struct sk_buff *dsa_8021q_remove_header(struct sk_buff *skb)
|
||||
{
|
||||
u8 *from = skb_mac_header(skb);
|
||||
u8 *dest = from + VLAN_HLEN;
|
||||
|
||||
memmove(dest, from, ETH_HLEN - VLAN_HLEN);
|
||||
skb_pull(skb, VLAN_HLEN);
|
||||
skb_push(skb, ETH_HLEN);
|
||||
skb_reset_mac_header(skb);
|
||||
skb_reset_mac_len(skb);
|
||||
skb_pull_rcsum(skb, ETH_HLEN);
|
||||
|
||||
return skb;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dsa_8021q_remove_header);
|
||||
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
@@ -140,6 +140,8 @@ static struct sk_buff *brcm_tag_rcv_ll(struct sk_buff *skb,
|
||||
/* Remove Broadcom tag and update checksum */
|
||||
skb_pull_rcsum(skb, BRCM_TAG_LEN);
|
||||
|
||||
skb->offload_fwd_mark = 1;
|
||||
|
||||
return skb;
|
||||
}
|
||||
|
||||
|
@@ -250,14 +250,14 @@ static struct sk_buff *sja1105_rcv(struct sk_buff *skb,
|
||||
{
|
||||
struct sja1105_meta meta = {0};
|
||||
int source_port, switch_id;
|
||||
struct vlan_ethhdr *hdr;
|
||||
struct ethhdr *hdr;
|
||||
u16 tpid, vid, tci;
|
||||
bool is_link_local;
|
||||
bool is_tagged;
|
||||
bool is_meta;
|
||||
|
||||
hdr = vlan_eth_hdr(skb);
|
||||
tpid = ntohs(hdr->h_vlan_proto);
|
||||
hdr = eth_hdr(skb);
|
||||
tpid = ntohs(hdr->h_proto);
|
||||
is_tagged = (tpid == ETH_P_SJA1105);
|
||||
is_link_local = sja1105_is_link_local(skb);
|
||||
is_meta = sja1105_is_meta_frame(skb);
|
||||
@@ -266,7 +266,12 @@ static struct sk_buff *sja1105_rcv(struct sk_buff *skb,
|
||||
|
||||
if (is_tagged) {
|
||||
/* Normal traffic path. */
|
||||
tci = ntohs(hdr->h_vlan_TCI);
|
||||
skb_push_rcsum(skb, ETH_HLEN);
|
||||
__skb_vlan_pop(skb, &tci);
|
||||
skb_pull_rcsum(skb, ETH_HLEN);
|
||||
skb_reset_network_header(skb);
|
||||
skb_reset_transport_header(skb);
|
||||
|
||||
vid = tci & VLAN_VID_MASK;
|
||||
source_port = dsa_8021q_rx_source_port(vid);
|
||||
switch_id = dsa_8021q_rx_switch_id(vid);
|
||||
@@ -295,12 +300,6 @@ static struct sk_buff *sja1105_rcv(struct sk_buff *skb,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Delete/overwrite fake VLAN header, DSA expects to not find
|
||||
* it there, see dsa_switch_rcv: skb_push(skb, ETH_HLEN).
|
||||
*/
|
||||
if (is_tagged)
|
||||
skb = dsa_8021q_remove_header(skb);
|
||||
|
||||
return sja1105_rcv_meta_state_machine(skb, &meta, is_link_local,
|
||||
is_meta);
|
||||
}
|
||||
|
Reference in New Issue
Block a user