get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/41851/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 41851,
    "url": "http://patches.dpdk.org/api/patches/41851/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180628215235.106069-4-yong.liu@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20180628215235.106069-4-yong.liu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180628215235.106069-4-yong.liu@intel.com",
    "date": "2018-06-28T21:52:27",
    "name": "[v3,03/11] net/virtio-user: add unsupported features mask",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "6d995886ebf86babef418c9ac2eab6b300fae1e0",
    "submitter": {
        "id": 17,
        "url": "http://patches.dpdk.org/api/people/17/?format=api",
        "name": "Marvin Liu",
        "email": "yong.liu@intel.com"
    },
    "delegate": {
        "id": 2642,
        "url": "http://patches.dpdk.org/api/users/2642/?format=api",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180628215235.106069-4-yong.liu@intel.com/mbox/",
    "series": [
        {
            "id": 296,
            "url": "http://patches.dpdk.org/api/series/296/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=296",
            "date": "2018-06-28T21:52:24",
            "name": "support in-order feature",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/296/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/41851/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/41851/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 69F471B3A3;\n\tThu, 28 Jun 2018 16:06:56 +0200 (CEST)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id 0F9E11DB9\n\tfor <dev@dpdk.org>; Thu, 28 Jun 2018 16:06:49 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t28 Jun 2018 07:06:49 -0700",
            "from dpdk-test32.sh.intel.com ([10.67.119.193])\n\tby FMSMGA003.fm.intel.com with ESMTP; 28 Jun 2018 07:06:48 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,283,1526367600\"; d=\"scan'208\";a=\"60850349\"",
        "From": "Marvin Liu <yong.liu@intel.com>",
        "To": "maxime.coquelin@redhat.com,\n\ttiwei.bie@intel.com",
        "Cc": "zhihong.wang@intel.com,\n\tdev@dpdk.org,\n\tMarvin Liu <yong.liu@intel.com>",
        "Date": "Fri, 29 Jun 2018 05:52:27 +0800",
        "Message-Id": "<20180628215235.106069-4-yong.liu@intel.com>",
        "X-Mailer": "git-send-email 2.17.0",
        "In-Reply-To": "<20180628215235.106069-1-yong.liu@intel.com>",
        "References": "<20180628215235.106069-1-yong.liu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v3 03/11] net/virtio-user: add unsupported\n\tfeatures mask",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "This patch introduces unsupported features mask for virtio-user device.\nFor virtio-user server mode, when reconnecting virtio-user will retrieve\nvhost device features as base and then unmask unsupported features.\n\nSigned-off-by: Marvin Liu <yong.liu@intel.com>",
    "diff": "diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c\nindex 4322527f2..0fe3b377d 100644\n--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c\n+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c\n@@ -384,6 +384,7 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,\n \tdev->queue_pairs = 1; /* mq disabled by default */\n \tdev->queue_size = queue_size;\n \tdev->mac_specified = 0;\n+\tdev->unsupported_features = 0;\n \tparse_mac(dev, mac);\n \n \tif (*ifname) {\n@@ -421,8 +422,10 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,\n \n \tif (dev->mac_specified)\n \t\tdev->device_features |= (1ull << VIRTIO_NET_F_MAC);\n-\telse\n+\telse {\n \t\tdev->device_features &= ~(1ull << VIRTIO_NET_F_MAC);\n+\t\tdev->unsupported_features |= (1ull << VIRTIO_NET_F_MAC);\n+\t}\n \n \tif (cq) {\n \t\t/* device does not really need to know anything about CQ,\n@@ -437,6 +440,12 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,\n \t\tdev->device_features &= ~(1ull << VIRTIO_NET_F_GUEST_ANNOUNCE);\n \t\tdev->device_features &= ~(1ull << VIRTIO_NET_F_MQ);\n \t\tdev->device_features &= ~(1ull << VIRTIO_NET_F_CTRL_MAC_ADDR);\n+\t\tdev->unsupported_features |= (1ull << VIRTIO_NET_F_CTRL_VQ);\n+\t\tdev->unsupported_features |= (1ull << VIRTIO_NET_F_CTRL_RX);\n+\t\tdev->unsupported_features |= (1ull << VIRTIO_NET_F_CTRL_VLAN);\n+\t\tdev->unsupported_features |= (1ull << VIRTIO_NET_F_GUEST_ANNOUNCE);\n+\t\tdev->unsupported_features |= (1ull << VIRTIO_NET_F_MQ);\n+\t\tdev->unsupported_features |= (1ull << VIRTIO_NET_F_CTRL_MAC_ADDR);\n \t}\n \n \t/* The backend will not report this feature, we add it explicitly */\n@@ -444,6 +453,7 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,\n \t\tdev->device_features |= (1ull << VIRTIO_NET_F_STATUS);\n \n \tdev->device_features &= VIRTIO_USER_SUPPORTED_FEATURES;\n+\tdev->unsupported_features |= ~VIRTIO_USER_SUPPORTED_FEATURES;\n \n \tif (rte_mem_event_callback_register(VIRTIO_USER_MEM_EVENT_CLB_NAME,\n \t\t\t\tvirtio_user_mem_event_cb, dev)) {\ndiff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.h b/drivers/net/virtio/virtio_user/virtio_user_dev.h\nindex d2d4cb825..c23ddfcc5 100644\n--- a/drivers/net/virtio/virtio_user/virtio_user_dev.h\n+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.h\n@@ -33,6 +33,7 @@ struct virtio_user_dev {\n \t\t\t\t   * and will be sync with device\n \t\t\t\t   */\n \tuint64_t\tdevice_features; /* supported features by device */\n+\tuint64_t\tunsupported_features; /* unsupported features mask */\n \tuint8_t\t\tstatus;\n \tuint16_t\tport_id;\n \tuint8_t\t\tmac_addr[ETHER_ADDR_LEN];\ndiff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c\nindex 1c102ca72..416dbdcf8 100644\n--- a/drivers/net/virtio/virtio_user_ethdev.c\n+++ b/drivers/net/virtio/virtio_user_ethdev.c\n@@ -30,7 +30,6 @@ virtio_user_server_reconnect(struct virtio_user_dev *dev)\n \tint ret;\n \tint flag;\n \tint connectfd;\n-\tuint64_t features = dev->device_features;\n \tstruct rte_eth_dev *eth_dev = &rte_eth_devices[dev->port_id];\n \n \tconnectfd = accept(dev->listenfd, NULL, NULL);\n@@ -45,15 +44,8 @@ virtio_user_server_reconnect(struct virtio_user_dev *dev)\n \t\treturn -1;\n \t}\n \n-\tfeatures &= ~dev->device_features;\n-\t/* For following bits, vhost-user doesn't really need to know */\n-\tfeatures &= ~(1ull << VIRTIO_NET_F_MAC);\n-\tfeatures &= ~(1ull << VIRTIO_NET_F_CTRL_VLAN);\n-\tfeatures &= ~(1ull << VIRTIO_NET_F_CTRL_MAC_ADDR);\n-\tfeatures &= ~(1ull << VIRTIO_NET_F_STATUS);\n-\tif (features)\n-\t\tPMD_INIT_LOG(ERR, \"WARNING: Some features 0x%\" PRIx64 \" are not supported by vhost-user!\",\n-\t\t\t     features);\n+\t/* umask vhost-user unsupported features */\n+\tdev->device_features &= ~(dev->unsupported_features);\n \n \tdev->features &= dev->device_features;\n \n",
    "prefixes": [
        "v3",
        "03/11"
    ]
}