tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: bef6f06e039b8929481350d15d6d8c3ba81c6fd2 commit: 19f053b7ee378e6d556caddf05485fe55695149e [15413/30000] net: hns3: add support handling tx dhcp packets for ROH config: arm64-randconfig-r131-20240925 (https://download.01.org/0day-ci/archive/20240928/202409282011.zsMjvrEl-lkp@i...) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce: (https://download.01.org/0day-ci/archive/20240928/202409282011.zsMjvrEl-lkp@i...)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot lkp@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202409282011.zsMjvrEl-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c:1184:29: sparse: sparse: restricted __be32 degrades to integer
vim +1184 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
1167 1168 static struct hns3_dhcp_packet *hns3_get_dhcp_packet(struct sk_buff *skb, 1169 int *dhcp_len) 1170 { 1171 struct hns3_dhcp_packet *dhcp; 1172 union l4_hdr_info l4; 1173 int l4_payload_len; 1174 1175 l4.hdr = skb_transport_header(skb); 1176 if (l4.udp->dest != htons(HNS3_DHCP_CLIENT_PORT) || 1177 l4.udp->source != htons(HNS3_DHCP_SERVER_PORT)) 1178 return NULL; 1179 1180 dhcp = (struct hns3_dhcp_packet *)(l4.hdr + sizeof(struct udphdr)); 1181 l4_payload_len = ntohs(l4.udp->len) - sizeof(struct udphdr); 1182 if (l4_payload_len < offsetof(struct hns3_dhcp_packet, options) || 1183 dhcp->hlen != ETH_ALEN ||
1184 dhcp->cookie != htonl(HNS3_DHCP_MAGIC))
1185 return NULL; 1186 1187 *dhcp_len = l4_payload_len; 1188 return dhcp; 1189 } 1190