src/dpdk/drivers/net/cxgbe/base/t4_hw.c
int t4_read_config_vi_rss(struct adapter *adapter, int mbox, unsigned int viid,
			  u64 *flags, unsigned int *defq)
{
	struct fw_rss_vi_config_cmd c;
	unsigned int result;
	int ret;

	memset(&c, 0, sizeof(c));
	c.op_to_viid = cpu_to_be32(V_FW_CMD_OP(FW_RSS_VI_CONFIG_CMD) |
				   F_FW_CMD_REQUEST | F_FW_CMD_READ |
				   V_FW_RSS_VI_CONFIG_CMD_VIID(viid));
	c.retval_len16 = cpu_to_be32(FW_LEN16(c));
	ret = t4_wr_mbox(adapter, mbox, &c, sizeof(c), &c);
	if (!ret) {
		result = be32_to_cpu(c.u.basicvirtual.defaultq_to_udpen);
		if (defq)
			*defq = G_FW_RSS_VI_CONFIG_CMD_DEFAULTQ(result);
		if (flags)
			*flags = result & M_FW_RSS_VI_CONFIG_CMD_DEFAULTQ;
	}

	return ret;
}
/**
 * t4_read_config_vi_rss - read the configured per VI RSS settings
 * @adapter: the adapter
 * @mbox: mbox to use for the FW command
 * @viid: the VI id
 * @flags: where to place the configured flags
 * @defq: where to place the id of the default RSS queue for the VI.
 *
 * Read configured VI-specific RSS properties.
 */


Read configured VI-specific RSS properties.
Read configured VI - specific RSS properties .
int t4_read_config_vi_rss(struct adapter *adapter, int mbox, unsigned int viid,
			  u64 *flags, unsigned int *defq)
{
	struct fw_rss_vi_config_cmd c;
	unsigned int result;
	int ret;
	memset(&c, 0, sizeof(c));
	c.op_to_viid = cpu_to_be32(V_FW_CMD_OP(FW_RSS_VI_CONFIG_CMD) |
				   F_FW_CMD_REQUEST | F_FW_CMD_READ |
				   V_FW_RSS_VI_CONFIG_CMD_VIID(viid));
	c.retval_len16 = cpu_to_be32(FW_LEN16(c));
	ret = t4_wr_mbox(adapter, mbox, &c, sizeof(c), &c);
	if (!ret) {
		result = be32_to_cpu(c.u.basicvirtual.defaultq_to_udpen);
		if (defq)
			*defq = G_FW_RSS_VI_CONFIG_CMD_DEFAULTQ(result);
		if (flags)
			*flags = result & M_FW_RSS_VI_CONFIG_CMD_DEFAULTQ;
	}
	return ret;
}
int t4_read_config_vi_rss ( struct adapter * adapter , int mbox , unsigned int viid , u64 * flags , unsigned int * defq ) { struct fw_rss_vi_config_cmd c ; unsigned int result ; int ret ; memset ( & c , 0 , sizeof ( c ) ) ; c . op_to_viid = cpu_to_be32 ( V_FW_CMD_OP ( FW_RSS_VI_CONFIG_CMD ) | F_FW_CMD_REQUEST | F_FW_CMD_READ | V_FW_RSS_VI_CONFIG_CMD_VIID ( viid ) ) ; c . retval_len16 = cpu_to_be32 ( FW_LEN16 ( c ) ) ; ret = t4_wr_mbox ( adapter , mbox , & c , sizeof ( c ) , & c ) ; if ( ! ret ) { result = be32_to_cpu ( c . u . basicvirtual . defaultq_to_udpen ) ; if ( defq ) * defq = G_FW_RSS_VI_CONFIG_CMD_DEFAULTQ ( result ) ; if ( flags ) * flags = result & M_FW_RSS_VI_CONFIG_CMD_DEFAULTQ ; } return ret ; }
t4_read_config_vi_rss - read the configured per VI RSS settings
 @adapter: the adapter
 @mbox: mbox to use for the FW command
 @viid: the VI id
 @flags: where to place the configured flags
 @defq: where to place the id of the default RSS queue for the VI.
t4_read_config_vi_rss - read the configured per VI RSS settings @adapter : the adapter @mbox : mbox to use for the FW command @viid : the VI id @flags : where to place the configured flags @defq : where to place the id of the default RSS queue for the VI .