From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by dpdk.org (Postfix) with ESMTP id 078E02A6C for ; Wed, 5 Oct 2016 19:19:44 +0200 (CEST) Received: by mail-wm0-f52.google.com with SMTP id p138so286097704wmb.1 for ; Wed, 05 Oct 2016 10:19:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=2Q2nYPLu2dUfAbMSwp1YTiF67RNtc1wxlXYOYxDeMNw=; b=cLQjfoxEZgLlLkRxmKLwus9q/WYbQq0d7cocr97noaYoRHDTts7g5FlkNonzlym99a IEfTDrHLhIkX+rz2anWJQybQW/ITHSdLYKghyoV4nggVqB1dOvvrUle+myp7AGQrpx/u j46DrHEeG38hSZ1KqNgajDQ1ty/e6ZHJAavPb0mnuw+5dLZTslor7vaN+mK5RmnuAy0a /lEcC6+FlwgbLDSWEAHMZLlxS2Fufv2iiIPXzhaHcTWq0TwmEiY1sqmaj/gVqsOkC6FZ OQ9u2kUKnRm+5dUKLrmY3CVz8h+ywwDkaprKk1aWg5d92Kg3gox3yjdZ++PGC7e3N0PC ShJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=2Q2nYPLu2dUfAbMSwp1YTiF67RNtc1wxlXYOYxDeMNw=; b=L/tp4AN0mw6YfB4CvUXF6/K6iRoGqqKMhWnXh6r8AX/0XksLS6cQvcFwyh2+mM6z2S rBrxWMD3Y68owHizo9/iWbW+7hFlDOsmCI3KyqPj2NwnvgIsfR+mi54dOGsIzj4btZUH XTX8M3Fk8lDT28mv8QE4Mg2GrNknwI8xmgSJAuksGvjg0RYMon2yQGhRI/IBIABNG5vj WwdDt8qgQHgQ540f7UZNvqrQRXPuv7k//mwRY0+Bc/kP3LvzRN+9hW9YezcvTdfzp/W1 Axci6tLLtkKhTzOWstzGOsIY2CbpWvmfDWzwVWEOAqXfikzWS6o5cbEDU8A9uyDuGZcl aPPw== X-Gm-Message-State: AA6/9Rm5LWS4Aqbb0OIgy9REVtISwTHZShIwDxXt4L1/LKXr6+hVI4xHVKLOm664t3BnVz63 X-Received: by 10.194.141.203 with SMTP id rq11mr10723669wjb.112.1475687983785; Wed, 05 Oct 2016 10:19:43 -0700 (PDT) Received: from xps13.localnet (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id vh6sm10051221wjb.0.2016.10.05.10.19.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Oct 2016 10:19:42 -0700 (PDT) From: Thomas Monjalon To: "Iremonger, Bernard" Cc: dev@dpdk.org, "Shah, Rahul R" , "Lu, Wenzhuo" , "az5157@att.com" , "jerin.jacob@caviumnetworks.com" Date: Wed, 05 Oct 2016 19:19:40 +0200 Message-ID: <3456767.oRusgI458o@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <8CEF83825BEC744B83065625E567D7C21A08F52C@IRSMSX108.ger.corp.intel.com> References: <1475250308-5498-1-git-send-email-bernard.iremonger@intel.com> <2148835.WQXRyfBhcc@xps13> <8CEF83825BEC744B83065625E567D7C21A08F52C@IRSMSX108.ger.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v4 1/2] librte_ether: add internal callback functions 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, 05 Oct 2016 17:19:44 -0000 2016-10-05 17:04, Iremonger, Bernard: > > > --- a/lib/librte_ether/rte_ethdev.c > > > +++ b/lib/librte_ether/rte_ethdev.c > > > @@ -2510,6 +2510,20 @@ void > > > _rte_eth_dev_callback_process(struct rte_eth_dev *dev, > > > enum rte_eth_event_type event) > > > { > > > + return _rte_eth_dev_callback_process_generic(dev, event, NULL); } > > > + > > > +void > > > +_rte_eth_dev_callback_process_vf(struct rte_eth_dev *dev, > > > + enum rte_eth_event_type event, void *param) { > > > + return _rte_eth_dev_callback_process_generic(dev, event, param); > > } > > > > This function is just adding a parameter, compared to the legacy > > _rte_eth_dev_callback_process. > > Why calling it process_vf? > > The parameter is just being added for the VF event, the handling of the other events is unchanged. > > > And by the way, why not just replacing the legacy function? > > As it is a driver interface, there is no ABI restriction. > > I thought there would be an ABI issue if the legacy function is replaced. > The _rte_eth_dev_callback_process is exported in DPDK 2.2 and used in the following PMD's, lib and app: > > app/test/virtual_pmd > drivers/net/e1000 > drivers/net/ixgbe > drivers/net/mlx5 > drivers/net/vhost > drivers/net/virtio > lib/librte_ether > > Adding a parameter to _rte_eth_dev_callback_process() will impact all of the above. > Will this cause an ABI issue? No because ABI is for applications (Application Binary Interface). Here you are just changing the driver interface. And we have no commitment to maintain the compatibility of this interface for external drivers. > > > --- a/lib/librte_ether/rte_ethdev.h > > > +++ b/lib/librte_ether/rte_ethdev.h > > > @@ -3026,6 +3026,7 @@ enum rte_eth_event_type { > > > /**< queue state event (enabled/disabled) > > */ > > > RTE_ETH_EVENT_INTR_RESET, > > > /**< reset interrupt event, sent to VF on PF reset */ > > > + RTE_ETH_EVENT_VF_MBOX, /**< PF mailbox processing callback */ > > > RTE_ETH_EVENT_MAX /**< max value of this enum */ > > > }; > > > > Either we choose to have a "generic" VF event well documented, or it is just > > a specific event with a tip on where to find the doc. > > Here we need at least to know how to handle the argument. > > It is a specific event for VF to PF messages, details on the function and arguments are in the rte_ethdev.h file. No I think it is only explained in the ixgbe code.