From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <xiaolong.ye@intel.com>
Received: from mga05.intel.com (mga05.intel.com [192.55.52.43])
 by dpdk.org (Postfix) with ESMTP id 7F4701B55A
 for <dev@dpdk.org>; Fri, 22 Mar 2019 03:08:32 +0100 (CET)
X-Amp-Result: UNKNOWN
X-Amp-Original-Verdict: FILE UNKNOWN
X-Amp-File-Uploaded: False
Received: from fmsmga004.fm.intel.com ([10.253.24.48])
 by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 21 Mar 2019 19:08:31 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.60,255,1549958400"; d="scan'208";a="154617601"
Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.110.206])
 by fmsmga004.fm.intel.com with ESMTP; 21 Mar 2019 19:08:30 -0700
Date: Fri, 22 Mar 2019 10:04:26 +0800
From: Ye Xiaolong <xiaolong.ye@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>,
 Karlsson Magnus <magnus.karlsson@intel.com>,
 Topel Bjorn <bjorn.topel@intel.com>
Message-ID: <20190322020426.GE84243@intel.com>
References: <20190301080947.91086-1-xiaolong.ye@intel.com>
 <20190321091845.78495-1-xiaolong.ye@intel.com>
 <20190321091845.78495-2-xiaolong.ye@intel.com>
 <20190321082705.1ee71f1f@shemminger-XPS-13-9360>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20190321082705.1ee71f1f@shemminger-XPS-13-9360>
User-Agent: Mutt/1.9.4 (2018-02-28)
Subject: Re: [dpdk-dev] [PATCH v3 1/5] net/af_xdp: introduce AF XDP PMD
	driver
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 22 Mar 2019 02:08:32 -0000

On 03/21, Stephen Hemminger wrote:
>On Thu, 21 Mar 2019 17:18:41 +0800
>Xiaolong Ye <xiaolong.ye@intel.com> wrote:
>
>> static void kick_tx(struct pkt_tx_queue *txq)
>> +{
>> +	struct xsk_umem_info *umem = txq->pair->umem;
>> +
>> +	while (send(xsk_socket__fd(txq->pair->xsk), NULL,
>> +		      0, MSG_DONTWAIT) < 0) {
>> +		/* some thing unexpected */
>> +		if (errno != EBUSY && errno != EAGAIN)
>> +			break;
>> +
>> +		/* pull from complete qeueu to leave more space */
>> +		if (errno == EAGAIN)
>> +			pull_umem_cq(umem, ETH_AF_XDP_TX_BATCH_SIZE);
>> +	}
>
>What about EINTR??
>You should retry the send then.

Will do.

From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by dpdk.space (Postfix) with ESMTP id 8052BA00E6
	for <public@inbox.dpdk.org>; Fri, 22 Mar 2019 03:08:34 +0100 (CET)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id B8B201B55D;
	Fri, 22 Mar 2019 03:08:33 +0100 (CET)
Received: from mga05.intel.com (mga05.intel.com [192.55.52.43])
 by dpdk.org (Postfix) with ESMTP id 7F4701B55A
 for <dev@dpdk.org>; Fri, 22 Mar 2019 03:08:32 +0100 (CET)
X-Amp-Result: UNKNOWN
X-Amp-Original-Verdict: FILE UNKNOWN
X-Amp-File-Uploaded: False
Received: from fmsmga004.fm.intel.com ([10.253.24.48])
 by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 21 Mar 2019 19:08:31 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.60,255,1549958400"; d="scan'208";a="154617601"
Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.110.206])
 by fmsmga004.fm.intel.com with ESMTP; 21 Mar 2019 19:08:30 -0700
Date: Fri, 22 Mar 2019 10:04:26 +0800
From: Ye Xiaolong <xiaolong.ye@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>,
 Karlsson Magnus <magnus.karlsson@intel.com>,
 Topel Bjorn <bjorn.topel@intel.com>
Message-ID: <20190322020426.GE84243@intel.com>
References: <20190301080947.91086-1-xiaolong.ye@intel.com>
 <20190321091845.78495-1-xiaolong.ye@intel.com>
 <20190321091845.78495-2-xiaolong.ye@intel.com>
 <20190321082705.1ee71f1f@shemminger-XPS-13-9360>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Disposition: inline
In-Reply-To: <20190321082705.1ee71f1f@shemminger-XPS-13-9360>
User-Agent: Mutt/1.9.4 (2018-02-28)
Subject: Re: [dpdk-dev] [PATCH v3 1/5] net/af_xdp: introduce AF XDP PMD
	driver
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>
Message-ID: <20190322020426.k_2usmoIdSSKTOJeNNW60hKQTi2swtDQEmfgxIpzR6o@z>

On 03/21, Stephen Hemminger wrote:
>On Thu, 21 Mar 2019 17:18:41 +0800
>Xiaolong Ye <xiaolong.ye@intel.com> wrote:
>
>> static void kick_tx(struct pkt_tx_queue *txq)
>> +{
>> +	struct xsk_umem_info *umem = txq->pair->umem;
>> +
>> +	while (send(xsk_socket__fd(txq->pair->xsk), NULL,
>> +		      0, MSG_DONTWAIT) < 0) {
>> +		/* some thing unexpected */
>> +		if (errno != EBUSY && errno != EAGAIN)
>> +			break;
>> +
>> +		/* pull from complete qeueu to leave more space */
>> +		if (errno == EAGAIN)
>> +			pull_umem_cq(umem, ETH_AF_XDP_TX_BATCH_SIZE);
>> +	}
>
>What about EINTR??
>You should retry the send then.

Will do.