From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas@monjalon.net>
Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com
 [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 54CEA1B173;
 Tue, 20 Feb 2018 18:31:08 +0100 (CET)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.nyi.internal (Postfix) with ESMTP id 0F55121859;
 Tue, 20 Feb 2018 12:31:07 -0500 (EST)
Received: from frontend1 ([10.202.2.160])
 by compute1.internal (MEProxy); Tue, 20 Feb 2018 12:31:07 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 cc:date:from:in-reply-to:message-id:references:subject:to
 :x-me-sender:x-me-sender:x-sasl-enc; s=mesmtp; bh=tyhDG7RPQB0bPL
 z1gNkzyKSsk5rkyrLkOGMAgMhhDn0=; b=FVs6N87T4jomyiEZklHyKY2kkubTcQ
 5Rba7IZDQ6+6Kpi2tBBdLDBLw/eKDCP1AUkkgs+Bb0F8cFpiaaB12aNwkHJ6PmKv
 0XhgbUfEktDYkVcWqz4fhIIXr8b4pooYpheALRldXgockXmKIx4YNU81ubig5u4u
 HO8bRLSJHSoOk=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:date:from:in-reply-to:message-id
 :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=
 fm2; bh=tyhDG7RPQB0bPLz1gNkzyKSsk5rkyrLkOGMAgMhhDn0=; b=lksFVNTN
 DBe3nBrdbvQBvns8c2J1GJAqGXcM6KgPWveDoVVCQu3cEJoMUfkkDcyVYZGEU6Qv
 l+nqIx+7QzK+Mdl8oXZrHa8fMyPdKdwpn+T+tM1eQ4PulfB24y6QYyArUc1aX+Wh
 mJ9DYCV1gMVj5wVggLJyqKQa60DvQayUly7V/N6vkBEbGSHK6z9TJtMQgpDe7zAy
 mH72/64TYGndw0ivDF96oUBy0l2Ah6bxmS+0rdSEPCP2i0IVsQl6Puo5aSfpm1OV
 mallkfbMezb6eZQOv6H5nfOkfTzLbeiLFvbiThwonSSCzvnTFQ+ZrTi3fCqgwmDm
 ABamKDxqSO4LLA==
X-ME-Sender: <xms:WluMWo0345Ztx63U4n0BwAvGZqM0mfEcSN4Ndg3jGR85hpAF5DZa6g>
Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184])
 by mail.messagingengine.com (Postfix) with ESMTPA id 0FC127E3CE;
 Tue, 20 Feb 2018 12:31:05 -0500 (EST)
From: Thomas Monjalon <thomas@monjalon.net>
To: john.mcnamara@intel.com,
	marko.kovacevic@intel.com
Cc: matan@mellanox.com,
	dev@dpdk.org,
	stable@dpdk.org
Date: Tue, 20 Feb 2018 18:30:39 +0100
Message-Id: <20180220173039.27266-3-thomas@monjalon.net>
X-Mailer: git-send-email 2.15.1
In-Reply-To: <20180220173039.27266-1-thomas@monjalon.net>
References: <20180220173039.27266-1-thomas@monjalon.net>
Subject: [dpdk-dev] [PATCH 2/2] doc: adapt features tables header height
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 20 Feb 2018 17:31:08 -0000

The length of the longest header name is used to adjust the padding
the header row automatically, instead of fixed length.
The previous length (10) was too short for vdev_netvsc.

Fixes: 6086ab3bb3d2 ("net/vdev_netvsc: introduce Hyper-V platform driver")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 doc/guides/conf.py | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index fc766890f..38de280ef 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -190,18 +190,23 @@ def generate_overview_table(output_filename, table_id, section, table_name, titl
     ini_files.sort()
 
     # Build up a list of the table header names from the ini filenames.
-    header_names = []
+    pmd_names = []
     for ini_filename in ini_files:
         name = ini_filename[:-4]
         name = name.replace('_vf', 'vf')
+        pmd_names.append(name)
 
-        # Pad the table header names to match the existing format.
+    # Pad the table header names.
+    max_header_len = len(max(pmd_names, key=len))
+    header_names = []
+    for name in pmd_names:
         if '_vec' in name:
             pmd, vec = name.split('_')
-            name = '{0:{fill}{align}7}vec'.format(pmd, fill='.', align='<')
+            name = '{0:{fill}{align}{width}}vec'.format(pmd,
+                    fill='.', align='<', width=max_header_len-3)
         else:
-            name = '{0:{fill}{align}10}'.format(name, fill=' ', align='<')
-
+            name = '{0:{fill}{align}{width}}'.format(name,
+                    fill=' ', align='<', width=max_header_len)
         header_names.append(name)
 
     # Create a dict of the defined features for each driver from the ini files.
@@ -253,7 +258,7 @@ def print_table_header(outfile, num_cols, header_names, title):
 
     print_table_row(outfile, title, line)
 
-    for i in range(1, 10):
+    for i in range(1, len(header_names[0])):
         line = ''
         for name in header_names:
             line += ' ' + name[i]
-- 
2.15.1