Follows frame and sk_buff's fields at transmitter side:
Nov 29 14:17:56 nxp2 kernel: [TID: 0x000000 bh2_start_xmit:665] ----------------------------------------------------------------------------------------------
Nov 29 14:17:56 nxp2 kernel: [bh2_start_xmit:667] -->> [wlP2p1s0f1:] Ethernet II [SRC: 12:3f:5f:f1:77:a3, DST: ff:ff:ff:ff:ff:ff, TYPE = 0x8100, 1Q: NO, VLAN_TCI: -1]
Nov 29 14:17:56 nxp2 kernel: [bh2_start_xmit:667] -->> [wlP2p1s0f1:] ff ff ff ff ff ff 12 3f 5f f1 77 a3 81 00 00 0d 08 06 00 01 08 00 06 04 00 01 12 3f 5f f1 77 a3
Nov 29 14:17:56 nxp2 kernel: [TID: 0x000000 s_log_packet:102] : a_sk_buff->len = 60
Nov 29 14:17:56 nxp2 kernel: [TID: 0x000000 s_log_packet:103] : a_sk_buff->data_len = 0
Nov 29 14:17:56 nxp2 kernel: [TID: 0x000000 s_log_packet:104] : a_sk_buff->mac_len = 14
Nov 29 14:17:56 nxp2 kernel: [TID: 0x000000 s_log_packet:105] : a_sk_buff->hdr_len = 0
Nov 29 14:17:56 nxp2 kernel: [TID: 0x000000 s_log_packet:106] : a_sk_buff->vlan_proto = 0x00000081
Nov 29 14:17:56 nxp2 kernel: [TID: 0x000000 s_log_packet:107] : a_sk_buff->vlan_tci = 13
Nov 29 14:17:56 nxp2 kernel: [TID: 0x000000 s_log_packet:110] : l_protocol = 0x00008100
Nov 29 14:17:56 nxp2 kernel: [TID: 0x000000 s_log_packet:111] : a_sk_buff->transport_header = 286
Nov 29 14:17:56 nxp2 kernel: [TID: 0x000000 s_log_packet:112] : a_sk_buff->network_header = 290
Nov 29 14:17:56 nxp2 kernel: [TID: 0x000000 s_log_packet:113] : a_sk_buff->mac_header = 272
Nov 29 14:17:56 nxp2 kernel: [TID: 0x000000 s_log_packet:114] : a_sk_buff->head = 00000000a48a96ae
Nov 29 14:17:56 nxp2 kernel: [TID: 0x000000 s_log_packet:115] : a_sk_buff->data = 00000000e9af543b
Nov 29 14:17:56 nxp2 kernel: [TID: 0x000000 bh2_start_xmit:693] : ring_index = 0
On receiver side I extract VLAN Id and put it into the sk_buff bu using __vlan_hwaccel_put_tag () routine.
Follows a listing on received side:
[ 780.056247] [process_data_packet:964] <<-- [wlP2p1s0f1:] Ethernet II [SRC: 12:3f:5f:f1:77:a3, DST: ff:ff:ff:ff:ff:ff, TYPE = 0x8100, 1Q: NO, VLAN_TCI: -1]
[ 780.056266] [process_data_packet:964] <<-- [wlP2p1s0f1:] ff ff ff ff ff ff 12 3f 5f f1 77 a3 81 00 00 0d 08 06 00 01 08 00 06 04 00 01 12 3f 5f f1 77 a3
[ 780.070118] [TID: 0x000000 s_log_packet:102] : a_sk_buff->len = 46
[ 780.089968] [TID: 0x000000 s_log_packet:103] : a_sk_buff->data_len = 0
[ 780.096512] [TID: 0x000000 s_log_packet:104] : a_sk_buff->mac_len = 0
[ 780.102968] [TID: 0x000000 s_log_packet:105] : a_sk_buff->hdr_len = 0
[ 780.109424] [TID: 0x000000 s_log_packet:106] : a_sk_buff->vlan_proto = 0x00000000
[ 780.116925] [TID: 0x000000 s_log_packet:107] : a_sk_buff->vlan_tci = 0
[ 780.123467] [TID: 0x000000 s_log_packet:110] : l_protocol = 0x00008100
[ 780.130011] [TID: 0x000000 s_log_packet:111] : a_sk_buff->transport_header = 65535
[ 780.137597] [TID: 0x000000 s_log_packet:112] : a_sk_buff->network_header = 0
[ 780.144662] [TID: 0x000000 s_log_packet:113] : a_sk_buff->mac_header = 64
[ 780.151465] [TID: 0x000000 s_log_packet:114] : a_sk_buff->head = 000000004b202998
[ 780.158967] [TID: 0x000000 s_log_packet:115] : a_sk_buff->data = 0000000035645a4c
[ 780.166468] [TID: 0x000000 process_data_packet:965] bh2: 0000000056d862a0, assoc_desc: 000000005e349fc7
[ 780.175883] [TID: 0x000000 process_data_packet:996] bh2: 0000000056d862a0, assoc_desc: 000000005e349fc7
[ 780.185296] [TID: 0x000000 process_data_packet:1051] [wlP2p1s0f1] Parse VLAN Tag ...
[ 780.193143] [TID: 0x000000 process_data_packet:1054] : l_eth_proto = 0x00008100
[ 780.200470] [TID: 0x000000 process_data_packet:1059] : l_vlan_tci = 13
[ 780.207013] [TID: 0x000000 process_data_packet:1071] [wlP2p1s0f1] Deliver ...
[ 780.214165] [process_data_packet:1072] ---- [wlP2p1s0f1:] Ethernet II [SRC: 12:3f:5f:f1:77:a3, DST: ff:ff:ff:ff:ff:ff, TYPE = 0x8100, 1Q: YES, VLAN_TCI: 13]
[ 780.214181] [process_data_packet:1072] ---- [wlP2p1s0f1:] ff ff ff ff ff ff 12 3f 5f f1 77 a3 81 00 00 0d 08 06 00 01 08 00 06 04 00 01 12 3f 5f f1 77 a3
[ 780.228206] [TID: 0x000000 s_log_packet:102] : a_sk_buff->len = 46
[ 780.248150] [TID: 0x000000 s_log_packet:103] : a_sk_buff->data_len = 0
[ 780.254693] [TID: 0x000000 s_log_packet:104] : a_sk_buff->mac_len = 0
[ 780.261150] [TID: 0x000000 s_log_packet:105] : a_sk_buff->hdr_len = 0
[ 780.267605] [TID: 0x000000 s_log_packet:106] : a_sk_buff->vlan_proto = 0x00000081
[ 780.275106] [TID: 0x000000 s_log_packet:107] : a_sk_buff->vlan_tci = 13
[ 780.281736] [TID: 0x000000 s_log_packet:110] : l_protocol = 0x00008100
[ 780.288280] [TID: 0x000000 s_log_packet:111] : a_sk_buff->transport_header = 65535
[ 780.295866] [TID: 0x000000 s_log_packet:112] : a_sk_buff->network_header = 0
[ 780.302930] [TID: 0x000000 s_log_packet:113] : a_sk_buff->mac_header = 64
[ 780.309734] [TID: 0x000000 s_log_packet:114] : a_sk_buff->head = 000000004b202998
[ 780.317234] [TID: 0x000000 s_log_packet:115] : a_sk_buff->data = 0000000035645a4c
The question is: do I'm need to correct fields like: mac_header, transport_header, mac_len ?