From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0F6E6A0093; Tue, 14 Jun 2022 01:38:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9C1174068E; Tue, 14 Jun 2022 01:38:26 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id BB8174067C for ; Tue, 14 Jun 2022 01:38:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655163504; x=1686699504; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=ajIuZ6iVWky2pG8b55aEs1NkcfilMCzMIVm4upBSWWo=; b=F8Njg7Box1mydBa3SeMxlTswNOoamE1uGtZ6BP01c07SH4qt2dD9gv2m SEuxYgauxh2cjPj++SPuo9JNKjevI9Llrx2/G1/pUxgJv84gAWnBuck8p 9Lw9kJzRwAVnhl/qsdVoMFXLTvZFup5l1YgzKVmAhyhRRoUePeVJjoaws 7dnItHQbYednlqi8dZXlTvEe+D1ug6BC0vHos3bLm6eTNvZtnV1cIdAsJ HjPVKvOcyGq6P25ra5B/R2xoeZ+d5LRtSUU2DCgk/3aXC8QG9vEZWmps1 RphbEIQcOdAJdkpOiUxg8XSAwWkUl9ul+yjbjLcleSO0jcsNt2HTQ3pzy A==; X-IronPort-AV: E=McAfee;i="6400,9594,10377"; a="275977278" X-IronPort-AV: E=Sophos;i="5.91,298,1647327600"; d="scan'208";a="275977278" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jun 2022 16:38:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,298,1647327600"; d="scan'208";a="588090944" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by fmsmga007.fm.intel.com with ESMTP; 13 Jun 2022 16:38:23 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Mon, 13 Jun 2022 16:38:23 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Mon, 13 Jun 2022 16:38:23 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.176) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Mon, 13 Jun 2022 16:38:22 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LjHrRfL8RtXEyvy6SYP7e3bF6usMr/jq7Z+P9b8sYWowR8xwGyclHil4rUzf3HSeYwhf/mOz4QeZ2zNYJIdaQQnELvbl2xkMFsdJWeTdRFnGIbyn3i41snqt96HzLjfY4At795VfvLkon+KfqgxQip+CRBDJntBQ6OgZ0E1refO7Y+uh8vU1PYfylawAJSt/ew0eGCuqOGzTT/Jo9jLvIYpTY4joYaN63mBbj5rOuxbmOJ3Bir5e4kImdBBuBae4aQ5qXfd6OTudd74b1gJVMFbBG8qMBxH9s/Qb6q/3leNgNCFfdb8H3DWCCkw6TfYmL6iknbR1Aw70ZGyk5ZJqHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/XznWYdUlY6xnA8zzfWr7XTiwxXpuC8u1L+RGKyOBM8=; b=Z9PDOYU6IuuJbtdQu/a0fDiyhBJl74ZMW3hmkHLIXQfJuDMrgjU4gP5Gwbo5bwGjxIbzViEJ/cv+8Q/Eawoiuo9VAQQItT+h4gc5ICsp2xIlEXin792kRMl3QkQz87Vq4zcO2NGUHN+F/eB8663j7u6m5HuRyVF3sp+BTnAk/pTc48YQ0Cpy7tL+nmQyMz3gTG/NdqsGeijpjqHhQqpVQdWPDSjBA5aOZ4crhk9Uko0TuMKJpCFUoGhric9OREm99uzLwn69IvMAkg54wFvWrZQ0PKlOPchF2teAwqEZtuqJBSzQ4GQ80ZTPFNmAT3pwYUxpZf5YY/njsiD5W8HERA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DM4PR11MB5994.namprd11.prod.outlook.com (2603:10b6:8:5d::20) by DM6PR11MB3819.namprd11.prod.outlook.com (2603:10b6:5:13f::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.15; Mon, 13 Jun 2022 23:38:21 +0000 Received: from DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::b4f6:f68:2e31:ddf7]) by DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::b4f6:f68:2e31:ddf7%8]) with mapi id 15.20.5332.020; Mon, 13 Jun 2022 23:38:21 +0000 From: "Zhang, Qi Z" To: "Li, Xiaoyun" , "Loftus, Ciara" , "dev@dpdk.org" Subject: RE: [PATCH] net/af_xdp: allow using copy mode in XSK Thread-Topic: [PATCH] net/af_xdp: allow using copy mode in XSK Thread-Index: AQHYfznT6P/e1kEfjUq8oO2vpN1TjK1N/Knw Date: Mon, 13 Jun 2022 23:38:21 +0000 Message-ID: References: <20220613151231.1359592-1-xiaoyun.li@intel.com> In-Reply-To: <20220613151231.1359592-1-xiaoyun.li@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.500.17 dlp-product: dlpe-windows authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 82c700d5-077d-40f0-f83d-08da4d95cd45 x-ms-traffictypediagnostic: DM6PR11MB3819:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: R0eSsHmGXNjZK8pbcCzsTGcCGxXKMCeA1lAWt8HMXp+XSpoEsTK08y9zt5nsV8zZ6cXWinB6+IpZeiTsfT0ZkgNzjgfqrRdPBK6lfDdUIjGD03Yn+FtDR/sA75qdAkMPZCFFBxam0TNNbQqD6zR4C4LtGIaU0UjUcU1tlAOqs5BOMpdfJSYz2YkTdM/D5hL/oPIn6+JbMAVdEg9+SCJEEN4tVlshibBiQ+awTrUebUbDYBNSNXlvgB+SurDcApP+KlRxDn2acGhf1/DQ8NpZZtmcGXlwoWLVDKPq7zAipy0/hi/4YWJPZIRY8xEiAdweEzZ5cYB0VoNw7wgclUhanoeiETJp0MY3TkU5MZ80xBaNcVzg5JWnndAsQoTqLz6QWprXqy6tKJ9lEXcFUTpW1r4g6SbHlUQV+PhyMww0rkSOuLjYu8mFRRqAJYgSJcqRA54m9X9OV2czJ7jw7iJhEPorbGCgNBCDSMakhZ9LRtjHYhBZ8NKV0fzCJTdw486+ynMJLgtsyO439ncKhqID38uBqx/iDAAGIzmv5VQjjTRsnDLohsGgVdZolhDKu+cdCVL47jpf83vlII3C+imHiK6D3YYlLBwBvoUCYqjWa+ZtLmzqr3/Zi57C9D0QYWkfx1XX/XK37wNQHtGFtB7+/dVsrVhIVU11y16pwVFvBCVbfL6BCmnB3kRd8NgVmzg3ZpA/GPnQy24ut4ixqgfyng== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5994.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(366004)(83380400001)(186003)(33656002)(38100700002)(38070700005)(122000001)(82960400001)(4744005)(8936002)(5660300002)(52536014)(66556008)(64756008)(55016003)(2906002)(508600001)(66946007)(9686003)(76116006)(6506007)(66476007)(7696005)(26005)(71200400001)(110136005)(316002)(8676002)(66446008)(53546011)(86362001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?+8kZRdzX2iLLN7M0BIoK9C0VpviL1yYgJF+vALeP5UGHN1/mqn/I9/6I1OvM?= =?us-ascii?Q?0dHfiX/VC7OBFTTsNVEIFHkZtG9FeU0ilLa4wFW5zwknF81jUTjf4p+N6/Al?= =?us-ascii?Q?bmvhniau9w8+urqFDSBo9V2Fo2JwFiq4NmJplTQYsc7wUVfkfG28KmPPXZYx?= =?us-ascii?Q?sU3TRk36fiPmGgSoZrXQTbbUnI0wHn/NJfuqfq8hH/PIKeyCVpzScK+b9/3d?= =?us-ascii?Q?ol28f71YUgJdbb94L5iZAURmgXUPpL2QzJzwML+9aHCz1UXIVDsN41V9/k9x?= =?us-ascii?Q?QNlzpeM7mqyy2+CL0Ur4wq1QJXX1sjPORSQSCaAPbl7bMqJ23N7Nl8/YrCaz?= =?us-ascii?Q?TqdJLkONqP9xyDlYh+64RomrNYWpcNOoO+ja5WqUKPrCEg+gg/oiFIZLt3n5?= =?us-ascii?Q?1zizIZD2GpBrrI8YxmiDm2Ic4yhQs2QZqQ1gcyJOMuHxzksj0Qz/zwSnKE0J?= =?us-ascii?Q?pk4sfVvKg9bDmZeky7lz7NPq9Ft0k/t9R1MgavK0Av/VUS0osHX1m+H2CZYV?= =?us-ascii?Q?WfttEsusVytoocZZffiPr857vryZ572h8H5XZQto+P8CBqDAUROkYNUNRj27?= =?us-ascii?Q?w43tW5XE5SmG41x9TlxYBvCyIKKW+auiNSCPVXuQ44OSfH7h7saRs3oIdq1p?= =?us-ascii?Q?wpOZZ3h7V7Zicwg/8csVvyJAIvducQsVqJl1Kanq5bUGXZRWmX+YY0Bli3eQ?= =?us-ascii?Q?+eD7LvB5B/zP2CbBjKpg9CQMhKEj7Xl3ZwwIRQ6mk+WW/iwwr0Kb2uhkv0B5?= =?us-ascii?Q?tJjKGB1csAg5WF19RwrF0iM4IhAkSnqr4wWcSKuMqQMD8fExEkNJWkHOpMap?= =?us-ascii?Q?z6/I8wIZPliU5QZWtYcsKhFN7l8VNWUFH06Dl5G7BP+hIsxfw9sJgHvnRfGn?= =?us-ascii?Q?crRsygz1WAkG9MWNffwwjxyiYuj+5rCGN9btpJHqo6q/eqvyd2gG6pCYEtwe?= =?us-ascii?Q?2c+tgBoi+r+2ELB1+qaP6r8LNprJGegxaA1wf9Wucc+nKFw8pjo3MW8dWTin?= =?us-ascii?Q?nthzvN/s0gybsq63f9l8tnvmTzHTAsXA2yM79xIXch52RwvUJgE9pAaXykjE?= =?us-ascii?Q?I6qa80fzYJixsyIWHAg2CrL9rYfL2Lx9LV9zcs2DcZDqzyozSidrUD54/7iz?= =?us-ascii?Q?jivIViZZODyGc2q4DKxCtV2AVlcmJXFodp10OwQ2zss4AuztKiEtSMcZhfV1?= =?us-ascii?Q?CDNSeBzt4bcvtTSrNB5Q1n2d5A6Cl95664uszS/2O6xzQrjsouotChpFrmiE?= =?us-ascii?Q?ewG2SJfj+HW7hDsmKKRcih1jhhc9e9R30TuWBuStrK+7d3l5kxddWUanblm7?= =?us-ascii?Q?r+xBWpLj02VOphnp/uuc2sFdnP6dpDjKZPlbSwYCpWanmxklXO9C789vNLGW?= =?us-ascii?Q?30E9Yvl4HCY5En0HjD3UflDhjy8P7BCowMengplF5d5MK9V4yhcOZaCMPE7s?= =?us-ascii?Q?ZDVMHBBe70Ge+ZpQjkIb+GQoATNcmFN1+JtAvc1cnowUw1w2v5RTMor0HzVi?= =?us-ascii?Q?jZNpop2E4qIGvyTJ98Qy+/Xs+iAgZvlA0N1z5wRxnW1GiKStHUc5GBO0xz3u?= =?us-ascii?Q?8m9gmRG9RvEkAFhEf9tBXN0gpWtp+JGROLPJAt1HudcYo05egjuH0V3bg5Q/?= =?us-ascii?Q?oWmB4fO9HTm6JwZlbs6LvxWk5Byi9ql7fsxDzXZJNJquX48/9GdFY5LWJtK6?= =?us-ascii?Q?z36tCM3+Wncb/1wJlRTCcAdA6Bnjomcs1AQGX37kwoHXcjJgXcZYIIL5g7wS?= =?us-ascii?Q?MBA4AU18Vg=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5994.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 82c700d5-077d-40f0-f83d-08da4d95cd45 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Jun 2022 23:38:21.5258 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: wEU+00mXI3dPKNo5HxwVEaI0HhSwud65cHWUWUOQibIjtzTpjsO4zLuHNbWSGX24BtsJA77p5ddaQBYUSF43JQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3819 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > -----Original Message----- > From: Li, Xiaoyun > Sent: Monday, June 13, 2022 11:13 PM > To: Loftus, Ciara ; Zhang, Qi Z > ; dev@dpdk.org > Cc: Li, Xiaoyun > Subject: [PATCH] net/af_xdp: allow using copy mode in XSK >=20 > DPDK assumes that users only want AF_XDP socket (XSK) into zero copy mode > when the kernel supports it. However, sometimes kernel driver doesn't > support it well and copy mode is more stable and preferred. rename "no_zerocopy" to "force_copy" looks better?=20 This aligned with the comment on the macro definition in kernel #define XDP_COPY (1 << 1) /* Force copy-mode */ And also make the below code more smooth. if (internals->force_copy) cfg.bind_flags |=3D XDP_COPY;