src/dpdk/drivers/net/i40e/i40e_ethdev.c
static enum i40e_status_code
i40e_aq_del_mirror_rule(struct i40e_hw *hw,
		uint16_t seid, uint16_t rule_type, uint16_t *entries,
		uint16_t count, uint16_t rule_id)
{
	struct i40e_aq_desc desc;
	struct i40e_aqc_add_delete_mirror_rule cmd;
	uint16_t buff_len = 0;
	enum i40e_status_code status;
	void *buff = NULL;

	i40e_fill_default_direct_cmd_desc(&desc,
					  i40e_aqc_opc_delete_mirror_rule);
	memset(&cmd, 0, sizeof(cmd));
	if (rule_type == I40E_AQC_MIRROR_RULE_TYPE_VLAN) {
		desc.flags |= rte_cpu_to_le_16((uint16_t)(I40E_AQ_FLAG_BUF |
							  I40E_AQ_FLAG_RD));
		cmd.num_entries = count;
		buff_len = sizeof(uint16_t) * count;
		desc.datalen = rte_cpu_to_le_16(buff_len);
		buff = (void *)entries;
	} else
		/* rule id is filled in destination field for deleting mirror rule */
		cmd.destination = rte_cpu_to_le_16(rule_id);

	cmd.rule_type = rte_cpu_to_le_16(rule_type <<
				I40E_AQC_MIRROR_RULE_TYPE_SHIFT);
	cmd.seid = rte_cpu_to_le_16(seid);

	rte_memcpy(&desc.params.raw, &cmd, sizeof(cmd));
	status = i40e_asq_send_command(hw, &desc, buff, buff_len, NULL);

	return status;
}
/**
 * i40e_aq_del_mirror_rule
 * @hw: pointer to the hardware structure
 * @seid: VEB seid to add mirror rule to
 * @entries: Buffer which contains the entities to be mirrored
 * @count: number of entities contained in the buffer
 * @rule_id:the rule_id of the rule to be delete
 *
 * Delete a mirror rule for a given veb.
 *
 **/


Delete a mirror rule for a given veb.
Delete a mirror rule for a given veb .
static enum i40e_status_code
i40e_aq_del_mirror_rule(struct i40e_hw *hw,
		uint16_t seid, uint16_t rule_type, uint16_t *entries,
		uint16_t count, uint16_t rule_id)
{
	struct i40e_aq_desc desc;
	struct i40e_aqc_add_delete_mirror_rule cmd;
	uint16_t buff_len = 0;
	enum i40e_status_code status;
	void *buff = NULL;
	i40e_fill_default_direct_cmd_desc(&desc,
					  i40e_aqc_opc_delete_mirror_rule);
	memset(&cmd, 0, sizeof(cmd));
	if (rule_type == I40E_AQC_MIRROR_RULE_TYPE_VLAN) {
		desc.flags |= rte_cpu_to_le_16((uint16_t)(I40E_AQ_FLAG_BUF |
							  I40E_AQ_FLAG_RD));
		cmd.num_entries = count;
		buff_len = sizeof(uint16_t) * count;
		desc.datalen = rte_cpu_to_le_16(buff_len);
		buff = (void *)entries;
	} else
		cmd.destination = rte_cpu_to_le_16(rule_id);
	cmd.rule_type = rte_cpu_to_le_16(rule_type <<
				I40E_AQC_MIRROR_RULE_TYPE_SHIFT);
	cmd.seid = rte_cpu_to_le_16(seid);
	rte_memcpy(&desc.params.raw, &cmd, sizeof(cmd));
	status = i40e_asq_send_command(hw, &desc, buff, buff_len, NULL);
	return status;
}
static enum i40e_status_code i40e_aq_del_mirror_rule ( struct i40e_hw * hw , uint16_t seid , uint16_t rule_type , uint16_t * entries , uint16_t count , uint16_t rule_id ) { struct i40e_aq_desc desc ; struct i40e_aqc_add_delete_mirror_rule cmd ; uint16_t buff_len = 0 ; enum i40e_status_code status ; void * buff = NULL ; i40e_fill_default_direct_cmd_desc ( & desc , i40e_aqc_opc_delete_mirror_rule ) ; memset ( & cmd , 0 , sizeof ( cmd ) ) ; if ( rule_type == I40E_AQC_MIRROR_RULE_TYPE_VLAN ) { desc . flags |= rte_cpu_to_le_16 ( ( uint16_t ) ( I40E_AQ_FLAG_BUF | I40E_AQ_FLAG_RD ) ) ; cmd . num_entries = count ; buff_len = sizeof ( uint16_t ) * count ; desc . datalen = rte_cpu_to_le_16 ( buff_len ) ; buff = ( void * ) entries ; } else cmd . destination = rte_cpu_to_le_16 ( rule_id ) ; cmd . rule_type = rte_cpu_to_le_16 ( rule_type << I40E_AQC_MIRROR_RULE_TYPE_SHIFT ) ; cmd . seid = rte_cpu_to_le_16 ( seid ) ; rte_memcpy ( & desc . params . raw , & cmd , sizeof ( cmd ) ) ; status = i40e_asq_send_command ( hw , & desc , buff , buff_len , NULL ) ; return status ; }
i40e_aq_del_mirror_rule
 @hw: pointer to the hardware structure
 @seid: VEB seid to add mirror rule to
 @entries: Buffer which contains the entities to be mirrored
 @count: number of entities contained in the buffer
 @rule_id:the rule_id of the rule to be delete
i40e_aq_del_mirror_rule @hw : pointer to the hardware structure @seid : VEB seid to add mirror rule to @entries : Buffer which contains the entities to be mirrored @count : number of entities contained in the buffer @rule_id : the rule_id of the rule to be delete
/* rule id is filled in destination field for deleting mirror rule */