Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp237162imm; Mon, 9 Jul 2018 00:24:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeSFORp69nIbg5DzV7L4k4XNSt9lq+/rNpcYImevQIsXQck+yn0AOslzkq2pVKFU1uFLIEo X-Received: by 2002:a63:b445:: with SMTP id n5-v6mr13565370pgu.104.1531121055678; Mon, 09 Jul 2018 00:24:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531121055; cv=none; d=google.com; s=arc-20160816; b=U45CHYecEVE6aXCaa+QRAKDi2s/En401vx66qK7pMVQK/ASgbzCz30Xx2Th/lCHkNq xYUtOYZVhM/goV/wBmAG+3gCRF+LUdVipmk1GnDSRyGurzjhip5NQCqlzAaS7UxDtUzn WS+EmBSjLp4+EIQwysHMiV1dVJP6/RIdm8fRYSWAkhpJt8oZtcnBtIfgA9tNzwktUWR3 cmL4xRifqPTZdTaVMkd/EsSR/dmY+H9Gc0vh0YWbQcd8RWOWni/UO6gfbvm3W3bUIGJF 9YQJbXug+RIs3P8t8I+mjEFRecK4TAQ7oqZi6MhkR7ry0JZYsfrq7Dne1Eg/cJVdJvhN TDHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=9zQH4Yk2ngGf3Qii8ZGJerniZQpqV2dwJytl1EJlETA=; b=Avjs6oUOQMcS5nsTraiZsE2t7+/o/47+sI/0zA1QX+4kd/UFUEHCySoyjfbhNsDeW7 VHwJyy0O/K/2gAiUXfCbFy1uo2UEx7iLOV/duXJQb6Am3tbzQ5+FZhdM1/4YKhgFxBVc Zw1RgpF5uK0Oz3I4KiXFugI6c6GyEFzi/VzAbQr8Cnwo5WtehutXpqtK3eXS9X8swCyA 6UeiP3gp/rQ3jtE5UyklUh4V5BVHXIhgcd4G7zFtodrXkNsH3vw5WkMy8Bb+KvmsW6wI UshGbp7MuT1W+pVZ/yRrbZZz26vzwPoWOaNJCi4Epqx78sw3Lc0rglyQ+lkVcClqUzXW gAQA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k72-v6si13888458pgc.304.2018.07.09.00.24.00; Mon, 09 Jul 2018 00:24:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932686AbeGIHXK (ORCPT + 99 others); Mon, 9 Jul 2018 03:23:10 -0400 Received: from mga01.intel.com ([192.55.52.88]:9390 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932632AbeGIHXH (ORCPT ); Mon, 9 Jul 2018 03:23:07 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jul 2018 00:23:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,329,1526367600"; d="scan'208";a="71129740" Received: from debian.sh.intel.com ([10.67.104.228]) by orsmga001.jf.intel.com with ESMTP; 09 Jul 2018 00:23:05 -0700 From: Tiwei Bie To: mst@redhat.com, jasowang@redhat.com, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, virtio-dev@lists.oasis-open.org Cc: wexu@redhat.com, jfreimann@redhat.com, tiwei.bie@intel.com Subject: [PATCH net-next v1 5/5] virtio_ring: enable packed ring Date: Mon, 9 Jul 2018 15:22:41 +0800 Message-Id: <20180709072241.8886-6-tiwei.bie@intel.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180709072241.8886-1-tiwei.bie@intel.com> References: <20180709072241.8886-1-tiwei.bie@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Tiwei Bie --- drivers/s390/virtio/virtio_ccw.c | 8 ++++++++ drivers/virtio/virtio_ring.c | 2 ++ 2 files changed, 10 insertions(+) diff --git a/drivers/s390/virtio/virtio_ccw.c b/drivers/s390/virtio/virtio_ccw.c index 8f5c1d7f751a..ff5b85736d8d 100644 --- a/drivers/s390/virtio/virtio_ccw.c +++ b/drivers/s390/virtio/virtio_ccw.c @@ -765,6 +765,11 @@ static u64 virtio_ccw_get_features(struct virtio_device *vdev) return rc; } +static void ccw_transport_features(struct virtio_device *vdev) +{ + __virtio_clear_bit(vdev, VIRTIO_F_RING_PACKED); +} + static int virtio_ccw_finalize_features(struct virtio_device *vdev) { struct virtio_ccw_device *vcdev = to_vc_device(vdev); @@ -791,6 +796,9 @@ static int virtio_ccw_finalize_features(struct virtio_device *vdev) /* Give virtio_ring a chance to accept features. */ vring_transport_features(vdev); + /* Give virtio_ccw a chance to accept features. */ + ccw_transport_features(vdev); + features->index = 0; features->features = cpu_to_le32((u32)vdev->features); /* Write the first half of the feature bits to the host. */ diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 4b3f9e1a3cab..64f20023f088 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -1968,6 +1968,8 @@ void vring_transport_features(struct virtio_device *vdev) break; case VIRTIO_F_IOMMU_PLATFORM: break; + case VIRTIO_F_RING_PACKED: + break; default: /* We don't understand this bit. */ __virtio_clear_bit(vdev, i); -- 2.18.0