From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by dpdk.org (Postfix) with ESMTP id E43DD5A54 for ; Wed, 8 Apr 2015 15:24:16 +0200 (CEST) Received: by wiax7 with SMTP id x7so33069260wia.0 for ; Wed, 08 Apr 2015 06:24:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=A0w9V6VaVOV0vnJGzjOQ8c1BWj5OKvKtU5zIHIZCpQw=; b=JfQINpUgeHd1VdfBWLzzxKBxPNAnioFh6KCYFDl8Sz5sHrPB7WceO46HdXW9l2RrBX L1Zu98AwHS2lxHwxgD3kkHwauhsu26HeHAsX+caS3NYaPjl/fGlz1SIHrtlJ5///qEDI nvX17hD9agbTvOKAEsdrwQSLS8NiIlGNOspslKtZM7HPG+biBaryQ+hwXc+FDZ2UZDXv aITtSIvuK7v5UK+mz1Ije+Ear5KAhI8h+TlPB9+pfryzu0O52nhuFsHBa6MxK/BLjOcs mmmMPPfcDvumsQNjBeMV4MYuj2Kt9u3UxqJzTGhcUq8fcZHYT/jvzSJW6i+CBX1rXG+E drZg== X-Gm-Message-State: ALoCoQnWVCyWmaJoyShQ5HHmIRdartt37PKGhuKtOtvl5OiYrRmRSXtRJKy2VBpSgehGFfCRgZSa X-Received: by 10.194.86.135 with SMTP id p7mr50849005wjz.89.1428499456782; Wed, 08 Apr 2015 06:24:16 -0700 (PDT) Received: from [10.16.0.189] (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id ax10sm15622487wjc.26.2015.04.08.06.24.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Apr 2015 06:24:16 -0700 (PDT) Message-ID: <55252C01.3070101@6wind.com> Date: Wed, 08 Apr 2015 15:24:17 +0200 From: Ivan Boule User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.5.0 MIME-Version: 1.0 To: "dev@dpdk.org" Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [dpdk-dev] [RFC] ethdev function to update MAC multicast addresses filtered by a port X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 13:24:17 -0000 This RFC describes a proposed change in the ethdev API for updating the set of multicast MAC addresses that are filtered by a port. The change consists in adding a new function "update_mc_addr_list" that takes the whole set of multicast MAC addresses to be filtered by a port, if any. In case the whole set of multicast addresses is too large for the device resources used to record them, the ethdev function "update_mc_addr_list" must transparently enable the allmulticast feature of the port, if such a feature is supported/enabled by the device. Reason for Change ----------------- With the current ethdev API, the receipt of multicast packets on a given port can only be enabled by invoking the "rte_eth_allmulticast_enable()" function. This approach may not work on Virtual Functions in SR-IOV architectures when the host PF driver does not allow this operation on VFs. In such a case, joined multicast addresses must be individually added into the set of multicast MAC addresses that are filtered by the [VF] port. For this purpose, a new function "update_mc_addr_list()" must be introduced into the set of functions exported by a Poll Mode Driver. Each time a DPDK application joins (respectively leaves) an IP multicast group, it must add (respectively remove) the associated multicast MAC address from the set of multicast address to be filtered, and invoke the function "update_mc_addr_list()" with the updated list of multicast addresses on each relevant port. Proposed API extension ---------------------- The new function "update_mc_addr_list" is added into the "eth_dev_ops" data structure: typedef int (*eth_update_mc_addr_list_t)(struct rte_eth_dev *dev, struct ether_addr *mc_addr_set, uint32_t nb_mc_addr); It is exported through the following new function: /** * Update the set of multicast addresses to filter on an Ethernet device. * * @param port_id * The port identifier of the Ethernet device. * @param mc_addr_set * The array of multicast addresses to filter. Equal to NULL when the function * is invoked to flush all multicast MAC addresses filtered by the port. * @param nb_mc_addr * The number of multicast addresses in the *mc_addr_set* array. Equal to 0 * when the function is invoked to flush the set of multicast MAC addresses. * @return * - (0) if successful. * - (-ENOTSUP) if hardware doesn't support multicast filtering. * - (-ENODEV) if *port_id* invalid. */ int rte_eth_dev_update_mc_addr_list(uint8_t port_id, struct ether_addr *mc_addr_set, uint32_t nb_mc_addr); -- Ivan Boule 6WIND Development Engineer