From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f171.google.com (mail-pf0-f171.google.com [209.85.192.171]) by dpdk.org (Postfix) with ESMTP id 308F57D00 for ; Wed, 31 May 2017 17:30:13 +0200 (CEST) Received: by mail-pf0-f171.google.com with SMTP id n23so12192404pfb.2 for ; Wed, 31 May 2017 08:30:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=p1XB19xhCoxmD7jYFMTa8aoxhZjWx04C0dN1cAnwyOo=; b=anaMayGZM+k0WCa76Ma+UnFp1+zWr4ZLIvAyW2uqVI1KPcV+DogOtXD9DD8dmLGgr0 I6HRGsyZBRR75GC6zMsM30we0OQsGBeENyzZ4kLqRmSKDWsw5cBhv28mbUk2+fZvkU8I GzkDzPryOh67bqbvsC+zeccA6K6Lpf40c0BLwpbnc86zEyOIcby4zDGMO3gSnW6GKF30 4tDCiXPwZZ3OD3lvYj7WOml+psCuFBsIyWdbvPwzHAI/LnAcam47/3hdzgV5a4YT97/M Y+kvQVubZw/v4wUPJ12AjdEDcT4hgpkvbLKJgomVDaMT941T87v84FnqGK6pP54ndgXx la/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=p1XB19xhCoxmD7jYFMTa8aoxhZjWx04C0dN1cAnwyOo=; b=K18+ONE2qBIuuVpOXuGh+MaGswt8rDDSoBJcfR/uwHuqQlcMqV5FQZdo6m2REXlvwv Rb8B6e8lIV93Nao9oONEi69QJ1G7xngEABxDbZk8K8RZNot7CQAPVBd4gyzz1jAQ7UCU ZUkWSSEkvwsyN8MzGigCXTecdN6mS5t1RAFp+76aKG8klfpR/YWq6dYjTjttEVJ5oZTb 3P9mgzRMS3LkvEYfuBxn829/bJfm5C2eKW4WVqzD9Jk5Pr2zDjTji0GmcP8/h529swhn zZT0ZQTfbWSjuxuDQBGtapvDWkcDMFylnIUNFj8J5QDcjtltPjN0Ii8v5NnJe//YI0/6 ak6g== X-Gm-Message-State: AODbwcCdHmmjPwwCAntn1zp2vBBgI9qwB0Qve1/d8ErNxl/7U11PGVX1 hj6EXuP1lRMLvW5a X-Received: by 10.84.224.1 with SMTP id r1mr88916399plj.78.1496244613081; Wed, 31 May 2017 08:30:13 -0700 (PDT) Received: from xeon-e3 (76-14-207-240.or.wavecable.com. [76.14.207.240]) by smtp.gmail.com with ESMTPSA id b2sm25193121pgc.16.2017.05.31.08.30.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 May 2017 08:30:12 -0700 (PDT) Date: Wed, 31 May 2017 08:30:10 -0700 From: Stephen Hemminger To: Ferruh Yigit Cc: Shijith Thotton , Gregory Etelson , dev@dpdk.org, Qi Zhang , Wenzhuo Lu , Thomas Monjalon , Jianfeng Tan Message-ID: <20170531083010.228859c3@xeon-e3> In-Reply-To: References: <1748341.rbpcFmWp0q@polaris> <1496228966-18573-1-git-send-email-shijith.thotton@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [RFC PATCH] igb_uio: issue FLR during open and release of device file 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: Wed, 31 May 2017 15:30:14 -0000 On Wed, 31 May 2017 13:20:08 +0100 Ferruh Yigit wrote: > On 5/31/2017 12:09 PM, Shijith Thotton wrote: > > Set UIO info device file operations open and release. Call pci reset > > function inside open and release to clear device state at start and > > end. Copied this behaviour from vfio_pci kernel module code. With this > > change, it is not mandatory to issue FLR by PMD's during init and close. > > Cc: Jianfeng Tan > > Jianfeng also implemented following patch: > http://dpdk.org/dev/patchwork/patch/17495/ > > Which also implements release and open ops, for slightly different > reason (prevent DMA access after app exit), but mainly both are to > gracefully handle application exit status. > > btw, for Jianfeng's case, can adding pci_clear_master() in release and > moving pci_set_master() to open help preventing unwanted DMA? > > > Gregory, > > Can you please check if this patch fixes your issue? > > Thanks, > ferruh pci_reset should stop all DMA. It also clears master status.