src/dpdk/drivers/net/i40e/rte_pmd_i40e.c
static unsigned int
i40e_get_tlv_section_size(struct i40e_profile_section_header *sec)
{
	unsigned int i, nb_rec, nb_tlv = 0;
	struct i40e_profile_tlv_section_record *tlv;

	if (!sec)
		return nb_tlv;

	/* get number of records in the section */
	nb_rec = sec->section.size /
				sizeof(struct i40e_profile_tlv_section_record);
	for (i = 0; i < nb_rec; ) {
		tlv = (struct i40e_profile_tlv_section_record *)&sec[1 + i];
		i += tlv->len;
		nb_tlv++;
	}
	return nb_tlv;
}
/* Get number of tvl records in the section */
Get number of tvl records in the section
Get number of tvl records in the section
static unsigned int
i40e_get_tlv_section_size(struct i40e_profile_section_header *sec)
{
	unsigned int i, nb_rec, nb_tlv = 0;
	struct i40e_profile_tlv_section_record *tlv;
	if (!sec)
		return nb_tlv;
	nb_rec = sec->section.size /
				sizeof(struct i40e_profile_tlv_section_record);
	for (i = 0; i < nb_rec; ) {
		tlv = (struct i40e_profile_tlv_section_record *)&sec[1 + i];
		i += tlv->len;
		nb_tlv++;
	}
	return nb_tlv;
}
static unsigned int i40e_get_tlv_section_size ( struct i40e_profile_section_header * sec ) { unsigned int i , nb_rec , nb_tlv = 0 ; struct i40e_profile_tlv_section_record * tlv ; if ( ! sec ) return nb_tlv ; nb_rec = sec -> section . size / sizeof ( struct i40e_profile_tlv_section_record ) ; for ( i = 0 ; i < nb_rec ; ) { tlv = ( struct i40e_profile_tlv_section_record * ) & sec [ 1 + i ] ; i += tlv -> len ; nb_tlv ++ ; } return nb_tlv ; }
Get number of tvl records in the section
Get number of tvl records in the section
/* get number of records in the section */