#ifdef USE_JANSSON
union PFID {
- struct ether_addr addr;
+ struct rte_ether_addr addr;
uint64_t pfid;
};
static int
-str_to_ether_addr(const char *a, struct ether_addr *ether_addr)
+str_to_ether_addr(const char *a, struct rte_ether_addr *ether_addr)
{
int i;
char *end;
if (ret)
return ret;
} else if (!strcmp(key, "name")) {
- strcpy(pkt->vm_name, json_string_value(value));
+ strlcpy(pkt->vm_name, json_string_value(value),
+ sizeof(pkt->vm_name));
} else if (!strcmp(key, "command")) {
char command[32];
strlcpy(command, json_string_value(value), 32);
RTE_ETH_FOREACH_DEV(x) {
ret = rte_pmd_i40e_query_vfid_by_mac(x,
- (struct ether_addr *)&(pol->pkt.vfid[i]));
+ (struct rte_ether_addr *)&(pol->pkt.vfid[i]));
if (ret != -EINVAL) {
pol->port[i] = x;
break;
break;
} while (indent > 0);
- if (indent > 0)
- /*
- * We've broken out of the read loop without getting
- * a closing brace, so throw away the data
- */
- json_data[idx] = 0;
+ json_data[idx] = '\0';
if (strlen(json_data) == 0)
continue;