From patchwork Mon Mar 17 05:32:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Nicholas A. Bellinger" X-Patchwork-Id: 3841671 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2FD6BBF540 for ; Mon, 17 Mar 2014 06:05:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 474AB201BB for ; Mon, 17 Mar 2014 06:05:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 58B932015E for ; Mon, 17 Mar 2014 06:05:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756482AbaCQF6Q (ORCPT ); Mon, 17 Mar 2014 01:58:16 -0400 Received: from mail-oa0-f46.google.com ([209.85.219.46]:33584 "EHLO mail-oa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751127AbaCQFzc (ORCPT ); Mon, 17 Mar 2014 01:55:32 -0400 Received: by mail-oa0-f46.google.com with SMTP id i7so5139974oag.19 for ; Sun, 16 Mar 2014 22:55:32 -0700 (PDT) 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=bedfd+/+CeL3+AVxNTtuAmApCoikyTz1vvPvvKNEYAE=; b=j7+ygzV8iaMNrdHoIGNkwKux/bqmqlpuVR9A2kYa0DoV1uFijb25Gx6xxTUYtHTjFA 4qp3zibMgR9dsciJbDIJz2fjJQzreYMpZ03snQeP4iggRvlcyTM4eTYy68X8FhINQs5k XPV3sGgZG6zuqxW04Wgc2cICcG6wZ93zi1fZ1Iny9Tts9NpHg9zOLTOT0CUYBK+ORo1v SMT3QfXp0HPPCKoQ1H4W0yT31Ivnz7RT7MVlYSA3T/hWfeg1IkVH8kaeZjMWPjKKztoi jwaZuNuF8qfgkZVQYLWZrnJ3BRD2DuVWDUaTkgnkgowHY9dNVmTTBpwm2VNZlo4KGcrz EPiw== X-Gm-Message-State: ALoCoQkaNjF+cvma8GAxY9f1pOozvS7dm4FNWWOg8Ll7t0SNU9C5XIscHie1Ww59YsG6YFCIBbna X-Received: by 10.60.226.138 with SMTP id rs10mr19151089oec.7.1395035732135; Sun, 16 Mar 2014 22:55:32 -0700 (PDT) Received: from localhost.localdomain (mail.linux-iscsi.org. [67.23.28.174]) by mx.google.com with ESMTPSA id f9sm4915749obm.2.2014.03.16.22.55.31 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 16 Mar 2014 22:55:31 -0700 (PDT) From: "Nicholas A. Bellinger" To: target-devel Cc: linux-scsi , linux-kernel , kvm-devel , "Michael S. Tsirkin" , Paolo Bonzini , "Martin K. Petersen" , Christoph Hellwig , Hannes Reinecke , Sagi Grimberg , "H. Peter Anvin" , Nicholas Bellinger , Sagi Grimberg Subject: [RFCv2 1/7] virtio-scsi.h: Add virtio_scsi_cmd_req_pi header definition Date: Mon, 17 Mar 2014 05:32:55 +0000 Message-Id: <1395034381-656-2-git-send-email-nab@daterainc.com> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1395034381-656-1-git-send-email-nab@daterainc.com> References: <1395034381-656-1-git-send-email-nab@daterainc.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Nicholas Bellinger This patch adds a virtio_scsi_cmd_req_pi header as recommened by Paolo that contains do_pi_niov + di_pi_niov elements used for signaling when protection information buffers are expected to preceed the data buffers. Cc: Paolo Bonzini Cc: Michael S. Tsirkin Cc: Martin K. Petersen Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Sagi Grimberg Cc: H. Peter Anvin Signed-off-by: Nicholas Bellinger --- include/linux/virtio_scsi.h | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/include/linux/virtio_scsi.h b/include/linux/virtio_scsi.h index 4195b97..4dc5998 100644 --- a/include/linux/virtio_scsi.h +++ b/include/linux/virtio_scsi.h @@ -35,11 +35,23 @@ struct virtio_scsi_cmd_req { u8 lun[8]; /* Logical Unit Number */ u64 tag; /* Command identifier */ u8 task_attr; /* Task attribute */ - u8 prio; + u8 prio; /* SAM command priority field */ u8 crn; u8 cdb[VIRTIO_SCSI_CDB_SIZE]; } __packed; +/* SCSI command request, followed by protection information */ +struct virtio_scsi_cmd_req_pi { + u8 lun[8]; /* Logical Unit Number */ + u64 tag; /* Command identifier */ + u8 task_attr; /* Task attribute */ + u8 prio; /* SAM command priority field */ + u8 crn; + u16 do_pi_niov; /* DataOUT PI Number of iovecs */ + u16 di_pi_niov; /* DataIN PI Number of iovecs */ + u8 cdb[VIRTIO_SCSI_CDB_SIZE]; +} __packed; + /* Response, followed by sense data and data-in */ struct virtio_scsi_cmd_resp { u32 sense_len; /* Sense data length */