All of lore.kernel.org
 help / color / mirror / Atom feed
From: clabbe.montjoie@gmail.com (Corentin Labbe)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/5] net: thunderx: Fix configuration of L3/L4 length checking
Date: Mon, 14 Nov 2016 13:33:50 +0100	[thread overview]
Message-ID: <20161114123350.GA2449@Red> (raw)
In-Reply-To: <1479120886-13425-4-git-send-email-sunil.kovvuri@gmail.com>

On Mon, Nov 14, 2016 at 04:24:44PM +0530, sunil.kovvuri at gmail.com wrote:
> From: Sunil Goutham <sgoutham@cavium.com>
> 
> This patch fixes enabling of HW verification of L3/L4 length and
> TCP/UDP checksum which is currently being cleared. Also fixed VLAN
> stripping config which is being cleared when multiqset is enabled.
> 
> Signed-off-by: Sunil Goutham <sgoutham@cavium.com>
> ---
>  drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
> index f0e0ca6..3050177 100644
> --- a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
> +++ b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
> @@ -538,9 +538,12 @@ static void nicvf_rcv_queue_config(struct nicvf *nic, struct queue_set *qs,
>  	mbx.rq.cfg = (1ULL << 62) | (RQ_CQ_DROP << 8);
>  	nicvf_send_msg_to_pf(nic, &mbx);
>  
> -	nicvf_queue_reg_write(nic, NIC_QSET_RQ_GEN_CFG, 0, 0x00);
> -	if (!nic->sqs_mode)
> +	if (!nic->sqs_mode && (qidx == 0)) {
> +		/* Enable checking L3/L4 length and TCP/UDP checksums */
> +		nicvf_queue_reg_write(nic, NIC_QSET_RQ_GEN_CFG, 0,
> +				      ((1 << 24) | (1 << 23) | (1 << 21)));

Hello

You could use the BIT() macro here

Regards

WARNING: multiple messages have this Message-ID (diff)
From: Corentin Labbe <clabbe.montjoie@gmail.com>
To: sunil.kovvuri@gmail.com
Cc: netdev@vger.kernel.org, Sunil Goutham <sgoutham@cavium.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 3/5] net: thunderx: Fix configuration of L3/L4 length checking
Date: Mon, 14 Nov 2016 13:33:50 +0100	[thread overview]
Message-ID: <20161114123350.GA2449@Red> (raw)
In-Reply-To: <1479120886-13425-4-git-send-email-sunil.kovvuri@gmail.com>

On Mon, Nov 14, 2016 at 04:24:44PM +0530, sunil.kovvuri@gmail.com wrote:
> From: Sunil Goutham <sgoutham@cavium.com>
> 
> This patch fixes enabling of HW verification of L3/L4 length and
> TCP/UDP checksum which is currently being cleared. Also fixed VLAN
> stripping config which is being cleared when multiqset is enabled.
> 
> Signed-off-by: Sunil Goutham <sgoutham@cavium.com>
> ---
>  drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
> index f0e0ca6..3050177 100644
> --- a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
> +++ b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
> @@ -538,9 +538,12 @@ static void nicvf_rcv_queue_config(struct nicvf *nic, struct queue_set *qs,
>  	mbx.rq.cfg = (1ULL << 62) | (RQ_CQ_DROP << 8);
>  	nicvf_send_msg_to_pf(nic, &mbx);
>  
> -	nicvf_queue_reg_write(nic, NIC_QSET_RQ_GEN_CFG, 0, 0x00);
> -	if (!nic->sqs_mode)
> +	if (!nic->sqs_mode && (qidx == 0)) {
> +		/* Enable checking L3/L4 length and TCP/UDP checksums */
> +		nicvf_queue_reg_write(nic, NIC_QSET_RQ_GEN_CFG, 0,
> +				      ((1 << 24) | (1 << 23) | (1 << 21)));

Hello

You could use the BIT() macro here

Regards

  reply	other threads:[~2016-11-14 12:33 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-14 10:54 [PATCH 0/5] net: thunderx: Miscellaneous fixes sunil.kovvuri at gmail.com
2016-11-14 10:54 ` sunil.kovvuri
2016-11-14 10:54 ` [PATCH 1/5] net: thunderx: Introduce BGX_ID_MASK macro to extract bgx_id sunil.kovvuri at gmail.com
2016-11-14 10:54   ` sunil.kovvuri
2016-11-14 10:54 ` [PATCH 2/5] net: thunderx: Program LMAC credits based on MTU sunil.kovvuri at gmail.com
2016-11-14 10:54   ` sunil.kovvuri
2016-11-14 10:54 ` [PATCH 3/5] net: thunderx: Fix configuration of L3/L4 length checking sunil.kovvuri at gmail.com
2016-11-14 10:54   ` sunil.kovvuri
2016-11-14 10:54   ` sunil.kovvuri
2016-11-14 12:33   ` Corentin Labbe [this message]
2016-11-14 12:33     ` Corentin Labbe
2016-11-14 17:26     ` Sunil Kovvuri
2016-11-14 17:26       ` Sunil Kovvuri
2016-11-14 10:54 ` [PATCH 4/5] net: thunderx: Fix VF driver's interface statistics sunil.kovvuri at gmail.com
2016-11-14 10:54   ` sunil.kovvuri
2016-11-14 10:54 ` [PATCH 5/5] net: thunderx: Fix memory leak and other issues upon interface toggle sunil.kovvuri at gmail.com
2016-11-14 10:54   ` sunil.kovvuri
2016-11-14 10:54   ` sunil.kovvuri
2016-11-14 12:01 ` [PATCH 0/5] net: thunderx: Miscellaneous fixes Matthias Brugger
2016-11-14 12:01   ` Matthias Brugger
2016-11-14 17:27   ` Sunil Kovvuri
2016-11-14 17:27     ` Sunil Kovvuri
2016-11-14 17:27     ` Sunil Kovvuri
2016-11-14 17:32   ` David Miller
2016-11-14 17:32     ` David Miller
2016-11-14 17:35     ` Matthias Brugger
2016-11-14 17:35       ` Matthias Brugger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161114123350.GA2449@Red \
    --to=clabbe.montjoie@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.