Commit e0d2795a authored by Przemek Kitszel's avatar Przemek Kitszel
Browse files

ice: finish virtchnl.c split into rss.c



Move functions out of virt/virtchnl.c to virt/rss.c.

Same "git tricks" used as for the split into virt/queues.c
that is immediately preceding this split.

Signed-off-by: default avatarPrzemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent 270251b9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ ice-$(CONFIG_PCI_IOV) += \
	virt/fdir.o		\
	virt/queues.o		\
	virt/virtchnl.o		\
	virt/rss.o		\
	ice_vf_mbx.o		\
	ice_vf_vsi_vlan_ops.o	\
	ice_vf_lib.o
+7 −6
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
/* Copyright (C) 2022, Intel Corporation. */

#include "rss.h"
#include "ice_vf_lib_private.h"
#include "ice.h"

@@ -343,7 +344,7 @@ static bool ice_vf_adv_rss_offload_ena(u32 caps)
 *
 * This function adds/deletes a RSS config
 */
static int ice_vc_handle_rss_cfg(struct ice_vf *vf, u8 *msg, bool add)
int ice_vc_handle_rss_cfg(struct ice_vf *vf, u8 *msg, bool add)
{
	u32 v_opcode = add ? VIRTCHNL_OP_ADD_RSS_CFG : VIRTCHNL_OP_DEL_RSS_CFG;
	struct virtchnl_rss_cfg *rss_cfg = (struct virtchnl_rss_cfg *)msg;
@@ -479,7 +480,7 @@ static int ice_vc_handle_rss_cfg(struct ice_vf *vf, u8 *msg, bool add)
 *
 * Configure the VF's RSS key
 */
static int ice_vc_config_rss_key(struct ice_vf *vf, u8 *msg)
int ice_vc_config_rss_key(struct ice_vf *vf, u8 *msg)
{
	enum virtchnl_status_code v_ret = VIRTCHNL_STATUS_SUCCESS;
	struct virtchnl_rss_key *vrk =
@@ -526,7 +527,7 @@ static int ice_vc_config_rss_key(struct ice_vf *vf, u8 *msg)
 *
 * Configure the VF's RSS LUT
 */
static int ice_vc_config_rss_lut(struct ice_vf *vf, u8 *msg)
int ice_vc_config_rss_lut(struct ice_vf *vf, u8 *msg)
{
	struct virtchnl_rss_lut *vrl = (struct virtchnl_rss_lut *)msg;
	enum virtchnl_status_code v_ret = VIRTCHNL_STATUS_SUCCESS;
@@ -572,7 +573,7 @@ static int ice_vc_config_rss_lut(struct ice_vf *vf, u8 *msg)
 *
 * Configure the VF's RSS Hash function
 */
static int ice_vc_config_rss_hfunc(struct ice_vf *vf, u8 *msg)
int ice_vc_config_rss_hfunc(struct ice_vf *vf, u8 *msg)
{
	struct virtchnl_rss_hfunc *vrh = (struct virtchnl_rss_hfunc *)msg;
	enum virtchnl_status_code v_ret = VIRTCHNL_STATUS_SUCCESS;
@@ -614,7 +615,7 @@ static int ice_vc_config_rss_hfunc(struct ice_vf *vf, u8 *msg)
 * ice_vc_get_rss_hashcfg - return the RSS Hash configuration
 * @vf: pointer to the VF info
 */
static int ice_vc_get_rss_hashcfg(struct ice_vf *vf)
int ice_vc_get_rss_hashcfg(struct ice_vf *vf)
{
	enum virtchnl_status_code v_ret = VIRTCHNL_STATUS_SUCCESS;
	struct virtchnl_rss_hashcfg *vrh = NULL;
@@ -653,7 +654,7 @@ static int ice_vc_get_rss_hashcfg(struct ice_vf *vf)
 * @vf: pointer to the VF info
 * @msg: pointer to the msg buffer
 */
static int ice_vc_set_rss_hashcfg(struct ice_vf *vf, u8 *msg)
int ice_vc_set_rss_hashcfg(struct ice_vf *vf, u8 *msg)
{
	struct virtchnl_rss_hashcfg *vrh = (struct virtchnl_rss_hashcfg *)msg;
	enum virtchnl_status_code v_ret = VIRTCHNL_STATUS_SUCCESS;
+18 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2022, Intel Corporation. */

#ifndef _ICE_VIRT_RSS_H_
#define _ICE_VIRT_RSS_H_

#include <linux/types.h>

struct ice_vf;

int ice_vc_handle_rss_cfg(struct ice_vf *vf, u8 *msg, bool add);
int ice_vc_config_rss_key(struct ice_vf *vf, u8 *msg);
int ice_vc_config_rss_lut(struct ice_vf *vf, u8 *msg);
int ice_vc_config_rss_hfunc(struct ice_vf *vf, u8 *msg);
int ice_vc_get_rss_hashcfg(struct ice_vf *vf);
int ice_vc_set_rss_hashcfg(struct ice_vf *vf, u8 *msg);

#endif /* _ICE_VIRT_RSS_H_ */
+1 −712

File changed.

Preview size limit exceeded, changes collapsed.