From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout3.w1.samsung.com (mailout3.w1.samsung.com [210.118.77.13]) by dpdk.org (Postfix) with ESMTP id 9FA6A37B4; Fri, 7 Apr 2017 17:07:23 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OO1006JDOO9F920@mailout3.w1.samsung.com>; Fri, 07 Apr 2017 16:07:21 +0100 (BST) Received: from eusmges2.samsung.com (unknown [203.254.199.241]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170407150721eucas1p2e53b0aa2577bd747242339fae21d4d5e~zJfZKnCOs2848128481eucas1p2K; Fri, 7 Apr 2017 15:07:21 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2.samsung.com (EUCPMTA) with SMTP id 53.A5.04459.82BA7E85; Fri, 7 Apr 2017 16:07:21 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170407150720eucas1p2ea1d3b1c4f1e4dd394f98ff4d8573c32~zJfYRJS942014420144eucas1p2o; Fri, 7 Apr 2017 15:07:20 +0000 (GMT) X-AuditID: cbfec7f1-f796e6d00000116b-24-58e7ab287ae8 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 91.A5.20206.C3BA7E85; Fri, 7 Apr 2017 16:07:40 +0100 (BST) Received: from imaximets.rnd.samsung.ru ([106.109.129.180]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OO1002PKOO4NY20@eusync1.samsung.com>; Fri, 07 Apr 2017 16:07:20 +0100 (BST) From: Ilya Maximets To: dev@dpdk.org, Declan Doherty Cc: Heetae Ahn , Eric Kinzie , Bernard Iremonger , Ilya Maximets , stable@dpdk.org Date: Fri, 07 Apr 2017 18:07:12 +0300 Message-id: <1491577632-31289-1-git-send-email-i.maximets@samsung.com> X-Mailer: git-send-email 2.7.4 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrBIsWRmVeSWpSXmKPExsWy7djP87qaq59HGGz4ymKxuVHY4s2DJhaL d5+2M1nMO7WX3WLa59vsFlfaf7Jb/Ov4w+7A7vFrwVJWj52z7rJ7LN7zksmjb8sqxgCWKC6b lNSczLLUIn27BK6M54eXshfMEKh4/bSBpYHxGm8XIyeHhICJxIxz+1kgbDGJC/fWs3UxcnEI CSxllFjz8CALhPOZUWLeztvMXYwcYB0rJiVDxJcxSsy58psJwmlmkliybBIryCg2AR2JU6uP MILYIgLWEhfWrgAbyyywk1Gi8/8OsISwgLfEpgvzwBpYBFQlOp4vZwTZwCvgJvHzUznESXIS N891MoP0SghcZ5NYfLkL6gpZiU0HmCFqXCQ+/XrKBmELS7w6voUdwpaRuDy5mwWit5lRomHV JUYIZwKjxJfm5UwQVfYSp25eBbOZBfgkJm2bDrWAV6KjTQiixENi9rkbUMscJdo2HwaHl5BA rMSkJw9ZJjBKL2BkWMUoklpanJueWmykV5yYW1yal66XnJ+7iREYn6f/Hf+4g/H9CatDjAIc jEo8vAG9zyOEWBPLiitzDzFKcDArifD+nAoU4k1JrKxKLcqPLyrNSS0+xCjNwaIkzst16lqE kEB6YklqdmpqQWoRTJaJg1OqgXH5HgaGXQsNrJp/GIednssmz2K57NNSHbvbOatLZ5qKaPre 72Jf+01Yu7tqvtzvNTs/dtm+OXbVeMq7pFudMioxfdt7eudVZ3FenbXx6U4HhcV23AskT8fv OSFdFlGp0//vy+x7trNZf56pKI8tsOD8PumOpoe9wNRjRw/e3Jhy51DfffaTsm5KLMUZiYZa zEXFiQAAEzvpywIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrNLMWRmVeSWpSXmKPExsVy+t/xy7o2q59HGMy/pmWxuVHY4s2DJhaL d5+2M1nMO7WX3WLa59vsFlfaf7Jb/Ov4w+7A7vFrwVJWj52z7rJ7LN7zksmjb8sqxgCWKDeb jNTElNQihdS85PyUzLx0W6XQEDddCyWFvMTcVFulCF3fkCAlhbLEnFIgz8gADTg4B7gHK+nb JbhlPD+8lL1ghkDF66cNLA2M13i7GDk4JARMJFZMSu5i5AQyxSQu3FvP1sXIxSEksIRR4tyS r0wQTiuTxL9ZexhBqtgEdCROrT4CZosIWEtcWLsCrINZYCejxNp9S5hBEsIC3hKbLsxjBbFZ BFQlOp4vZwTZxivgJvHzUznENjmJm+c6mScwci9gZFjFKJJaWpybnltspFecmFtcmpeul5yf u4kRGJDbjv3csoOx613wIUYBDkYlHt6A3ucRQqyJZcWVuYcYJTiYlUR4f04FCvGmJFZWpRbl xxeV5qQWH2I0Bdo9kVlKNDkfGC15JfGGJobmloZGxhYW5kZGSuK8Uz9cCRcSSE8sSc1OTS1I LYLpY+LglGpgjHp5XuHjiqkys/1CczdzxG6yd0g2L1p1eGf6RevIdmH1by3hd76f0WPdsMZw /szfy29c2yp40sr/havkXGmu24c3NxW8211+dVXBTbbfPbtSdsQruMcvf2z03n3KPNe61BiN J0fmSW6frX510dJzD8/JzrPo2b1G7pdAR5Lqirc7twhNNmApy1ViKc5INNRiLipOBADM4KFG XgIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170407150720eucas1p2ea1d3b1c4f1e4dd394f98ff4d8573c32 X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 X-Local-Sender: =?UTF-8?B?SWx5YSBNYXhpbWV0cxtTUlItVmlydHVhbGl6YXRpb24gTGFi?= =?UTF-8?B?G+yCvOyEseyghOyekBtMZWFkaW5nIEVuZ2luZWVy?= X-Global-Sender: =?UTF-8?B?SWx5YSBNYXhpbWV0cxtTUlItVmlydHVhbGl6YXRpb24gTGFi?= =?UTF-8?B?G1NhbXN1bmcgRWxlY3Ryb25pY3MbTGVhZGluZyBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0NJU0hRG0MxMEdEMDFHRDAxMDE1NA==?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20170407150720eucas1p2ea1d3b1c4f1e4dd394f98ff4d8573c32 X-RootMTR: 20170407150720eucas1p2ea1d3b1c4f1e4dd394f98ff4d8573c32 References: Subject: [dpdk-dev] [PATCH] net/bonding: allow configuring jumbo frames without slaves X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Apr 2017 15:07:23 -0000 Currently, 'rte_eth_dev_configure' fails on attempt to setup max_rx_pkt_len > 2048 if no slaves was added to bonded device. For example: rte_eth_dev_attach("eth_bond0,slave=05:00.0,mode=l34", &id) conf.rxmode.jumbo_frame = 1; conf.rxmode.max_rx_pkt_len = 9000; rte_eth_dev_configure(id, 1, 1, &conf) Result: EAL: Initializing pmd_bond for eth_bond0 EAL: Create bonded device eth_bond0 on port 4 in mode 2 on socket 0. rte_eth_dev_configure: ethdev port_id=4 \ max_rx_pkt_len 9018 > max valid value 2048 It's expected that slaves will be added to bonded device inside 'rte_eth_dev_configure' and proper 'max_rx_pktlen' configured for all of them. Failure happens because of hardcoded low value of 'max_rx_pktlen'. Increasing of this value to ETHER_MAX_JUMBO_FRAME_LEN will allow above scenario (attach + configure). It is important because it is the way OVS wants to work with all DPDK devices (including virtual). Changing the default hardcoded value makes no harm because all the slaves' related code uses only 'candidate_max_rx_pktlen' variable. CC: stable@dpdk.org Fixes: 6cfc6a4f0d61 ("net/bonding: inherit maximum Rx packet length") Signed-off-by: Ilya Maximets --- drivers/net/bonding/rte_eth_bond_pmd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index c398fdb..0c8cc40 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -1689,8 +1689,9 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) dev_info->max_mac_addrs = 1; - dev_info->max_rx_pktlen = internals->candidate_max_rx_pktlen ? - internals->candidate_max_rx_pktlen : 2048; + dev_info->max_rx_pktlen = internals->candidate_max_rx_pktlen + ? internals->candidate_max_rx_pktlen + : ETHER_MAX_JUMBO_FRAME_LEN; dev_info->max_rx_queues = (uint16_t)128; dev_info->max_tx_queues = (uint16_t)512; -- 2.7.4