From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 2823AA05D3 for ; Sun, 24 Mar 2019 19:01:44 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E67FF2B9D; Sun, 24 Mar 2019 19:01:43 +0100 (CET) Received: from mail-vk1-f195.google.com (mail-vk1-f195.google.com [209.85.221.195]) by dpdk.org (Postfix) with ESMTP id 341E110A3 for ; Sun, 24 Mar 2019 19:01:40 +0100 (CET) Received: by mail-vk1-f195.google.com with SMTP id d15so1473318vka.8 for ; Sun, 24 Mar 2019 11:01:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=f5J/cuSS4T9B481kgPUFNcVMf71DWQn0nqfHvDFMNPE=; b=dGWhqKOgf2jeNE4lc1YoKPiTk81htIUvUSSoZ0BUQn/ecq7C18MmqQuV7kH8W1vhw8 VMEWUHq403LnGs2H74M9Z+ll7DJhX7x0Z1b6hesaaa99L7JPjIeWTiJe3+4Y1uRyk+3t keRuI8K2y82u8vnGAJJqBMOzEYPUSo2VXeXiG4jBBQR3BFvRiiFtmNFkOfIVI+ukPeN+ ZjW5BQVudLUKoubENOfdDzFftyDK8RoUL8VDMCvHtHxCDUBR/MXbk/P9Oh5TCUrMmZ4b 95VKlWaL08eDzpcUWC21/kEMsTNN5i8X+p4fWqHkiWcZgOAsrzQWEqH5MsM3sWe9v+A3 tWaw== X-Gm-Message-State: APjAAAU4SLsKO+6Z+i38U0wWKKwA0hfdGsbgYldOp5YvP0wLBSenfQTh dY0jFqTi+jbHPJj5XcYhZ1AVexuOVCJu5A/T4CpUnA== X-Google-Smtp-Source: APXvYqzlmJIAs4hdsHA7pYplH4s3GJ7hsEv5q3Uw7BccFspyWFyM6hDKjygvoWJsCFNV+a+80QsfxRgHJd9PnF0Wr5k= X-Received: by 2002:a1f:c06:: with SMTP id 6mr4428689vkm.52.1553450499463; Sun, 24 Mar 2019 11:01:39 -0700 (PDT) MIME-Version: 1.0 References: <1553200094-5487-1-git-send-email-david.marchand@redhat.com> <1553200094-5487-2-git-send-email-david.marchand@redhat.com> <615b76a3-ea73-19b7-c1b2-9ee1862473a6@gmail.com> <8eb07dc9-0640-66bd-22aa-e8518d449e97@gmail.com> In-Reply-To: <8eb07dc9-0640-66bd-22aa-e8518d449e97@gmail.com> From: David Marchand Date: Sun, 24 Mar 2019 19:01:28 +0100 Message-ID: To: Chas Williams <3chas3@gmail.com> Cc: dev , "Yigit, Ferruh" , chas3@att.com, "Zhaohui (zhaohui, Polestar)" , dpdk stable Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH 2/2] net/bonding: fix oob access in "other" aggregator modes X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Sun, Mar 24, 2019 at 6:24 PM Chas Williams <3chas3@gmail.com> wrote: > On 3/24/19 1:11 PM, David Marchand wrote: > > On Sun, Mar 24, 2019 at 2:35 PM Chas Williams <3chas3@gmail.com > > > wrote: > > > > Have you ever experienced this problem in practice? I ask because I > am > > considering some fixes that would limit the number of slaves to a > more > > reasonable number (and reduce the over stack usage of the bonding > > driver > > in general). > > > > > > Not too hard to reproduce, the problem is not the number of slaves. > > With a default RTE_MAX_ETHPORTS at 32, any slave whose portid >= 8 would > > trigger an oob access. > Err... Well I have a lot of questions then about this whole thing. What > is max_index() doing? > > mode_count_id = max_index(agg_count, slaves_count); > > It's indexing up to slaves_count, which is likely to be somewhere around > 2. agg_count() is indexed by the port id. It's likely agg_count was > intended to be indexed by the slave index and not the port id. > Good point, it is likely that this whole code is not working at all... I did not go far enough to test/verify this part functionally. -- David Marchand