net/iavf: add RSS configuration for VF
The VF must be capable of configuring RSS. Add a virtchnl handler to parse a specific RSS configuration, and process the configuration for VFs, such as add or delete a RSS rule. Signed-off-by: Jeff Guo <jia.guo@intel.com> Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
This commit is contained in:
parent
e482a3c9f5
commit
7be10c3004
@ -116,6 +116,7 @@ New Features
|
||||
|
||||
* Added generic filter support.
|
||||
* Added advanced iavf with FDIR capability.
|
||||
* Added advanced RSS configuration for VFs.
|
||||
|
||||
* **Updated the Intel ice driver.**
|
||||
|
||||
|
@ -25,6 +25,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_vchnl.c
|
||||
SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_rxtx.c
|
||||
SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_generic_flow.c
|
||||
SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_fdir.c
|
||||
SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_hash.c
|
||||
ifeq ($(CONFIG_RTE_ARCH_X86), y)
|
||||
SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_rxtx_vec_sse.c
|
||||
endif
|
||||
|
@ -270,4 +270,6 @@ int iavf_fdir_add(struct iavf_adapter *adapter, struct iavf_fdir_conf *filter);
|
||||
int iavf_fdir_del(struct iavf_adapter *adapter, struct iavf_fdir_conf *filter);
|
||||
int iavf_fdir_check(struct iavf_adapter *adapter,
|
||||
struct iavf_fdir_conf *filter);
|
||||
int iavf_add_del_rss_cfg(struct iavf_adapter *adapter,
|
||||
struct virtchnl_rss_cfg *rss_cfg, bool add);
|
||||
#endif /* _IAVF_ETHDEV_H_ */
|
||||
|
1053
drivers/net/iavf/iavf_hash.c
Normal file
1053
drivers/net/iavf/iavf_hash.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -335,13 +335,10 @@ iavf_get_vf_resource(struct iavf_adapter *adapter)
|
||||
args.out_buffer = vf->aq_resp;
|
||||
args.out_size = IAVF_AQ_BUF_SZ;
|
||||
|
||||
/* TODO: basic offload capabilities, need to
|
||||
* add advanced/optional offload capabilities
|
||||
*/
|
||||
|
||||
caps = IAVF_BASIC_OFFLOAD_CAPS | VIRTCHNL_VF_CAP_ADV_LINK_SPEED |
|
||||
VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC |
|
||||
VIRTCHNL_VF_OFFLOAD_FDIR_PF;
|
||||
VIRTCHNL_VF_OFFLOAD_FDIR_PF |
|
||||
VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF;
|
||||
|
||||
args.in_args = (uint8_t *)∩︀
|
||||
args.in_args_size = sizeof(caps);
|
||||
@ -1007,3 +1004,29 @@ iavf_fdir_check(struct iavf_adapter *adapter,
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
iavf_add_del_rss_cfg(struct iavf_adapter *adapter,
|
||||
struct virtchnl_rss_cfg *rss_cfg, bool add)
|
||||
{
|
||||
struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);
|
||||
struct iavf_cmd_info args;
|
||||
int err;
|
||||
|
||||
memset(&args, 0, sizeof(args));
|
||||
args.ops = add ? VIRTCHNL_OP_ADD_RSS_CFG :
|
||||
VIRTCHNL_OP_DEL_RSS_CFG;
|
||||
args.in_args = (u8 *)rss_cfg;
|
||||
args.in_args_size = sizeof(*rss_cfg);
|
||||
args.out_buffer = vf->aq_resp;
|
||||
args.out_size = IAVF_AQ_BUF_SZ;
|
||||
|
||||
err = iavf_execute_vf_cmd(adapter, &args);
|
||||
if (err)
|
||||
PMD_DRV_LOG(ERR,
|
||||
"Failed to execute command of %s",
|
||||
add ? "OP_ADD_RSS_CFG" :
|
||||
"OP_DEL_RSS_INPUT_CFG");
|
||||
|
||||
return err;
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ sources = files(
|
||||
'iavf_vchnl.c',
|
||||
'iavf_generic_flow.c',
|
||||
'iavf_fdir.c',
|
||||
'iavf_hash.c',
|
||||
)
|
||||
|
||||
if arch_subdir == 'x86'
|
||||
|
Loading…
Reference in New Issue
Block a user