From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0072.outbound.protection.outlook.com [104.47.2.72]) by dpdk.org (Postfix) with ESMTP id 5C1C08DF0 for ; Wed, 25 Apr 2018 18:14:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=e9ufzF3dfkbNZoz7dhJB8ru2bWBytCWMr/7/kLwvz8U=; b=bl2ciiNreuAyy1hXUEgn8co/oE8H2hJ/6RyOU9a073a/jOk5Rq0mGmFd69ArTXAbPdRkc97GeNDvN9g5tkIFV2ykHYuHZbUTQFPyEc4AWuLh00WSUGbWRvaSpcoBEBU3MbjgsCRbNtkFcJTygPvFWxXloF02RPrRFsvrbunjsRg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ophirmu@mellanox.com; Received: from mellanox.com (37.142.13.130) by HE1PR0501MB2316.eurprd05.prod.outlook.com (10.168.34.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.15; Wed, 25 Apr 2018 16:14:30 +0000 From: Ophir Munk To: Ophir Munk Cc: stable@dpdk.org Date: Wed, 25 Apr 2018 16:14:15 +0000 Message-Id: <1524672855-3877-1-git-send-email-ophirmu@mellanox.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: DB6PR1001CA0020.EURPRD10.PROD.OUTLOOK.COM (10.171.79.30) To HE1PR0501MB2316.eurprd05.prod.outlook.com (10.168.34.21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(2017052603328)(7153060)(7193020); SRVR:HE1PR0501MB2316; X-Microsoft-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rQW9ZQ+t7Jo4YfF8cickPnLE7FFMCoNaRapf+X0B5lWeczB7DRwOZrjHCyfVplb5Onm7YX5n3rq6pCYkFMZG7maYxQDz4QjIJKtTA7f1YBahAgYX4RoTcxWXbSFU7JXts9oS+9WAZCN1b5rTzVotfls9rNptgYNiApI+P+8epPizm9AcdCjgDi7irj62A7nCm2kMx1jAjO8j60OQ2kN2mvGbk6pUsbAXbN9PAUeeOZoAKvSYuYNGCGiOjKypmcm7A2Sw3OGazPTI2wuAwnFfbPI6wqt26d7HQYJrlvQPDXsomrOP//8lYdxusmSLeb9TwhrlLkqkVjBNgDECMPv5Z4dKJRkongbz8QYThya7pUB0ga6+8TRsZtgbLSxlP+dMOkyU+T7wl8; 4:GyIPRZahJqW20+MnGqN5nfTz1LuEL723jgNA/XpYoo18QL4W0OaU3HFdSxvbBNgzzuh9ESXo5woTA1jzzUtopTBSzYfh2MIduHyyIH2lSuyefRvNd8EkgHoh6Upwdzt4PyYf/YO2tPMwLDITnH3VPvsjPhYjaCD8SsCEwBj0IDha3Nsj0Dtek3Hkhnl1o6mAtrHVTSlQmWb4gCiorkSgDfGrxQeojUFTJ+pqzpy2Ls0zSyI1Ll3j6sg1a7b+5Dr3NjN7RMT1H6eOCUr007Qm0g== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231232)(944501410)(52105095)(10201501046)(93006095)(93001095)(3002001)(6055026)(6041310)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:HE1PR0501MB2316; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0501MB2316; X-Forefront-PRVS: 06530126A4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(366004)(346002)(39380400002)(396003)(39860400002)(199004)(189003)(81166006)(86362001)(69596002)(52116002)(5660300001)(7736002)(81156014)(8676002)(53936002)(305945005)(55016002)(8936002)(25786009)(48376002)(50466002)(478600001)(2616005)(956004)(316002)(21086003)(486006)(37006003)(33026002)(50226002)(4326008)(476003)(68736007)(105586002)(26005)(7049001)(16526019)(6666003)(16586007)(2906002)(7696005)(51416003)(59450400001)(47776003)(4720700003)(6200100001)(6862004)(36756003)(3846002)(66066001)(386003)(97736004)(106356001)(6116002); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0501MB2316; H:mellanox.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0501MB2316; 23:csV0fd3WEwvrIppkxyOurURWL7qwF6Jb4NkBeBf?= =?us-ascii?Q?aeHyJzZaI+YgPDFiEtDaEbMqLCYRuLwtntEYPPUPPmzySMUo9XKKBVMsMVEv?= =?us-ascii?Q?zN1EHCKrANG3w6HM89BDAFeQy/fzMzVkvU7YrPONQ+0LSnILciXuwIiyR15O?= =?us-ascii?Q?FHULbTP92Epg8AzdT8lNxFu+dydSMa8Qjmx5BAYNONvougAToe5+K1q4ZgXx?= =?us-ascii?Q?gBE0jQ7yESoZFeZ1p7Rez2f8/3G9bQykOAU39RJaUDDeuckspIyk1R9HrQLE?= =?us-ascii?Q?SCN/MwyceWV4TpuvhFV5fKIGirwhIk+6XFZkwHOwug9nSI8EOcgdTg+f+gyK?= =?us-ascii?Q?O/zB2sgzlpiR/kl5UNG2472llUxNBLlN4RPuk+KliTgxLnSbu8KH13nBUeOy?= =?us-ascii?Q?IsapG6+YvqPymnmYKF7eyue46iPx3nBKflTAhWejNQwPsHdzck8ErERlcejR?= =?us-ascii?Q?pkqjVpkACRZr9+V8tB21IOYKKSeNAe/jE4QjMwC9QMNbSAM3syN6Z1oQ/Obb?= =?us-ascii?Q?36utODwHP8EWxI78nsIMgNXIbYymplZ40SvQ/JfjWK670kpGVdlXjtaEed7K?= =?us-ascii?Q?uoBJOSOhGxfwQD5dCwxjcqSbIIKLL++N/Z7Afrm70QWJamjb6ZcmcJRouG6q?= =?us-ascii?Q?nRTW9X/1iPx81vvjW6UaTjHII4BWcTmFs/2gW0SNy0uSCqeahQawwPK9Jg/K?= =?us-ascii?Q?ahr1L4KGW6mRPGxrHg7TijXul786L4JZoYA6yRL5BdVdkAdON+jB5syjISRz?= =?us-ascii?Q?dWRq9JI5d3za+b7oqjCNrD9O5x1dy04Zl+pbUWXdf80WljdNTbz/IWL9Bvvm?= =?us-ascii?Q?azpayku3MfHvGCYm5/c7e86ppAjEEpzbNlkOdoLl/wlK+NNYNBJETeg770Pa?= =?us-ascii?Q?m6SfocQ/07t+MTV+P0QdzVqhIy0RYjQrcBpVDw3PwTAqEPN/UhPZXJ0oIU1q?= =?us-ascii?Q?J/TyO/bU3jUc+tgu31UmLELAUNsZjrIrxeITscz5Ufbs3YbT218xu47U/iMv?= =?us-ascii?Q?p1+F899C+LS6m0cd/XtkJ6uqmIdVqSaGg8Xp4Cu4ppRcYx1Z5ed2bKtp4q1P?= =?us-ascii?Q?e56zA9+7pew9VTbXokkwp9kPFPUN2pB0z9+pO657ZCLS5MMxBUsuG3HT+/f2?= =?us-ascii?Q?j3Ae/q+SbUH7+jYl/ikwylJT7c6KhkB8j7pO2fsfCHkLaqgTjHePXuOlktik?= =?us-ascii?Q?JgG0h6g/jU8NxVGJAmZxSnM8gihnUltVCEfZyOiK31Oej4xOUTPk8zQsopNG?= =?us-ascii?Q?lJOUNmpyqQFZFmkeRNQGwB8OsMvjp9j80QitieyCO?= X-Microsoft-Antispam-Message-Info: rI2hw5sB7js25nUUUxYkODoREq1kSdO1ow+ibEUXOjPetms3j4K8yglY6pk5MSMhC3VYbTLJQsEaCymVi0etb9c8vaxc7G4lkpqMQK5SZuSjuKySdBPU4P1zUtIufvyO1j9WMCfW+6uUrvY+UWWK6Y2FOjrwXd5C2fHumJ3BvNWoK4+ddNz92I3h5RHZpQvT X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2316; 6:REy/XOWOpoFDiRFygtfTa2nv57TLVQfdunKj7TqhEfI4IUfCzKsvzY4l2i7qSUb6oKHxtq6rtWiVwT/zF+QiWoXp/7jJfARoHc/c7AwDiWaHByAbn2keF95aBvKCuYeIfEWF3E9/VtiN9JE8VzU5ANF+QYteLI4qGqmfYlDr5Brr/ei9z323kfBlWrWG5yUDZEq07tk6kcwan9iCFmBFrvOS7+eQE+1PwXCWkExd0Yy9WEgkcCAr7UAkUbUCgQvTVpgyBHjjUlv5uhwh+uciV1FGvFMHDcsMdgX/IscTZBWDF6gK5q2IBhlSc3CfRFxXbvU2Nk5UMuTZLXFU6plq/XJcrfriNzYVejSomQ51NTTeTVDmRP55jX0oRy/KisMRqs+tb7ZZjLrMeqB3Qn0RgGhZe94qquAC9mTIPXrifkyerXAg+VuI02z7Zj+U/hDeet4Bu1sSuLr7kQaizV4jlQ==; 5:SdmquXCZeAu9RTM2MV/VQQr9XRGXx9KvC2U6OIAk00clz4j6JP1wFhr7BYJ9V1js2X5+qcXPjD+mOx3nhDgDKCd4YxJHojt1h9oDCKTgZqVbYszVDY8NFBS7lrxIUVsaxYZu0n+apzhJWod2npfbICRdfutra0y7rZjqwBqkiXk=; 24:oMZePntHoQSS8S6Pe6EnzFkRNBNET1XxOWoJE/86iuh2Fvcw1vifrDtyIXl2AYdr5/sJu0PMWEvem+mzKQy9mszqtyUQiRswcUthu1pHpCo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2316; 7:YjgPzFDPQmgcj+XZcnihGIgqyJkYyWF/Rp0MKhmZLpUysJ+i7a693nQQ4S0t33DXfKDTsCFSGgSeYLhq37bgdk6fhY6yWo91ipnsQ6ElX6+JMW6mf2nzU5C7NaIzsurVyi+n9+7ByozbWXbLqTyDtl46LTTY9AGnu+6oxQFbE+JqPtXKhU0iaHNZdP2RT+n0kJ2hA/rR5M3w/IuwkBxxHQKWbNCR7SZ85z5TrW6ARiSwqSiqOFVdGLEa4YlvJ3s6 X-MS-Office365-Filtering-Correlation-Id: 40098c6e-0a96-40b1-598c-08d5aac7a0ba X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2018 16:14:30.8324 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 40098c6e-0a96-40b1-598c-08d5aac7a0ba X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0501MB2316 Subject: [dpdk-stable] [PATCH v1] net/tap: return empty port offload capabilities X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2018 16:14:33 -0000 Fix report on port offload capabilities to be 0 (no capabilities). Before this commit port capabilities were a clone of queue capabilities, however the current TAP offload capabilities (e.g. checksum calculation) are per queue and are not specific per port. Fixes: 95ae196ae10b ("net/tap: use new Rx offloads API") Fixes: 818fe14a9891 ("net/tap: use new Tx offloads API") Cc: stable@dpdk.org Signed-off-by: Ophir Munk --- drivers/net/tap/rte_eth_tap.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index fe62ab3..aea73b1 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -269,14 +269,9 @@ static uint64_t tap_rx_offload_get_port_capa(void) { /* - * In order to support legacy apps, - * report capabilities also as port capabilities. + * No specific port Rx offload capabilities. */ - return DEV_RX_OFFLOAD_SCATTER | - DEV_RX_OFFLOAD_IPV4_CKSUM | - DEV_RX_OFFLOAD_UDP_CKSUM | - DEV_RX_OFFLOAD_TCP_CKSUM | - DEV_RX_OFFLOAD_CRC_STRIP; + return 0; } static uint64_t @@ -403,14 +398,9 @@ static uint64_t tap_tx_offload_get_port_capa(void) { /* - * In order to support legacy apps, - * report capabilities also as port capabilities. + * No specific port Tx offload capabilities. */ - return DEV_TX_OFFLOAD_MULTI_SEGS | - DEV_TX_OFFLOAD_IPV4_CKSUM | - DEV_TX_OFFLOAD_UDP_CKSUM | - DEV_TX_OFFLOAD_TCP_CKSUM | - DEV_TX_OFFLOAD_TCP_TSO; + return 0; } static uint64_t @@ -787,7 +777,8 @@ tap_dev_stop(struct rte_eth_dev *dev) static int tap_dev_configure(struct rte_eth_dev *dev) { - uint64_t supp_tx_offloads = tap_tx_offload_get_port_capa(); + uint64_t supp_tx_offloads = tap_tx_offload_get_port_capa() | + tap_tx_offload_get_queue_capa(); uint64_t tx_offloads = dev->data->dev_conf.txmode.offloads; if ((tx_offloads & supp_tx_offloads) != tx_offloads) { -- 2.7.4