get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 16703,
    "url": "https://patches.dpdk.org/api/patches/16703/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1476850306-2141-22-git-send-email-rasesh.mody@qlogic.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<1476850306-2141-22-git-send-email-rasesh.mody@qlogic.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1476850306-2141-22-git-send-email-rasesh.mody@qlogic.com",
    "date": "2016-10-19T04:11:35",
    "name": "[dpdk-dev,v4,21/32] net/qede: add enable/disable VLAN filtering",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "23ab97d20767a1db5c421eaa5152ec15225dc626",
    "submitter": {
        "id": 325,
        "url": "https://patches.dpdk.org/api/people/325/?format=api",
        "name": "Rasesh Mody",
        "email": "rasesh.mody@qlogic.com"
    },
    "delegate": {
        "id": 10,
        "url": "https://patches.dpdk.org/api/users/10/?format=api",
        "username": "bruce",
        "first_name": "Bruce",
        "last_name": "Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1476850306-2141-22-git-send-email-rasesh.mody@qlogic.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/16703/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/16703/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 98DF98E70;\n\tWed, 19 Oct 2016 06:14:05 +0200 (CEST)",
            "from mx0b-0016ce01.pphosted.com (mx0a-0016ce01.pphosted.com\n\t[67.231.148.157]) by dpdk.org (Postfix) with ESMTP id 82EE68E6A\n\tfor <dev@dpdk.org>; Wed, 19 Oct 2016 06:14:03 +0200 (CEST)",
            "from pps.filterd (m0095336.ppops.net [127.0.0.1])\n\tby mx0a-0016ce01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id\n\tu9J4CLjo002582; Tue, 18 Oct 2016 21:14:02 -0700",
            "from avcashub1.qlogic.com ([198.186.0.117])\n\tby mx0a-0016ce01.pphosted.com with ESMTP id 263jj4nbqh-1\n\t(version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT);\n\tTue, 18 Oct 2016 21:14:02 -0700",
            "from avluser05.qlc.com (10.1.113.115) by qlc.com (10.1.4.192) with\n\tMicrosoft SMTP Server id 14.3.235.1;\n\tTue, 18 Oct 2016 21:14:01 -0700",
            "(from rmody@localhost)\tby avluser05.qlc.com (8.14.4/8.14.4/Submit)\n\tid u9J4E1cN002342;\tTue, 18 Oct 2016 21:14:01 -0700"
        ],
        "X-Authentication-Warning": "avluser05.qlc.com: rmody set sender to\n\trasesh.mody@qlogic.com using -f",
        "From": "Rasesh Mody <rasesh.mody@qlogic.com>",
        "To": "<ferruh.yigit@intel.com>, <thomas.monjalon@6wind.com>,\n\t<bruce.richardson@intel.com>",
        "CC": "<dev@dpdk.org>, <Dept-EngDPDKDev@qlogic.com>, Harish Patil\n\t<harish.patil@qlogic.com>",
        "Date": "Tue, 18 Oct 2016 21:11:35 -0700",
        "Message-ID": "<1476850306-2141-22-git-send-email-rasesh.mody@qlogic.com>",
        "X-Mailer": "git-send-email 1.7.10.3",
        "In-Reply-To": "<1476850306-2141-1-git-send-email-rasesh.mody@qlogic.com>",
        "References": "<1476850306-2141-1-git-send-email-rasesh.mody@qlogic.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "disclaimer": "bypass",
        "X-Proofpoint-Virus-Version": "vendor=nai engine=5800 definitions=8322\n\tsignatures=670725",
        "X-Proofpoint-Spam-Details": "rule=notspam policy=default score=0\n\tpriorityscore=1501 malwarescore=0\n\tsuspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015\n\tlowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam\n\tadjust=0\n\treason=mlx scancount=1 engine=8.0.1-1609300000\n\tdefinitions=main-1610190074",
        "Subject": "[dpdk-dev] [PATCH v4 21/32] net/qede: add enable/disable VLAN\n\tfiltering",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Harish Patil <harish.patil@qlogic.com>\n\nThe device doesn't explicitly support enable/disable\nof VLAN filtering. However, VLAN filtering takes effect\nwhen a matching VLAN is configured. So in order to\nsupport enable/disable of VLAN filtering, VLAN 0 is\nadded/removed respectively. A check is added to ensure that\nthe user removes all the configured VLANs before disabling\nVLAN filtering.\n\nAlso VLAN offloads shall be enabled by default and\nvlan_tci_outer is to set to 0 for Q-in-Q packets.\n\nFixes: 2ea6f76 (\"qede: add core driver\")\n\nSigned-off-by: Harish Patil <harish.patil@qlogic.com>\n---\n drivers/net/qede/qede_ethdev.c | 35 ++++++++++++++++++++++++++++++++---\n drivers/net/qede/qede_ethdev.h |  4 ++++\n drivers/net/qede/qede_rxtx.c   |  1 +\n 3 files changed, 37 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c\nindex b97e3be..4afc905 100644\n--- a/drivers/net/qede/qede_ethdev.c\n+++ b/drivers/net/qede/qede_ethdev.c\n@@ -372,16 +372,40 @@ static void qede_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask)\n {\n \tstruct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);\n \tstruct ecore_dev *edev = QEDE_INIT_EDEV(qdev);\n+\tstruct rte_eth_rxmode *rxmode = &eth_dev->data->dev_conf.rxmode;\n \n \tif (mask & ETH_VLAN_STRIP_MASK) {\n-\t\tif (eth_dev->data->dev_conf.rxmode.hw_vlan_strip)\n+\t\tif (rxmode->hw_vlan_strip)\n \t\t\t(void)qede_vlan_stripping(eth_dev, 1);\n \t\telse\n \t\t\t(void)qede_vlan_stripping(eth_dev, 0);\n \t}\n \n-\tDP_INFO(edev, \"vlan offload mask %d vlan-strip %d\\n\",\n-\t\tmask, eth_dev->data->dev_conf.rxmode.hw_vlan_strip);\n+\tif (mask & ETH_VLAN_FILTER_MASK) {\n+\t\t/* VLAN filtering kicks in when a VLAN is added */\n+\t\tif (rxmode->hw_vlan_filter) {\n+\t\t\tqede_vlan_filter_set(eth_dev, 0, 1);\n+\t\t} else {\n+\t\t\tif (qdev->configured_vlans > 1) { /* Excluding VLAN0 */\n+\t\t\t\tDP_NOTICE(edev, false,\n+\t\t\t\t  \" Please remove existing VLAN filters\"\n+\t\t\t\t  \" before disabling VLAN filtering\\n\");\n+\t\t\t\t/* Signal app that VLAN filtering is still\n+\t\t\t\t * enabled\n+\t\t\t\t */\n+\t\t\t\trxmode->hw_vlan_filter = true;\n+\t\t\t} else {\n+\t\t\t\tqede_vlan_filter_set(eth_dev, 0, 0);\n+\t\t\t}\n+\t\t}\n+\t}\n+\n+\tif (mask & ETH_VLAN_EXTEND_MASK)\n+\t\tDP_INFO(edev, \"No offloads are supported with VLAN Q-in-Q\"\n+\t\t\t\" and classification is based on outer tag only\\n\");\n+\n+\tDP_INFO(edev, \"vlan offload mask %d vlan-strip %d vlan-filter %d\\n\",\n+\t\tmask, rxmode->hw_vlan_strip, rxmode->hw_vlan_filter);\n }\n \n static int qede_set_ucast_rx_vlan(struct qede_dev *qdev,\n@@ -584,6 +608,11 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev)\n \tif (IS_PF(edev))\n \t\tqede_mac_addr_set(eth_dev, &qdev->primary_mac);\n \n+\t/* Enable VLAN offloads by default */\n+\tqede_vlan_offload_set(eth_dev, ETH_VLAN_STRIP_MASK  |\n+\t\t\t\t       ETH_VLAN_FILTER_MASK |\n+\t\t\t\t       ETH_VLAN_EXTEND_MASK);\n+\n \tqdev->state = QEDE_DEV_CONFIG;\n \n \treturn 0;\ndiff --git a/drivers/net/qede/qede_ethdev.h b/drivers/net/qede/qede_ethdev.h\nindex ed2d41c..526d3be 100644\n--- a/drivers/net/qede/qede_ethdev.h\n+++ b/drivers/net/qede/qede_ethdev.h\n@@ -152,6 +152,10 @@ struct qede_dev {\n \tchar drv_ver[QED_DRV_VER_STR_SIZE];\n };\n \n+/* Static functions */\n+static int qede_vlan_filter_set(struct rte_eth_dev *eth_dev,\n+\t\t\t\tuint16_t vlan_id, int on);\n+\n int qed_fill_eth_dev_info(struct ecore_dev *edev,\n \t\t\t\t struct qed_dev_eth_info *info);\n int qede_dev_set_link_state(struct rte_eth_dev *eth_dev, bool link_up);\ndiff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c\nindex 6973d1c..9df0d133 100644\n--- a/drivers/net/qede/qede_rxtx.c\n+++ b/drivers/net/qede/qede_rxtx.c\n@@ -945,6 +945,7 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)\n \t\t\t */\n \t\t\trx_mb->vlan_tci = rte_le_to_cpu_16(fp_cqe->vlan_tag);\n \t\t\trx_mb->ol_flags |= PKT_RX_QINQ_PKT;\n+\t\t\trx_mb->vlan_tci_outer = 0;\n \t\t}\n \n \t\trx_pkts[rx_pkt] = rx_mb;\n",
    "prefixes": [
        "dpdk-dev",
        "v4",
        "21/32"
    ]
}