From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id 1B987D0B2; Mon, 8 Oct 2018 16:14:26 +0200 (CEST) Received: by mail-wr1-f68.google.com with SMTP id a2-v6so13946203wrc.13; Mon, 08 Oct 2018 07:14:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-transfer-encoding:mime-version; bh=f6KTLs9HUNtgXHuhGdPOkIrgAu10bRLPlj5UDrkwH2s=; b=kXfhlNLJ5JjefCrTIWROPC5MZv+Wv0wG6gztVvr4wRnmdibSRoUxUvDBUiEoG5q+d7 Qc167Xm+RtWH2ICkIElTjZaDRYIjOAn5HTAoIESBcbBegPXdP3SlfNZcs6Cyrx61K6Pq uy6YG7ZhGczH7b2gSKN22mbfP7FjgC++9k/DQNHXZbV0mUOYrRD2uUBhogGUukN9RJJx jgp6hM83eQe6GYrMvHzd3GM9zQCvRrvVsZ0blY8Af4gvf47qlXZ8qIglYIUFcfW131Zv olkOw0EC3iR+2WL2k7ocMTBOHykJyDDdl341NOJV+nqVKOO+bltXIcplHVHfZVj08bym Emsw== X-Gm-Message-State: ABuFfogOKxNNnZFk/RlEg+SaOvk+zTK3GS5PTe+QxbzjxPVxEJyvRU8f /zS2U0YraMu4mnMCU8KfIfw= X-Google-Smtp-Source: ACcGV6078K4Zl11z9N6QV+//IY2XxgxYYKwTOqEOJdKwXHkxRYOsvBS8GO7czbZLJ+s7sCLz0egFqw== X-Received: by 2002:adf:e7cb:: with SMTP id e11-v6mr17090116wrn.27.1539008065581; Mon, 08 Oct 2018 07:14:25 -0700 (PDT) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id l125-v6sm16624883wmb.1.2018.10.08.07.14.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 Oct 2018 07:14:24 -0700 (PDT) Message-ID: <1539008063.8721.22.camel@debian.org> From: Luca Boccassi To: "Zhao1, Wei" , "dev@dpdk.org" Cc: "Lu, Wenzhuo" , "stable@dpdk.org" , qi.z.zhang@intel.com, 3chas3@gmail.com Date: Mon, 08 Oct 2018 15:14:23 +0100 In-Reply-To: References: <20180727172607.16890-1-bluca@debian.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/e1000: do not error out if rx_drop_en is set 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: Mon, 08 Oct 2018 14:14:26 -0000 On Mon, 2018-10-08 at 08:43 +0000, Zhao1, Wei wrote: > Hi,=C2=A0=C2=A0Luca Boccassi >=20 > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Luca Boccassi > > Sent: Saturday, July 28, 2018 1:26 AM > > To: dev@dpdk.org > > Cc: Lu, Wenzhuo ; Luca Boccassi > > ; stable@dpdk.org > > Subject: [dpdk-dev] [PATCH] net/e1000: do not error out if > > rx_drop_en is set > >=20 > > rx_drop_en is an optimization that does nothing on single-queue > > devices like > > e1000. Do not force applications that do not care to select per- > > devices >=20 > And aslo, eth_em_rx_queue_setup support set up of multiple queues for > EM device. >=20 > > optimizations flags by returning an error, just log it and carry > > on. >=20 > rx_drop_en is a flag to enable receive packets drop when insufficient > receive descriptors exist to write the packet into system memory. > if we delete this parameter check protection, it may be misleading > some applications for this point, why does not give some requirement=C2= =A0 > for proper usage of this? I do not suggest for this change. > You can also refer to function eth_igb_rx_queue_setup(), igb device > support rx_drop_en set, so we do not have a such parameter check. Hi, As mentioned, because given it does nothing it's not worth aborting the program with an error. Logging a notice level message and carrying on is sufficient. We should try not make it harder than necessary for application developers. > >=20 > > Fixes: 805803445a02 ("e1000: support EM devices (also known as > > e1000/e1000e)") > > Cc: stable@dpdk.org > >=20 > > Signed-off-by: Luca Boccassi > > --- > > =C2=A0drivers/net/e1000/em_rxtx.c | 7 ++++--- > > =C2=A01 file changed, 4 insertions(+), 3 deletions(-) > >=20 > > diff --git a/drivers/net/e1000/em_rxtx.c > > b/drivers/net/e1000/em_rxtx.c > > index a6b3e92a6..81dc41efb 100644 > > --- a/drivers/net/e1000/em_rxtx.c > > +++ b/drivers/net/e1000/em_rxtx.c > > @@ -1416,12 +1416,13 @@ eth_em_rx_queue_setup(struct rte_eth_dev > > *dev, > > =C2=A0 } > >=20 > > =C2=A0 /* > > - =C2=A0* EM devices don't support drop_en functionality > > + =C2=A0* EM devices don't support drop_en functionality. > > + =C2=A0* It's an optimization that does nothing on single-queue > > devices, > > + =C2=A0* so just log the issue and carry on. > > =C2=A0 =C2=A0*/ > > =C2=A0 if (rx_conf->rx_drop_en) { > > - PMD_INIT_LOG(ERR, "drop_en functionality not > > supported > > by " > > + PMD_INIT_LOG(NOTICE, "drop_en functionality not > > supported by " > > =C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0"device"); > > - return -EINVAL; > > =C2=A0 } > >=20 > > =C2=A0 /* Free memory prior to re-allocation if needed. */ > > -- > > 2.18.0 >=20 >=20 --=20 Kind regards, Luca Boccassi