Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp857771ybl; Fri, 10 Jan 2020 07:53:56 -0800 (PST) X-Google-Smtp-Source: APXvYqwj+FTjaASoJoRXOS9Dqx4QMD2AOgN475XP8LpHwpuPORBgo4CHqijTD5OaBrqM69aWkWEC X-Received: by 2002:a9d:750b:: with SMTP id r11mr3274218otk.209.1578671636455; Fri, 10 Jan 2020 07:53:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578671636; cv=none; d=google.com; s=arc-20160816; b=yGNYoVu1xwLJXJISNO+b1x6f6AxfUzMCpJTrU4EEUkzp6ZrG8Pn3qpZmgdhKucEEsL xpp/7aXMe7ZDXeNVKnR9PZWDghjYIM7y3x7jFdnH8//X+tFwqgw0x1Y6TYIST7VPCH4O anefvZ8/44Th1FHyQxpLG70mzSojEZeX27i0JwBX3SGGPPdgB61LSVTVLXYdf0Ml+4Xy P5UVfzz9mDRsopiab5fa0CFuZFxZvK4M9zGuEzN05bNV5R3Wqv3JNf263mtjPUGyIQlx 2eH7YE6M4VmqBwrRL0r3vflZiUnNXOrJz1urmdRvaL+B5Z2Z8oyJKpn4k7kC2kFeKosP Wc7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=c9yn885qD54fB5dDn+OfSRgsgfTlFfhcqDGic7B3Aag=; b=FtDqwMI2qZgT1Y01eV23CGlrZssGUt0MjxKPL1w00oRNlZ80n4LABMAwxy/601EERC NIE6u/HsmPR/X0IGgOKbXRjbQdSNUReWV2dbOFWB+kUCc50bPqHwiBq81dpQf91Sxy3f idLsGXETztJkiYisSIFVP9F7uhYgKa8uvm0X2JCwbnPa8Q1pAl7SvhkN0hSO4Frw46zn lcjNa3l2N4Ew1fXRL6ID8wKT0NRxUprcOjgHsb5qGRpZvYUHr5ef2+BBa35X3PhFSEsG 2/xq5fjqfoXbm2/xLer5qO0ZGui8OAQuygc7mXBVaaH23Hp/BmxS8+2JsMnhHi+7ahnu G+vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=N7d77Zlz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v67si1456626oia.26.2020.01.10.07.53.45; Fri, 10 Jan 2020 07:53:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=N7d77Zlz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728406AbgAJPvi (ORCPT + 99 others); Fri, 10 Jan 2020 10:51:38 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:42984 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728289AbgAJPvi (ORCPT ); Fri, 10 Jan 2020 10:51:38 -0500 Received: by mail-pf1-f193.google.com with SMTP id 4so1319264pfz.9 for ; Fri, 10 Jan 2020 07:51:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=c9yn885qD54fB5dDn+OfSRgsgfTlFfhcqDGic7B3Aag=; b=N7d77Zlz7JlJ1aEZ2kcsr+1isJ0PTKTKt2JzoypNpcuRniw3hbIu21z/XvrfDkKiKB Mqh8c03o7oFen4sFQi0LrOjojdOaYFz03ARWLZ/atMQS1jp46hnwrTr8bGPW+jrxHORj Msw3Cide5jPRSQ17ISIsmfjQ50Q3q9nPU1NNC0THx6s4K2GlHOdAgWECiNjlkmkt1Oxb c5QOwVJExL1sCA7KuJ7cydRmenfClTtZw7gOO4D/1NtB0XJgy+H+kF2WX8oKqCC2QwZm zpsdMqFV7/K4dZeX62HEK48WKNrOd7FD5KiSrd8yaECATzMQteALSjlpvu2g5VnFR5tP RWCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=c9yn885qD54fB5dDn+OfSRgsgfTlFfhcqDGic7B3Aag=; b=evey0WO5mOvd0/6p4XpXw+wJgaVScGMrEpSj4EWY0cUeI4IVfK7EgW2WWfhJaEPUOl aRPP1df293PQjmFRgUfAOC5hVfhSrsKRcFsOGIsiHCJL5xMeixzmhLNMmiwUfrdhBVcm cUHDY78fC7bodEWgTEXyK2GhlIB9pCmxpsJ37u6SCu9KUAeqrRpUjrpeKgrpNjjStVlo fC2PTnKzRnuGWizVqcqdtkYnaJeMxeQUfIPiK1m5xE5CJRRJAlm3617wtPZ03bEEfb1Y O0rz+3QQcBroQQjllRfuTMlDPVCtdgVU3NHnUxDAV1mUbsux0nLfxaMq2KkgPeA6/IIu d6pw== X-Gm-Message-State: APjAAAV+pqGZP047VhTWJYSlEg2yAaisg0jKHBOj9EU8DBczntvltuUP go93y9zcEoGHiTR3iVCTL/kUwA== X-Received: by 2002:a63:4824:: with SMTP id v36mr5157093pga.343.1578671497048; Fri, 10 Jan 2020 07:51:37 -0800 (PST) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id b19sm3235904pjq.8.2020.01.10.07.51.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2020 07:51:36 -0800 (PST) Date: Fri, 10 Jan 2020 07:50:56 -0800 From: Stephen Hemminger To: Niu Xilei Cc: davem@davemloft.net, tglx@linutronix.de, fw@strlen.de, peterz@infradead.org, pabeni@redhat.com, anshuman.khandual@arm.com, linyunsheng@huawei.com, bigeasy@linutronix.de, jonathan.lemon@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] pktgen: create packet use IPv6 source address between src6_min and src6_max. Message-ID: <20200110075056.06df4c0c@hermes.lan> In-Reply-To: <20200110102842.13585-1-niu_xilei@163.com> References: <20200110102842.13585-1-niu_xilei@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 10 Jan 2020 18:28:42 +0800 Niu Xilei wrote: > +/* Kernel not implement __int128's divide and modulo operator. Implement these > + * operation use shift-subtract division algorithm adpater from > + * https://chromium.googlesource.com/chromium/src/third_party/+/master/abseil-cpp/absl/numeric/int128.cc */ Some rewording of this comment is necessary to fix the English grammar. And Linux style is not to put comment closing on same line. Something like: /* The Linux kernel does not implement 128 bit divide and modulus operations. * Implement these operations using shift-subtract division algorithm * from Chrome. * https://chromium.googlesource.com/chromium/src/third_party/+/master/abseil-cpp/absl/numeric/int128.cc */ Also, the int128 code you referenced is Apache licensed (not GPL-v2 like kernel). For div128_u128 the function should be static to avoid name conflicts. The declarations need to be in reverse christmas tree order as well. It does seem a bit like overkill since doing source address over a 64 bit range should be more than enough for any test in this decade.