From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id EBE91A0096 for ; Wed, 10 Apr 2019 13:19:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B3BBD5F14; Wed, 10 Apr 2019 13:19:01 +0200 (CEST) Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-eopbgr790052.outbound.protection.outlook.com [40.107.79.52]) by dpdk.org (Postfix) with ESMTP id 7274E5F14 for ; Wed, 10 Apr 2019 13:18:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=AQUANTIA1COM.onmicrosoft.com; s=selector1-aquantia-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TAU4QqAneoiLAZuDzhjiczJqo5UnGW969KjMuFmWrVo=; b=JNwLqp3zGGfzl4fb+e/ivhHKo8+XqXvyu6bBOAKrkUUs0epVndF9RqNa7TaRqXd+MaR6uFvfO5LlvzkIIuE9iWEtRP9uKJwr3+2bKJ3SKBQ3vUCVrcaT3iTnakdhSt5tAExMaDIi0womZfO+8KcWDA50LBHcIi3XDqsiFoidpkE= Received: from BN8PR11MB3618.namprd11.prod.outlook.com (20.178.219.85) by BN8PR11MB3540.namprd11.prod.outlook.com (20.178.218.78) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1771.21; Wed, 10 Apr 2019 11:18:58 +0000 Received: from BN8PR11MB3618.namprd11.prod.outlook.com ([fe80::9d38:1845:842d:a489]) by BN8PR11MB3618.namprd11.prod.outlook.com ([fe80::9d38:1845:842d:a489%3]) with mapi id 15.20.1771.016; Wed, 10 Apr 2019 11:18:58 +0000 From: Igor Russkikh To: "dev@dpdk.org" CC: Pavel Belous , Wenzhuo Lu , Jingjing Wu , Bernard Iremonger , John McNamara , Marko Kovacevic , Konstantin Ananyev , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Igor Russkikh Thread-Topic: [PATCH 05/10] net/atlantic: macsec configuration code Thread-Index: AQHU748wESZ28zL9VkOgPhS73FnaAQ== Date: Wed, 10 Apr 2019 11:18:57 +0000 Message-ID: <9ac2dcf2607b5eafff3e08d54e5236b12900ed38.1554894242.git.igor.russkikh@aquantia.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR05CA0061.namprd05.prod.outlook.com (2603:10b6:a03:74::38) To BN8PR11MB3618.namprd11.prod.outlook.com (2603:10b6:408:85::21) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Igor.Russkikh@aquantia.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [95.79.108.179] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: cd096549-7dbb-47d8-058f-08d6bda6530a x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600139)(711020)(4605104)(2017052603328)(7193020); SRVR:BN8PR11MB3540; x-ms-traffictypediagnostic: BN8PR11MB3540: x-microsoft-antispam-prvs: x-forefront-prvs: 00032065B2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(39850400004)(376002)(366004)(136003)(346002)(199004)(189003)(486006)(107886003)(6506007)(316002)(2616005)(386003)(54906003)(7416002)(53936002)(8936002)(68736007)(446003)(6916009)(476003)(72206003)(2501003)(105586002)(11346002)(44832011)(99286004)(2351001)(52116002)(186003)(26005)(118296001)(106356001)(14454004)(102836004)(76176011)(71200400001)(81156014)(7736002)(14444005)(8676002)(81166006)(25786009)(256004)(6116002)(5660300002)(71190400001)(1730700003)(5640700003)(2906002)(66066001)(6512007)(478600001)(6486002)(50226002)(305945005)(97736004)(4326008)(3846002)(36756003)(6436002)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN8PR11MB3540; H:BN8PR11MB3618.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: aquantia.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: fVyVuV/8gcMsVsctxxE7F7l4BXB5Of5nrn13v/+W6wUi02mcIISXNxSW4tOFXRvB+LR5WAWz30M/TWxlXR7l1Ft8GdUZcqScUupVz85q5nu0GoXVLudT7BqM53eUsaP/3KaDn35KWBcxvaHiEHaPdP1PbvuVb41fSsr1JQFfaCBvvYVzyZ5KldU3PN/OptBqGoCsp+NjO2hce45mpbbzTinyzxK3Vro2ywv7s50mKGogKsFrWcMgnu4fd6nribq3pyX0SIhipmWpSCK+3az8NFO/qn5kTU6gVEQtahuZ4CX7K2XHvjm0K3SQfbMJbROCCA7x5ik9Nt2TvMqAvcOjwxNUa8mVHjN4RVegR1S98/XLlBX38QPDKlTeD4hc5foNNXMUen0VkiAdBqlgSkHTwu33Ty0hArbbsDtNbFlwJEg= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: aquantia.com X-MS-Exchange-CrossTenant-Network-Message-Id: cd096549-7dbb-47d8-058f-08d6bda6530a X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Apr 2019 11:18:57.8362 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 83e2e134-991c-4ede-8ced-34d47e38e6b1 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR11MB3540 Subject: [dpdk-dev] [PATCH 05/10] net/atlantic: macsec configuration code X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: d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