Hi, all
When we use dhcp, we found that, there is a DHCPREQUEST packet missed when requesting an IP.
We tried to get an IP from DHCP server, we can see the following DHCP packets were sent in dhclient:
******our dhclient debug log******
dhclient: state_init[2:2]
dhclient: DHCPDISCOVER on eth1.3 to 255.255.255.255 port 67 interval 3 0xd1130731(3) <--- send DHCPDISCOVER
dhclient: DHCPOFFER of 192.168.100.139 from 192.168.100.120 0xd1130731(3) <--- send DHCPOFFER
dhclient: state_selecting[3:3]
dhclient: send_request cur_time[1702397658], firstsending [1702397658] state 4
dhclient: DHCPREQUEST for 192.168.100.139 on eth1.3 to 255.255.255.255 port 67 inter 19[0:10], timeout[10], 0xd1130731(4) <--- send DHCPREQUEST
dhclient: send_request: have sent 300 byte long packet over eth1.3 interface<5:6>.
dhclient: send_request: timeout tv[1702397677:352541]
dhclient: send_request cur_time[1702397677], firstsending [1702397658] state 4
dhclient: send_request cancel, interval 19, timeout 10, cur time 1702397677, firstsending 1702397658, 0xd1130731(2) <--- failed to get the DHCPACK from dhcp server
******our dhclient debug log******
By checking the souce of dhcp/client/dhclient.c, it looks like the DHCPREQUEST packet is canceled due to timeout .
void send_request (cpp)
void *cpp;
{
...... snip ......
if ((client -> state == S_REBOOTING ||
client -> state == S_REQUESTING) &&
interval > client -> config -> reboot_timeout) {
cancel:
client -> state = S_INIT;
cancel_timeout (send_request, client);
log_debug ("%s cansel, interval %d, timeout %d, cur time %ld, firstsending %ld, 0x%x(%d)", <--- the log for "failed to send DHCPREQUEST"
__func__, ntohl(client -> xid), client -> state,
interval, client -> config -> reboot_timeout,
cur_time, client -> first_sending);
state_init (client);
return;
}
...... snip ......
}
We also traced the kernel for DHCPREQUEST, we can see the DHCPDISCOVER
packet and the DHCPREQUEST packet is sent in dpa_xmit, which is from
drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth.h:
******our kernel debug log******
kernel:vlan_dev_hard_start_xmit: tid 0xd1130731 DHCPDISCOVER
kernel:__dev_queue_xmit: tid 0xd1130731 DHCPDISCOVER
kernel:xmit_one: tid 0xd1130731 DHCPDISCOVER
kernel:dpa_xmit: tid 0xd1130731 DHCPDISCOVER
kernel:vlan_dev_hard_start_xmit: tid 0xd1130731 DHCPREQUEST
kernel:__dev_queue_xmit: tid 0xd1130731 DHCPREQUEST
kernel:xmit_one: tid 0xd1130731 DHCPREQUEST
kernel:dpa_xmit: tid 0xd1130731 DHCPREQUEST
******our kernel debug log******
However, we cannot see the DHCPREQUEST packet in pcap:
******network capture******
No. Time Source Destination Protocol Length Info
17723 16200.109131 0.0.0.0 255.255.255.255 DHCP 342 DHCP Discover - Transaction ID 0xd1130731
17724 16200.110468 192.168.100.120 192.168.100.139 DHCP 342 DHCP Offer - Transaction ID 0xd1130731
17725 16200.126369 192.168.100.120 192.168.100.139 DHCP 342 DHCP Offer - Transaction ID 0xd1130731
17726 16200.126923 192.168.100.120 192.168.100.139 DHCP 342 DHCP Offer - Transaction ID 0xd1130731
17727 16200.127650 192.168.100.120 192.168.100.139 DHCP 342 DHCP Offer - Transaction ID 0xd1130731
******network capture******
My question is, is it possbile to confirm the issue is from dpaa driver or H/W?
As you can see, dpa_xmit has gotten the DHCPREQUEST packet, but the packet is
not sent out by H/W.
How we can know where the packet is lost ?
Please let me know any further requests from us.