linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>,
	linux-scsi@vger.kernel.org, Johannes Thumshirn <jth@kernel.org>,
	Chad Dupuis <chad.dupuis@qlogic.com>,
	Hannes Reinecke <hare@suse.de>, Hannes Reinecke <hare@suse.com>
Subject: [PATCH 22/22] fcoe: set default TC priority
Date: Wed,  3 Aug 2016 15:13:22 +0200	[thread overview]
Message-ID: <1470230002-37737-23-git-send-email-hare@suse.de> (raw)
In-Reply-To: <1470230002-37737-1-git-send-email-hare@suse.de>

If DCB is not enabled or compiled in we still should be setting
a sane default priority. So put FCoE frames in priority class
'interactive' and FIP frames in priority class 'besteffort'.

Signed-off-by: Hannes Reinecke <hare@suse.com>
---
 drivers/scsi/fcoe/fcoe.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index c907661..f8ec94a 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -2168,6 +2168,8 @@ static bool fcoe_match(struct net_device *netdev)
  */
 static void fcoe_dcb_create(struct fcoe_interface *fcoe)
 {
+	int ctrl_prio = TC_PRIO_BESTEFFORT;
+	int fcoe_prio = TC_PRIO_INTERACTIVE;
 #ifdef CONFIG_DCB
 	int dcbx;
 	u8 fup, up;
@@ -2194,10 +2196,13 @@ static void fcoe_dcb_create(struct fcoe_interface *fcoe)
 			fup = dcb_getapp(netdev, &app);
 		}
 
-		fcoe->priority = ffs(up) ? ffs(up) - 1 : 0;
-		ctlr->priority = ffs(fup) ? ffs(fup) - 1 : fcoe->priority;
+		fcoe_prio = ffs(up) ? ffs(up) - 1 : 0;
+		ctlr_prio = ffs(fup) ? ffs(fup) - 1 : fcoe_prio;
+		prio_set = true;
 	}
 #endif
+	fcoe->priority = fcoe_prio;
+	ctlr->priority = ctlr_prio;
 }
 
 enum fcoe_create_link_state {
-- 
1.8.5.6


  parent reply	other threads:[~2016-08-03 13:13 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-03 13:13 [PATCH 00/22] FCoE VN2VN fixes Hannes Reinecke
2016-08-03 13:13 ` [PATCH 01/22] libfc: Revisit kref handling Hannes Reinecke
2016-08-04 10:59   ` Johannes Thumshirn
2016-08-18 14:43   ` Chad Dupuis
2016-08-03 13:13 ` [PATCH 02/22] libfc: additional debugging messages Hannes Reinecke
2016-08-03 17:33   ` Bart Van Assche
2016-08-04  6:05     ` Hannes Reinecke
2016-08-04 11:02   ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 03/22] fcoe: FIP debugging Hannes Reinecke
2016-08-03 17:36   ` Bart Van Assche
2016-08-04  6:07     ` Hannes Reinecke
2016-08-04 11:09   ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 04/22] libfc: spurious I/O error under high load Hannes Reinecke
2016-08-04 11:15   ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 05/22] libfc: Do not attempt to login if the port is already started Hannes Reinecke
2016-08-04 11:18   ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 06/22] libfc: Debug PRLI failures Hannes Reinecke
2016-08-04 11:21   ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 07/22] fcoe: filter out frames from invalid vlans Hannes Reinecke
2016-08-04 11:35   ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 08/22] fcoe: make R_A_TOV and E_D_TOV configurable Hannes Reinecke
2016-08-04 11:52   ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 09/22] libfc: use configured lport R_A_TOV when sending exchange Hannes Reinecke
2016-08-04 12:04   ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 10/22] libfc: use configured e_d_tov for remote port state retries Hannes Reinecke
2016-08-04 12:08   ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 11/22] fcoe: inhibit writing invalid values into the 'enabled' attribute Hannes Reinecke
2016-08-03 17:25   ` Bart Van Assche
2016-08-04  6:02     ` Hannes Reinecke
2016-08-03 13:13 ` [PATCH 12/22] libfc: don't fail sequence abort for completed exchanges Hannes Reinecke
2016-08-04 13:29   ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 13/22] libfc: do not overwrite DID_TIME_OUT status Hannes Reinecke
2016-08-04 13:30   ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 14/22] libfc: use error code for fc_rport_error() Hannes Reinecke
2016-08-04 13:40   ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 15/22] libfc: frame alloc failure messages Hannes Reinecke
2016-08-04 13:45   ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 16/22] fc: add missing ELS explanation values Hannes Reinecke
2016-08-04 13:54   ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 17/22] libfc: Send LS_RJT responses on frame allocation failure Hannes Reinecke
2016-08-04 13:58   ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 18/22] libfc: don't advance state machine for incoming FLOGI Hannes Reinecke
2016-08-04 13:59   ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 19/22] libfc: Implement RTV responder Hannes Reinecke
2016-08-04 14:03   ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 20/22] libfc: Do not drop out-of-order frames Hannes Reinecke
2016-08-04 14:03   ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 21/22] libfc: reset timeout on queue full Hannes Reinecke
2016-08-04 14:08   ` Johannes Thumshirn
2016-08-03 13:13 ` Hannes Reinecke [this message]
2016-08-03 13:38   ` [PATCH 22/22] fcoe: set default TC priority kbuild test robot
2016-08-04 14:59 ` [PATCH 00/22] FCoE VN2VN fixes Bart Van Assche
2016-08-05  7:43   ` Hannes Reinecke
2016-08-05 15:33     ` Bart Van Assche
2016-08-05 16:16       ` Hannes Reinecke
2016-08-07  0:12         ` Bart Van Assche

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=1470230002-37737-23-git-send-email-hare@suse.de \
    --to=hare@suse.de \
    --cc=chad.dupuis@qlogic.com \
    --cc=hare@suse.com \
    --cc=hch@lst.de \
    --cc=jth@kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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).