All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH S24 v2 01/12] ice: Allow egress control packets from PF_VSI
@ 2019-07-29  9:04 Tony Nguyen
  2019-07-29  9:04 ` [Intel-wired-lan] [PATCH S24 v2 02/12] ice: Account for all states of FW DCBx and LLDP Tony Nguyen
                   ` (11 more replies)
  0 siblings, 12 replies; 24+ messages in thread
From: Tony Nguyen @ 2019-07-29  9:04 UTC (permalink / raw)
  To: intel-wired-lan

From: Dave Ertman <david.m.ertman@intel.com>

For control packets (i.e. LLDP packets) to be able to egress
from the main VSI, a bit has to be set in the TX_descriptor.
This should only be done for the main VSI and only if the
FW LLDP agent is disabled.  A bit to allow this also has to
be set in the VSI context.

Add the logic to add the necessary bits in the VSI context
for the PF_VSI and the TX_descriptors for control packets
egressing the PF_VSI.

Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_lib.c  |  7 +++++++
 drivers/net/ethernet/intel/ice/ice_txrx.c | 11 ++++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
index a62496a74a69..6b5882c49004 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_lib.c
@@ -1021,6 +1021,13 @@ static int ice_vsi_init(struct ice_vsi *vsi, bool init_vsi)
 			ICE_AQ_VSI_SEC_FLAG_ENA_MAC_ANTI_SPOOF;
 	}
 
+	/* Allow control frames out of main VSI */
+	if (vsi->type == ICE_VSI_PF) {
+		ctxt->info.sec_flags |= ICE_AQ_VSI_SEC_FLAG_ALLOW_DEST_OVRD;
+		ctxt->info.valid_sections |=
+			cpu_to_le16(ICE_AQ_VSI_PROP_SECURITY_VALID);
+	}
+
 	if (init_vsi) {
 		ret = ice_add_vsi(hw, vsi->idx, ctxt, NULL);
 		if (ret) {
diff --git a/drivers/net/ethernet/intel/ice/ice_txrx.c b/drivers/net/ethernet/intel/ice/ice_txrx.c
index 75b0afe02015..190871b59c54 100644
--- a/drivers/net/ethernet/intel/ice/ice_txrx.c
+++ b/drivers/net/ethernet/intel/ice/ice_txrx.c
@@ -2107,6 +2107,7 @@ static netdev_tx_t
 ice_xmit_frame_ring(struct sk_buff *skb, struct ice_ring *tx_ring)
 {
 	struct ice_tx_offload_params offload = { 0 };
+	struct ice_vsi *vsi = tx_ring->vsi;
 	struct ice_tx_buf *first;
 	unsigned int count;
 	int tso, csum;
@@ -2154,7 +2155,15 @@ ice_xmit_frame_ring(struct sk_buff *skb, struct ice_ring *tx_ring)
 	if (csum < 0)
 		goto out_drop;
 
-	if (tso || offload.cd_tunnel_params) {
+	/* allow CONTROL frames egress from main VSI if FW LLDP disabled */
+	if (unlikely(skb->priority == TC_PRIO_CONTROL &&
+		     vsi->type == ICE_VSI_PF &&
+		     vsi->port_info->is_sw_lldp))
+		offload.cd_qw1 |= (u64)(ICE_TX_DESC_DTYPE_CTX |
+					ICE_TX_CTX_DESC_SWTCH_UPLINK <<
+					ICE_TXD_CTX_QW1_CMD_S);
+
+	if (offload.cd_qw1 & ICE_TX_DESC_DTYPE_CTX) {
 		struct ice_tx_ctx_desc *cdesc;
 		int i = tx_ring->next_to_use;
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2019-07-31 17:13 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-29  9:04 [Intel-wired-lan] [PATCH S24 v2 01/12] ice: Allow egress control packets from PF_VSI Tony Nguyen
2019-07-29  9:04 ` [Intel-wired-lan] [PATCH S24 v2 02/12] ice: Account for all states of FW DCBx and LLDP Tony Nguyen
2019-07-31 17:08   ` Bowers, AndrewX
2019-07-29  9:04 ` [Intel-wired-lan] [PATCH S24 v2 03/12] ice: Don't call synchronize_irq() for VF's from the host Tony Nguyen
2019-07-31 17:08   ` Bowers, AndrewX
2019-07-29  9:04 ` [Intel-wired-lan] [PATCH S24 v2 04/12] ice: Treat DCBx state NOT_STARTED as valid Tony Nguyen
2019-07-31 17:09   ` Bowers, AndrewX
2019-07-29  9:04 ` [Intel-wired-lan] [PATCH S24 v2 05/12] ice: Fix RSS LUT table when setting Rx channels Tony Nguyen
2019-07-31 17:10   ` Bowers, AndrewX
2019-07-29  9:04 ` [Intel-wired-lan] [PATCH S24 v2 06/12] ice: Copy dcbx configuration only if mode is correct Tony Nguyen
2019-07-31 17:10   ` Bowers, AndrewX
2019-07-29  9:04 ` [Intel-wired-lan] [PATCH S24 v2 07/12] ice: reject VF attempts to enable head writeback Tony Nguyen
2019-07-31 17:11   ` Bowers, AndrewX
2019-07-29  9:04 ` [Intel-wired-lan] [PATCH S24 v2 08/12] ice: Rename ethtool private flag for lldp Tony Nguyen
2019-07-31 17:11   ` Bowers, AndrewX
2019-07-29  9:04 ` [Intel-wired-lan] [PATCH S24 v2 09/12] ice: silence some bogus error messages Tony Nguyen
2019-07-31 17:12   ` Bowers, AndrewX
2019-07-29  9:04 ` [Intel-wired-lan] [PATCH S24 v2 10/12] ice: Fix flag used for module query Tony Nguyen
2019-07-31 17:12   ` Bowers, AndrewX
2019-07-29  9:04 ` [Intel-wired-lan] [PATCH S24 v2 11/12] ice: Don't clear auto_fec bit in ice_cfg_phy_fec() Tony Nguyen
2019-07-31 17:13   ` Bowers, AndrewX
2019-07-29  9:04 ` [Intel-wired-lan] [PATCH S24 v2 12/12] ice: Add input handlers for virtual channel handlers Tony Nguyen
2019-07-31 17:13   ` Bowers, AndrewX
2019-07-31 17:07 ` [Intel-wired-lan] [PATCH S24 v2 01/12] ice: Allow egress control packets from PF_VSI Bowers, AndrewX

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.