From patchwork Mon May 20 13:53:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 164642 Delivered-To: patch@linaro.org Received: by 2002:ac9:2a84:0:0:0:0:0 with SMTP id p4csp281231oca; Mon, 20 May 2019 06:54:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqwECaMOM1SNAnZ39RhIBPGetadkiNLn46IjmojQR1Wc8EvdxwZ+EeN9lXPhC/TqrFJPHD8W X-Received: by 2002:a17:902:8ec4:: with SMTP id x4mr65759102plo.249.1558360443390; Mon, 20 May 2019 06:54:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558360443; cv=none; d=google.com; s=arc-20160816; b=PGhP0xNgBeKklm6o7seRfGK/efCVc7FSAmUOSHhf95DfcFMAxAiX9bj4h3Mz6HQ3Jf tniSHBbIU1Ix6MtUrWO+T0Y7HUwOpJKTFKjURAHFKoQn5/hqSdmLNMotCwv7pAb0hj8k CsIO4MNZDaUnEUq0vO1ZHG2moVQrlvhccQrNK0QGYNwMQwX26LFvYF7RPqyLbkKmzeGa 41GNi+8QLAdT+p+TD86k1YAHaXM6C5PNm04fMBgWnYyV4eJWQb2h6ft7/s52uB9SQOii 3g6AhFWxYSiJenZt+OhyCDoy4AXsZv1JMLBKstarZmFNPQe0FLQ7lMiGZ9saDghplbEn VngA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=PNcQkl0sbDGXxnYuX4gXEpMWKK3coY11enMS7zPLh3A=; b=YuzbWsslGLpX5Wuc18Stn4E2Ei1ZCxTlMVENki87fG0OBDv7wcejHb8ghQYPqLjEdB nINV4FRQ94Ce4MPU+UOQ9H+3e4nzS7zxncpYdR1VZTHalUsAMLdhrlncqVPXTf9lARfh NBN7daLKcIuJyFt+0UxJIgLsfeonta40RDcsE8REzw1vJWdhlI2o/UTMqs8isgj2USE0 j3tIl7f+kruaC6DIFovzu7CCb1qTY/C9T9zKcea0W4pnYCtlw4EIsOyaJ+vmjA3upok4 bXV7qCp0Z0Aea7kNsRslD6+dL3ln4KkaZ43X/lbFm4mRK+aVPNukhJ7I4B6NsN5NUmaq PaXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=R5wW8lMc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j1si1105703pfn.53.2019.05.20.06.54.03; Mon, 20 May 2019 06:54:03 -0700 (PDT) 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=@linaro.org header.s=google header.b=R5wW8lMc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732331AbfETNyC (ORCPT + 30 others); Mon, 20 May 2019 09:54:02 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:44790 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730740AbfETNyB (ORCPT ); Mon, 20 May 2019 09:54:01 -0400 Received: by mail-io1-f65.google.com with SMTP id f22so11032857iol.11 for ; Mon, 20 May 2019 06:54:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PNcQkl0sbDGXxnYuX4gXEpMWKK3coY11enMS7zPLh3A=; b=R5wW8lMc1iy8WX5sYIP1b1h0H4/nA/j52JRPwd4H4/d96WL7tLLiJArjqoRqRX9OPB FSg6TjfoAJXORsyizA3JhqGza/b2CTsNAAcuwuVQFl4C4mhXyIEo3mVGb8ZkEIVUNVDh L40iihL4Q3zEayB7IeYK6/ANJogh5XRzFdpYCWnBjn30ZDh/PMc1opt203xC/d2kr+Xg +hJKwYigYLilykiT/0P2KR03lJ0mR2+W3r/w/VuUYu39KYpJ5BvxsicRHefYns1DleK/ FDLseKCMrYlnYZTVbqG+qY/WnjOAa1e9JgUfjK8safuRTCLVD0JF1XGvZsQ/xfYomin2 yiEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PNcQkl0sbDGXxnYuX4gXEpMWKK3coY11enMS7zPLh3A=; b=j3RF/kVLmXX79WAd940iMPnFsqy0nfcolOwKYAszt0vL968JFRD2w8qpAESAAyx9/S IWDFU3PBtFIL5IMVpdiPYTIwTu270L8GVdZwqhW8N1kCK07szB6s08aUgnXMBrHOuYQw HLnoCV88GsLJaQwCug5PyiUc6NQQCSOZAykkK7jYIuj/I1odWBzYuWuFxdVsMQl7ENvr NFNr4SSC1s286QaebhjGBxOGQhzNPlRe6Gs9nQ8uiBQPNe4iafDSMcFppUX3o5BYosWu PRTayIwznOup7vVld8EtNt7Z10WA0JdAw6zFNreFoeDFTS2Rx12Yt7bkDKaCQuwMjWAV CN9A== X-Gm-Message-State: APjAAAW0fnaYFN1pb7HVjhUCcw1Jjr4bfyu8w7SViviGej2O0+KOOb1E 2vRdELLUjrXVT4/qsKrB5sBfbQ== X-Received: by 2002:a5d:9d07:: with SMTP id j7mr24786480ioj.39.1558360440641; Mon, 20 May 2019 06:54:00 -0700 (PDT) Received: from localhost.localdomain (c-71-195-29-92.hsd1.mn.comcast.net. [71.195.29.92]) by smtp.gmail.com with ESMTPSA id n17sm6581185ioa.0.2019.05.20.06.53.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 May 2019 06:53:59 -0700 (PDT) From: Alex Elder To: arnd@arndb.de, subashab@codeaurora.org, david.brown@linaro.org, agross@kernel.org, davem@davemloft.net Cc: bjorn.andersson@linaro.org, ilias.apalodimas@linaro.org, cpratapa@codeaurora.org, syadagir@codeaurora.org, evgreen@chromium.org, benchan@google.com, ejcaruso@google.com, netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/8] net: introduce "include/linux/if_rmnet.h" Date: Mon, 20 May 2019 08:53:46 -0500 Message-Id: <20190520135354.18628-1-elder@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The main objective of this series was originally to define a single public header file containing a few structure definitions that are currently defined privately for the Qualcomm "rmnet" driver. In review, Arnd Bergmann said that before making them public, the structures should avoid using C bit-fields in their definitions. To facilitate implementing that suggestion I rearranged some other code, including eliminating some accessor macros that I believe reduce rather than improve the clarity of the code that uses them. I also discovered a bug (concievably due to non-portable behavior) in the way one of the structures is defined, so I fixed that. And finally I ensured all of the fields in these structures were defined with proper annotation of their big endianness. A form of the code in this series was present in this patch: https://lore.kernel.org/lkml/20190512012508.10608-3-elder@linaro.org/ This series is available here, based on kernel v5.2-rc1: remote: https://git.linaro.org/people/elder/linux.git branch: ipa-rmnet-v1_kernel-5.2-rc1 acbcb18302a net: introduce "include/linux/if_rmnet.h" -Alex Alex Elder (8): net: qualcomm: rmnet: fix struct rmnet_map_header net: qualcomm: rmnet: kill RMNET_MAP_GET_*() accessor macros net: qualcomm: rmnet: use field masks instead of C bit-fields net: qualcomm: rmnet: don't use C bit-fields in rmnet checksum header net: qualcomm: rmnet: don't use C bit-fields in rmnet checksum trailer net: qualcomm: rmnet: get rid of a variable in rmnet_map_ipv4_ul_csum_header() net: qualcomm: rmnet: mark endianness of struct rmnet_map_dl_csum_trailer fields net: introduce "include/linux/if_rmnet.h" .../ethernet/qualcomm/rmnet/rmnet_handlers.c | 11 ++-- .../net/ethernet/qualcomm/rmnet/rmnet_map.h | 36 ---------- .../qualcomm/rmnet/rmnet_map_command.c | 12 +++- .../ethernet/qualcomm/rmnet/rmnet_map_data.c | 65 +++++++++---------- .../net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 1 + include/linux/if_rmnet.h | 45 +++++++++++++ 6 files changed, 91 insertions(+), 79 deletions(-) create mode 100644 include/linux/if_rmnet.h -- 2.20.1 Reviewed-by: Bjorn Andersson Reviewed-by: Bjorn Andersson