patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Patil, Harish" <Harish.Patil@cavium.com>
To: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Cc: dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-stable] patch 'net/qede: fix default MAC address handling' has been queued to LTS release 16.11.2
Date: Sat, 6 May 2017 15:07:48 +0000	[thread overview]
Message-ID: <D53334C2.13FF22%Harish.Patil@cavium.com> (raw)
In-Reply-To: <1493717548-12434-4-git-send-email-yuanhan.liu@linux.intel.com>

>

>Hi,
>
>FYI, your patch has been queued to LTS release 16.11.2
>
>Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable
>yet. It will be pushed if I get no objections before 05/07/17.
>So please shout if anyone has objections.
>
>Thanks.
>
>	--yliu
>
>---
>From 9d5824d3cbf8eb610c37bb969bd7b1f24942017e Mon Sep 17 00:00:00 2001
>From: Harish Patil <harish.patil@cavium.com>
>Date: Tue, 25 Apr 2017 00:28:36 -0700
>Subject: [PATCH] net/qede: fix default MAC address handling
>
>[ upstream commit 49d8b54e867982d0ee55d0706d9b7cec73492542 ]
>
>- In qede_mac_addr_set(), in order to configure default MAC address we
>first delete the existing MAC address before trying to add new one. During
>init time, there is no MAC filter to begin with, so trying to remove a
>non-existing MAC address causes a firmware exception. This can be
>prevented
>by internally calling qede_mac_addr_add() which has the checks in place to
>delete a MAC address only if it was added before.
>
>- Remove setting of the default MAC address from within
>qede_dev_configure() since rte_eth_dev_start() calls mac_addr_set()
>anyway.
>
>Fixes: 2ea6f76aff40 ("qede: add core driver")
>
>Signed-off-by: Harish Patil <harish.patil@cavium.com>
>---
> drivers/net/qede/qede_ethdev.c | 30 +-----------------------------
> 1 file changed, 1 insertion(+), 29 deletions(-)
>
>diff --git a/drivers/net/qede/qede_ethdev.c
>b/drivers/net/qede/qede_ethdev.c
>index debf7bf..2322147 100644
>--- a/drivers/net/qede/qede_ethdev.c
>+++ b/drivers/net/qede/qede_ethdev.c
>@@ -433,8 +433,6 @@ qede_mac_addr_set(struct rte_eth_dev *eth_dev, struct
>ether_addr *mac_addr)
> {
> 	struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);
> 	struct ecore_dev *edev = QEDE_INIT_EDEV(qdev);
>-	struct ecore_filter_ucast ucast;
>-	int rc;
> 
> 	if (IS_VF(edev) && !ecore_vf_check_mac(ECORE_LEADING_HWFN(edev),
> 					       mac_addr->addr_bytes)) {
>@@ -444,29 +442,7 @@ qede_mac_addr_set(struct rte_eth_dev *eth_dev,
>struct ether_addr *mac_addr)
> 		return;
> 	}
> 
>-	/* First remove the primary mac */
>-	qede_set_ucast_cmn_params(&ucast);
>-	ucast.opcode = ECORE_FILTER_REMOVE;
>-	ucast.type = ECORE_FILTER_MAC;
>-	ether_addr_copy(&qdev->primary_mac,
>-			(struct ether_addr *)&ucast.mac);
>-	rc = ecore_filter_ucast_cmd(edev, &ucast, ECORE_SPQ_MODE_CB, NULL);
>-	if (rc != 0) {
>-		DP_ERR(edev, "Unable to remove current macaddr"
>-			     " Reverting to previous default mac\n");
>-		ether_addr_copy(&qdev->primary_mac,
>-				&eth_dev->data->mac_addrs[0]);
>-		return;
>-	}
>-
>-	/* Add new MAC */
>-	ucast.opcode = ECORE_FILTER_ADD;
>-	ether_addr_copy(mac_addr, (struct ether_addr *)&ucast.mac);
>-	rc = ecore_filter_ucast_cmd(edev, &ucast, ECORE_SPQ_MODE_CB, NULL);
>-	if (rc != 0)
>-		DP_ERR(edev, "Unable to add new default mac\n");
>-	else
>-		ether_addr_copy(mac_addr, &qdev->primary_mac);
>+	qede_mac_addr_add(eth_dev, mac_addr, 0, 0);
> }
> 
> static void qede_config_accept_any_vlan(struct qede_dev *qdev, bool
>action)
>@@ -741,10 +717,6 @@ static int qede_dev_configure(struct rte_eth_dev
>*eth_dev)
> 
> 	SLIST_INIT(&qdev->vlan_list_head);
> 
>-	/* Add primary mac for PF */
>-	if (IS_PF(edev))
>-		qede_mac_addr_set(eth_dev, &qdev->primary_mac);
>-
> 	/* Enable VLAN offloads by default */
> 	qede_vlan_offload_set(eth_dev, ETH_VLAN_STRIP_MASK  |
> 				       ETH_VLAN_FILTER_MASK |
>-- 
>1.9.0
>
>

Hi Yuanhan,
Sure, there are no objections to push  it to dpdk-stable.
Thanks.


  reply	other threads:[~2017-05-06 15:07 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-02  9:32 [dpdk-stable] patch 'examples: fix build clean on FreeBSD' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'examples/performance-thread: fix compilation on Suse 11 SP2' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'mbuf: fix missing includes in exported header' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'net/qede: fix default MAC address handling' " Yuanhan Liu
2017-05-06 15:07   ` Patil, Harish [this message]
2017-05-02  9:32 ` [dpdk-stable] patch 'net/qede: fix fastpath rings reset phase' " Yuanhan Liu
2017-05-06 15:06   ` Patil, Harish
2017-05-02  9:32 ` [dpdk-stable] patch 'net/qede/base: fix find zero bit macro' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'net/i40e: fix mbuf alloc failed counter' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'net/bonding: fix updating slave link status' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'net/virtio: fix MSI-X for modern devices' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'net/virtio: fix link status always down' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'net/virtio: fix crash when closing twice' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'crypto/openssl: fix AAD capabilities for AES-GCM' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'crypto/openssl: fix AES-GCM capability' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix packets array index' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'crypto/qat: fix dequeue statistics' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'cryptodev: fix API digest length comments' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'app/testpmd: fix crash at mbuf pool creation' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'app/testpmd: fix exit without freeing resources' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'examples/performance-thread: fix build on FreeBSD 10.0' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'examples/multi_process: fix timer update' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'examples/l3fwd-power: fix handling no Rx queue' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'examples/l3fwd-power: fix Rx descriptor size' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'examples/load_balancer: fix Tx flush' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'net/thunderx: fix deadlock in Rx path' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'doc: add limitation of AAD size to QAT guide' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'net/qede: fix FW version string for VF' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'examples/performance-thread: fix build on FreeBSD' " Yuanhan Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D53334C2.13FF22%Harish.Patil@cavium.com \
    --to=harish.patil@cavium.com \
    --cc=stable@dpdk.org \
    --cc=yuanhan.liu@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).