From patchwork Mon Nov 14 10:54:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sunil Kovvuri X-Patchwork-Id: 9427191 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DA4C060476 for ; Mon, 14 Nov 2016 10:58:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CAA5F28835 for ; Mon, 14 Nov 2016 10:58:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BF86A28841; Mon, 14 Nov 2016 10:58:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 87B4728835 for ; Mon, 14 Nov 2016 10:58:27 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c6EwO-0008Ap-Fb; Mon, 14 Nov 2016 10:56:44 +0000 Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c6Evs-0007pT-Ll for linux-arm-kernel@lists.infradead.org; Mon, 14 Nov 2016 10:56:14 +0000 Received: by mail-pg0-x243.google.com with SMTP id x23so8730446pgx.3 for ; Mon, 14 Nov 2016 02:55:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XoJo0Xp6IRX/6XHSNGYOjBRe+arBZ1rGaRK2ULbxRnQ=; b=u40NfKFVgrQSqIXArlE0/Wvvo+1K0KMmlNoIxPX3JJ4HXIr173XmExIXuxNAkt4AP+ x22UGpau7vTILtF09Tf8jkd2EKe6r1qpNjJcYByT3IbxEka4JHQmBSrM50PV7clxYps7 2uAtiNlwPtGg1JSK+Yy68g09lEbhCJcQ9LOu6couipDCizLSkBCVjg8lZBZklgqdRSDt b2D8NueaedKiL/d4XKMq4egO0ChRKmis2h/t/rCkoDcwjLJCFFtpQhXFW4VFZ/OpYwEu QpvLPAPc4nX2oH77ShP/hJJWT6un96UY+3nwPos34G9/8AceWxcLzSjgy4d9xhVRchq3 VIgw== 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:in-reply-to :references; bh=XoJo0Xp6IRX/6XHSNGYOjBRe+arBZ1rGaRK2ULbxRnQ=; b=iyz2EQQxVLc+9Xyvon08dLWE5yVCWno/WIZQEdp7KzrE/dEB7I/nt/ankYbfrE9bNu gkbZTrvO7oSETDJnzY3UTLiJCKDsOFkbRdW/qLQ8hwZv6YSV9sC50+fkI7qxEguzvGZx oUQcch4hg4TEGGRxVTAJbh6PyaULrzR+3vCXKpFmJRmwQD0m/dhIYp5pOcyOqqvDRfs7 hPO7HwCCnGdZjc0qz4jfkCMvs6qo0idQ7rTpUC+LOgj+AelGoaCubpPqCTu9qKaxiz9h YMwVVe4V1gXqUVDnPkX4mHQyzxoImuFJl7Q79rdJUpucpWSvh46KZwWkYfAJsmtPStNR WoCQ== X-Gm-Message-State: ABUngvcOBjUNrCublC8kMV1U89UuLzrS3ynsiwYfb0p3n7osI8O9oTVxLBluMzsjXHD/GA== X-Received: by 10.98.67.138 with SMTP id l10mr35690322pfi.101.1479120951860; Mon, 14 Nov 2016 02:55:51 -0800 (PST) Received: from machine421.in.caveonetworks.com ([14.140.2.178]) by smtp.googlemail.com with ESMTPSA id af14sm34502578pac.13.2016.11.14.02.55.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 Nov 2016 02:55:50 -0800 (PST) From: sunil.kovvuri@gmail.com To: netdev@vger.kernel.org Subject: [PATCH 3/5] net: thunderx: Fix configuration of L3/L4 length checking Date: Mon, 14 Nov 2016 16:24:44 +0530 Message-Id: <1479120886-13425-4-git-send-email-sunil.kovvuri@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1479120886-13425-1-git-send-email-sunil.kovvuri@gmail.com> References: <1479120886-13425-1-git-send-email-sunil.kovvuri@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161114_025612_931291_36264727 X-CRM114-Status: GOOD ( 11.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sunil Goutham , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Sunil Goutham 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 --- 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))); nicvf_config_vlan_stripping(nic, nic->netdev->features); + } /* Enable Receive queue */ memset(&rq_cfg, 0, sizeof(struct rq_cfg));