All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Alexander Duyck <alexander.h.duyck@intel.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	jogreene@redhat.com, Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 04/13] i40e: Reprogram port offloads after reset
Date: Sun, 30 Apr 2017 06:24:42 -0700	[thread overview]
Message-ID: <20170430132451.68494-5-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <20170430132451.68494-1-jeffrey.t.kirsher@intel.com>

From: Alexander Duyck <alexander.h.duyck@intel.com>

This patch corrects a major oversight in that we were not reprogramming the
ports after a reset.  As a result we completely lost all of the Rx tunnel
offloads on receive including Rx checksum, RSS on inner headers, and ATR.

The fix for this is pretty standard as all we needed to do is reset the
filter bits to pending for all active filters and schedule the sync event.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 063044268170..f44affc7e08c 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -7331,6 +7331,23 @@ static void i40e_handle_mdd_event(struct i40e_pf *pf)
 }
 
 /**
+ * i40e_sync_udp_filters - Trigger a sync event for existing UDP filters
+ * @pf: board private structure
+ **/
+static void i40e_sync_udp_filters(struct i40e_pf *pf)
+{
+	int i;
+
+	/* loop through and set pending bit for all active UDP filters */
+	for (i = 0; i < I40E_MAX_PF_UDP_OFFLOAD_PORTS; i++) {
+		if (pf->udp_ports[i].port)
+			pf->pending_udp_bitmap |= BIT_ULL(i);
+	}
+
+	pf->flags |= I40E_FLAG_UDP_FILTER_SYNC;
+}
+
+/**
  * i40e_sync_udp_filters_subtask - Sync the VSI filter list with HW
  * @pf: board private structure
  **/
@@ -10738,6 +10755,9 @@ static int i40e_setup_pf_switch(struct i40e_pf *pf, bool reinit)
 
 	i40e_ptp_init(pf);
 
+	/* repopulate tunnel port filters */
+	i40e_sync_udp_filters(pf);
+
 	return ret;
 }
 
-- 
2.12.2

  parent reply	other threads:[~2017-04-30 13:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-30 13:24 [net-next 00/13][pull request] 40GbE Intel Wired LAN Driver Updates 2017-04-30 Jeff Kirsher
2017-04-30 13:24 ` [net-next 01/13] i40e: properly spell I40E_VF_STATE_* flags Jeff Kirsher
2017-04-30 13:24 ` [net-next 02/13] i40e: make use of i40e_reset_all_vfs when initializing new VFs Jeff Kirsher
2017-04-30 13:24 ` [net-next 03/13] i40e: rename index to port to avoid confusion Jeff Kirsher
2017-04-30 13:24 ` Jeff Kirsher [this message]
2017-04-30 13:24 ` [net-next 05/13] i40e: amortize wait time when disabling lots of VFs Jeff Kirsher
2017-04-30 13:24 ` [net-next 06/13] i40e: remove unnecessary msleep() delay in i40e_free_vfs Jeff Kirsher
2017-04-30 13:24 ` [net-next 07/13] i40e: separate PF and VSI state flags Jeff Kirsher
2017-04-30 13:24 ` [net-next 08/13] i40e: use DECLARE_BITMAP for state fields Jeff Kirsher
2017-04-30 13:24 ` [net-next 09/13] i40evf: remove needless min_t() on num_online_cpus()*2 Jeff Kirsher
2017-04-30 13:24 ` [net-next 10/13] i40e: remove hw_disabled_flags in favor of using separate flag bits Jeff Kirsher
2017-04-30 13:24 ` [net-next 11/13] i40evf: remove I40E_FLAG_FDIR_ATR_ENABLED Jeff Kirsher
2017-04-30 13:24 ` [net-next 12/13] i40evf: allocate queues before we setup the interrupts and q_vectors Jeff Kirsher
2017-04-30 13:24 ` [net-next 13/13] i40evf: hide unused variable Jeff Kirsher
2017-04-30 15:36 ` [net-next 00/13][pull request] 40GbE Intel Wired LAN Driver Updates 2017-04-30 David Miller

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=20170430132451.68494-5-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=alexander.h.duyck@intel.com \
    --cc=davem@davemloft.net \
    --cc=jogreene@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sassmann@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.