--- zzzz-none-000/linux-5.15.111/include/linux/if_vlan.h 2023-05-11 14:00:40.000000000 +0000 +++ puma7-atom-6670-761/linux-5.15.111/include/linux/if_vlan.h 2024-02-07 10:23:26.000000000 +0000 @@ -192,15 +192,23 @@ } static inline u16 -vlan_dev_get_egress_qos_mask(struct net_device *dev, u32 skprio) +vlan_dev_get_egress_qos_mask(struct net_device *dev, struct sk_buff *skb) { +#if defined(CONFIG_INTEL_KERNEL_PP_DRIVER_LOCAL) + if ((skb->ti_ds_traffic_prio < 2) && (dev->priv_flags & IFF_BONDING)) + { + /* Increase VLAN priority for traffic directed to the LAG */ + return (VLAN_PRIO_MASK & ((2) << VLAN_PRIO_SHIFT)); + } + return (VLAN_PRIO_MASK & (((u16)(skb->ti_ds_traffic_prio)) << VLAN_PRIO_SHIFT)); +#else struct vlan_priority_tci_mapping *mp; smp_rmb(); /* coupled with smp_wmb() in vlan_dev_set_egress_priority() */ - mp = vlan_dev_priv(dev)->egress_priority_map[(skprio & 0xF)]; + mp = vlan_dev_priv(dev)->egress_priority_map[(skb->priority & 0xF)]; while (mp) { - if (mp->priority == skprio) { + if (mp->priority == skb->priority) { return mp->vlan_qos; /* This should already be shifted * to mask correctly with the * VLAN's TCI */ @@ -208,6 +216,7 @@ mp = mp->next; } return 0; +#endif /* CONFIG_INTEL_KERNEL_PP_DRIVER_LOCAL */ } extern bool vlan_do_receive(struct sk_buff **skb); @@ -674,6 +683,10 @@ skb->protocol = htons(ETH_P_802_2); } +// AVM/TKL: AVMNET VLAN extension +#define AVM_REGISTER_VLAN_DEVICE +int avm_register_vlan_device(struct net_device *real_dev, uint16_t vlan_id, const char *name, struct net_device **vlan_dev); + /** * skb_vlan_tagged - check if skb is vlan tagged. * @skb: skbuff to query