automatic DPDK test reports
 help / color / mirror / Atom feed
* |WARNING| pw106602 [PATCH] net/ice: Add / Remove VF mac address on DCF representor
@ 2022-01-27  9:59 dpdklab
  0 siblings, 0 replies; only message in thread
From: dpdklab @ 2022-01-27  9:59 UTC (permalink / raw)
  To: test-report; +Cc: dpdk-test-reports

[-- Attachment #1: Type: text/plain, Size: 4091 bytes --]

Test-Label: iol-testing
Test-Status: WARNING
http://dpdk.org/patch/106602

_apply patch failure_

Submitter: Ke Zhang <ke1x.zhang@intel.com>
Date: Thursday, January 27 2022 09:21:28 
Applied on: CommitID:5f6bc8a4edc50ba74eb28f974b6ebacdb799a5db
Apply patch set 106602 failed:

Checking patch drivers/net/ice/ice_dcf_ethdev.h...
Checking patch drivers/net/ice/ice_dcf_vf_representor.c...
Hunk #1 succeeded at 133 (offset -3 lines).
error: while searching for:
	}
	return ret;
}
static int
ice_dcf_add_del_vlan_v2(struct rte_eth_dev *dev, uint16_t vlanid, bool add)
{

error: patch failed: drivers/net/ice/ice_dcf_vf_representor.c:513
error: while searching for:
	.vlan_tpid_set        = ice_dcf_vf_repr_vlan_tpid_set,
	.stats_reset          = ice_dcf_vf_repr_stats_reset,
	.stats_get            = ice_dcf_vf_repr_stats_get,
	.vlan_filter_set      = ice_dcf_vf_repr_vlan_filter_set,
};


error: patch failed: drivers/net/ice/ice_dcf_vf_representor.c:581
Hunk #4 succeeded at 417 (offset -257 lines).
Applied patch drivers/net/ice/ice_dcf_ethdev.h cleanly.
Applying patch drivers/net/ice/ice_dcf_vf_representor.c with 2 rejects...
Hunk #1 applied cleanly.
Rejected hunk #2.
Rejected hunk #3.
Hunk #4 applied cleanly.
diff a/drivers/net/ice/ice_dcf_vf_representor.c b/drivers/net/ice/ice_dcf_vf_representor.c	(rejected hunks)
@@ -513,6 +513,82 @@ ice_dcf_vf_repr_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 	}
 	return ret;
 }
+static int
+ice_dcf_repr_add_del_eth_addr(struct ice_dcf_hw *hw,
+			uint16_t vf_id,
+			struct rte_ether_addr *addr,
+			bool add, uint8_t type)
+{
+	struct virtchnl_ether_addr_list *list;
+	struct dcf_virtchnl_cmd args;
+	uint8_t cmd_buffer[sizeof(struct virtchnl_ether_addr_list) +
+			   sizeof(struct virtchnl_ether_addr)];
+	int err;
+
+	list = (struct virtchnl_ether_addr_list *)cmd_buffer;
+	list->vsi_id = hw->vf_vsi_map[vf_id] & ~VIRTCHNL_DCF_VF_VSI_VALID;
+	list->num_elements = 1;
+	list->list[0].type = type;
+	rte_memcpy(list->list[0].addr, addr->addr_bytes,
+	    sizeof(addr->addr_bytes));
+
+	args.v_op = add ? VIRTCHNL_OP_ADD_ETH_ADDR : VIRTCHNL_OP_DEL_ETH_ADDR;
+	args.req_msg = cmd_buffer;
+	args.req_msglen = sizeof(cmd_buffer);
+
+	err = ice_dcf_execute_virtchnl_cmd(hw, &args);
+	if (err) {
+		PMD_DRV_LOG(ERR, "Fail to execute command %s",
+			    add ? "OP_ADD_ETH_ADDR" :  "OP_DEL_ETH_ADDR");
+		return err;
+	}
+
+	return 0;
+}
+
+static int
+ice_dcf_vf_repr_add_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *addr,
+		     __rte_unused uint32_t index,
+		     __rte_unused uint32_t pool)
+{
+	struct ice_dcf_vf_repr *repr = dev->data->dev_private;
+	struct ice_dcf_hw *hw = ice_dcf_vf_repr_hw(repr);
+	int err;
+
+	if (rte_is_zero_ether_addr(addr)) {
+		PMD_DRV_LOG(ERR, "Invalid Ethernet Address");
+		return -EINVAL;
+	}
+
+	err = ice_dcf_repr_add_del_eth_addr(hw, repr->vf_id, addr, true, VIRTCHNL_ETHER_ADDR_EXTRA);
+	if (err) {
+		PMD_DRV_LOG(ERR, "fail to add MAC address");
+		return -EIO;
+	}
+
+	repr->mac_num++;
+
+	return 0;
+}
+
+static void
+ice_dcf_vf_repr_del_mac_addr(struct rte_eth_dev *dev, uint32_t index)
+{
+	struct ice_dcf_vf_repr *repr = dev->data->dev_private;
+	struct ice_dcf_hw *hw = ice_dcf_vf_repr_hw(repr);
+	struct rte_ether_addr *addr;
+	int err;
+
+	addr = &dev->data->mac_addrs[index];
+
+	err = ice_dcf_repr_add_del_eth_addr(hw, repr->vf_id, addr,
+					false, VIRTCHNL_ETHER_ADDR_EXTRA);
+	if (err)
+		PMD_DRV_LOG(ERR, "fail to del MAC address");
+
+	repr->mac_num--;
+}
+
 static int
 ice_dcf_add_del_vlan_v2(struct rte_eth_dev *dev, uint16_t vlanid, bool add)
 {
@@ -581,6 +657,8 @@ static const struct eth_dev_ops ice_dcf_vf_repr_dev_ops = {
 	.vlan_tpid_set        = ice_dcf_vf_repr_vlan_tpid_set,
 	.stats_reset          = ice_dcf_vf_repr_stats_reset,
 	.stats_get            = ice_dcf_vf_repr_stats_get,
+	.mac_addr_add         = ice_dcf_vf_repr_add_mac_addr,
+	.mac_addr_remove      = ice_dcf_vf_repr_del_mac_addr,
 	.vlan_filter_set      = ice_dcf_vf_repr_vlan_filter_set,
 };
 

https://lab.dpdk.org/results/dashboard/patchsets/20838/

UNH-IOL DPDK Community Lab

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-27  9:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-27  9:59 |WARNING| pw106602 [PATCH] net/ice: Add / Remove VF mac address on DCF representor dpdklab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).