1195972f6Sopenharmony_cidiff -Nur lwip-82/src/include/dpdk_version.h lwip-offload/src/include/dpdk_version.h 2195972f6Sopenharmony_ci--- lwip-82/src/include/dpdk_version.h 2023-11-28 14:17:02.432481010 +0800 3195972f6Sopenharmony_ci+++ lwip-offload/src/include/dpdk_version.h 2023-11-28 14:34:21.208481010 +0800 4195972f6Sopenharmony_ci@@ -48,6 +48,7 @@ 5195972f6Sopenharmony_ci #define RTE_MBUF_F_TX_TCP_CKSUM PKT_TX_TCP_CKSUM 6195972f6Sopenharmony_ci #define RTE_MBUF_F_TX_TCP_SEG PKT_TX_TCP_SEG 7195972f6Sopenharmony_ci #define RTE_MBUF_F_TX_UDP_CKSUM PKT_TX_UDP_CKSUM 8195972f6Sopenharmony_ci+#define RTE_MBUF_F_TX_VLAN PKT_TX_VLAN_PKT 9195972f6Sopenharmony_ci 10195972f6Sopenharmony_ci #endif /* DPDK_VERSION_1911 */ 11195972f6Sopenharmony_ci 12195972f6Sopenharmony_cidiff -Nur lwip-82/src/include/lwip/pbuf.h lwip-offload/src/include/lwip/pbuf.h 13195972f6Sopenharmony_ci--- lwip-82/src/include/lwip/pbuf.h 2023-11-28 14:17:02.408481010 +0800 14195972f6Sopenharmony_ci+++ lwip-offload/src/include/lwip/pbuf.h 2023-11-28 14:41:31.580481010 +0800 15195972f6Sopenharmony_ci@@ -240,6 +240,7 @@ 16195972f6Sopenharmony_ci struct pbuf *last; 17195972f6Sopenharmony_ci pthread_spinlock_t pbuf_lock; 18195972f6Sopenharmony_ci struct tcp_pcb *pcb; 19195972f6Sopenharmony_ci+ u16_t vlan_tci; 20195972f6Sopenharmony_ci #if GAZELLE_UDP_ENABLE 21195972f6Sopenharmony_ci ip_addr_t addr; 22195972f6Sopenharmony_ci u16_t port; 23195972f6Sopenharmony_cidiff -Nur lwip-82/src/netif/ethernet.c lwip-offload/src/netif/ethernet.c 24195972f6Sopenharmony_ci--- lwip-82/src/netif/ethernet.c 2023-11-28 14:17:02.440481010 +0800 25195972f6Sopenharmony_ci+++ lwip-offload/src/netif/ethernet.c 2023-11-28 16:35:36.536481010 +0800 26195972f6Sopenharmony_ci@@ -289,7 +289,12 @@ 27195972f6Sopenharmony_ci } 28195972f6Sopenharmony_ci #else 29195972f6Sopenharmony_ci if (netif->vlan_enable) { 30195972f6Sopenharmony_ci- vlan_prio_vid = netif->vlan_tci; 31195972f6Sopenharmony_ci+ if (netif->txol_flags & DEV_TX_OFFLOAD_VLAN_INSERT) { 32195972f6Sopenharmony_ci+ p->ol_flags |= RTE_MBUF_F_TX_VLAN; 33195972f6Sopenharmony_ci+ p->vlan_tci = netif->vlan_tci; 34195972f6Sopenharmony_ci+ } else { 35195972f6Sopenharmony_ci+ vlan_prio_vid = netif->vlan_tci; 36195972f6Sopenharmony_ci+ } 37195972f6Sopenharmony_ci } 38195972f6Sopenharmony_ci #endif /* GAZELLE_ENABLE */ 39195972f6Sopenharmony_ci #endif 40195972f6Sopenharmony_ci@@ -327,11 +332,11 @@ 41195972f6Sopenharmony_ci ("ethernet_output: sending packet %p\n", (void *)p)); 42195972f6Sopenharmony_ci 43195972f6Sopenharmony_ci #if CHECKSUM_GEN_IP_HW || CHECKSUM_GEN_TCP_HW 44195972f6Sopenharmony_ci-#if LWIP_VLAN_PCP 45195972f6Sopenharmony_ci- ethh_cksum_set(p, sizeof(*ethhdr)+SIZEOF_VLAN_HDR); 46195972f6Sopenharmony_ci-#else 47195972f6Sopenharmony_ci- ethh_cksum_set(p, sizeof(*ethhdr)); 48195972f6Sopenharmony_ci-#endif 49195972f6Sopenharmony_ci+ if (netif->vlan_enable && !(netif->txol_flags & DEV_TX_OFFLOAD_VLAN_INSERT)) { 50195972f6Sopenharmony_ci+ ethh_cksum_set(p, sizeof(*ethhdr) + SIZEOF_VLAN_HDR); 51195972f6Sopenharmony_ci+ } else { 52195972f6Sopenharmony_ci+ ethh_cksum_set(p, sizeof(*ethhdr)); 53195972f6Sopenharmony_ci+ } 54195972f6Sopenharmony_ci #endif 55195972f6Sopenharmony_ci 56195972f6Sopenharmony_ci /* send the packet */ 57