/* * Copyright (c) 2014, The Linux Foundation. All rights reserved. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and * may be copied, distributed, and modified under those terms. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ #ifndef _DT_BINDINGS_CLK_APQ_GCC_8084_H #define _DT_BINDINGS_CLK_APQ_GCC_8084_H #define GPLL0 0 #define GPLL0_VOTE 1 #define GPLL1 2 #define GPLL1_VOTE 3 #define GPLL2 4 #define GPLL2_VOTE 5 #define GPLL3 6 #define GPLL3_VOTE 7 #define GPLL4 8 #define GPLL4_VOTE 9 #define CONFIG_NOC_CLK_SRC 10 #define PERIPH_NOC_CLK_SRC 11 #define SYSTEM_NOC_CLK_SRC 12 #define BLSP_UART_SIM_CLK_SRC 13 #define QDSS_TSCTR_CLK_SRC 14 #define UFS_AXI_CLK_SRC 15 #define RPM_CLK_SRC 16 #define KPSS_AHB_CLK_SRC 17 #define QDSS_AT_CLK_SRC 18 #define BIMC_DDR_CLK_SRC 19 #define USB30_MASTER_CLK_SRC 20 #define USB30_SEC_MASTER_CLK_SRC 21 #define USB_HSIC_AHB_CLK_SRC 22 #define MMSS_BIMC_GFX_CLK_SRC 23 #define QDSS_STM_CLK_SRC 24 #define ACC_CLK_SRC 25 #define SEC_CTRL_CLK_SRC 26 #define BLSP1_QUP1_I2C_APPS_CLK_SRC 27 #define BLSP1_QUP1_SPI_APPS_CLK_SRC 28 #define BLSP1_QUP2_I2C_APPS_CLK_SRC 29 #define BLSP1_QUP2_SPI_APPS_CLK_SRC 30 #define BLSP1_QUP3_I2C_APPS_CLK_SRC 31 #define BLSP1_QUP3_SPI_APPS_CLK_SRC 32 #define BLSP1_QUP4_I2C_APPS_CLK_SRC 33 #define BLSP1_QUP4_SPI_APPS_CLK_SRC 34 #define BLSP1_QUP5_I2C_APPS_CLK_SRC 35 #define BLSP1_QUP5_SPI_APPS_CLK_SRC 36 #define BLSP1_QUP6_I2C_APPS_CLK_SRC 37 #define BLSP1_QUP6_SPI_APPS_CLK_SRC 38 #define BLSP1_UART1_APPS_CLK_SRC 39 #define BLSP1_UART2_APPS_CLK_SRC 40 #define BLSP1_UART3_APPS_CLK_SRC 41 #define BLSP1_UART4_APPS_CLK_SRC 42 #define BLSP1_UART5_APPS_CLK_SRC 43 #define BLSP1_UART6_APPS_CLK_SRC 44 #define BLSP2_QUP1_I2C_APPS_CLK_SRC 45 #define BLSP2_QUP1_SPI_APPS_CLK_SRC 46 #define BLSP2_QUP2_I2C_APPS_CLK_SRC 47 #define BLSP2_QUP2_SPI_APPS_CLK_SRC 48 #define BLSP2_QUP3_I2C_APPS_CLK_SRC 49 #define BLSP2_QUP3_SPI_APPS_CLK_SRC 50 #define BLSP2_QUP4_I2C_APPS_CLK_SRC 51 #define BLSP2_QUP4_SPI_APPS_CLK_SRC 52 #define BLSP2_QUP5_I2C_APPS_CLK_SRC 53 #define BLSP2_QUP5_SPI_APPS_CLK_SRC 54 #define BLSP2_QUP6_I2C_APPS_CLK_SRC 55 #define BLSP2_QUP6_SPI_APPS_CLK_SRC 56 #define BLSP2_UART1_APPS_CLK_SRC 57 #define BLSP2_UART2_APPS_CLK_SRC 58 #define BLSP2_UART3_APPS_CLK_SRC 59 #define BLSP2_UART4_APPS_CLK_SRC 60 #define BLSP2_UART5_APPS_CLK_SRC 61 #define BLSP2_UART6_APPS_CLK_SRC 62 #define CE1_CLK_SRC 63 #define CE2_CLK_SRC 64 #define CE3_CLK_SRC 65 #define GP1_CLK_SRC 66 #define GP2_CLK_SRC 67 #define GP3_CLK_SRC 68 #define PDM2_CLK_SRC 69 #define QDSS_TRACECLKIN_CLK_SRC 70 #define RBCPR_CLK_SRC 71 #define SATA_ASIC0_CLK_SRC 72 #define SATA_PMALIVE_CLK_SRC 73 #define SATA_RX_CLK_SRC 74 #define SATA_RX_OOB_CLK_SRC 75 #define SDCC1_APPS_CLK_SRC 76 #define SDCC2_APPS_CLK_SRC 77 #define SDCC3_APPS_CLK_SRC 78 #define SDCC4_APPS_CLK_SRC 79 #define GCC_SNOC_BUS_TIMEOUT0_AHB_CLK 80 #define SPMI_AHB_CLK_SRC 81 #define SPMI_SER_CLK_SRC 82 #define TSIF_REF_CLK_SRC 83 #define USB30_MOCK_UTMI_CLK_SRC 84 #define USB30_SEC_MOCK_UTMI_CLK_SRC 85 #define USB_HS_SYSTEM_CLK_SRC 86 #define USB_HSIC_CLK_SRC 87 #define USB_HSIC_IO_CAL_CLK_SRC 88 #define USB_HSIC_MOCK_UTMI_CLK_SRC 89 #define USB_HSIC_SYSTEM_CLK_SRC 90 #define GCC_BAM_DMA_AHB_CLK 91 #define GCC_BAM_DMA_INACTIVITY_TIMERS_CLK 92 #define DDR_CLK_SRC 93 #define GCC_BIMC_CFG_AHB_CLK 94 #define GCC_BIMC_CLK 95 #define GCC_BIMC_KPSS_AXI_CLK 96 #define GCC_BIMC_SLEEP_CLK 97 #define GCC_BIMC_SYSNOC_AXI_CLK 98 #define GCC_BIMC_XO_CLK 99 #define GCC_BLSP1_AHB_CLK 100 #define GCC_BLSP1_SLEEP_CLK 101 #define GCC_BLSP1_QUP1_I2C_APPS_CLK 102 #define GCC_BLSP1_QUP1_SPI_APPS_CLK 103 #define GCC_BLSP1_QUP2_I2C_APPS_CLK 104 #define GCC_BLSP1_QUP2_SPI_APPS_CLK 105 #define GCC_BLSP1_QUP3_I2C_APPS_CLK 106 #define GCC_BLSP1_QUP3_SPI_APPS_CLK 107 #define GCC_BLSP1_QUP4_I2C_APPS_CLK 108 #define GCC_BLSP1_QUP4_SPI_APPS_CLK 109 #define GCC_BLSP1_QUP5_I2C_APPS_CLK 110 #define GCC_BLSP1_QUP5_SPI_APPS_CLK 111 #define GCC_BLSP1_QUP6_I2C_APPS_CLK 112 #define GCC_BLSP1_QUP6_SPI_APPS_CLK 113 #define GCC_BLSP1_UART1_APPS_CLK 114 #define GCC_BLSP1_UART1_SIM_CLK 115 #define GCC_BLSP1_UART2_APPS_CLK 116 #define GCC_BLSP1_UART2_SIM_CLK 117 #define GCC_BLSP1_UART3_APPS_CLK 118 #define GCC_BLSP1_UART3_SIM_CLK 119 #define GCC_BLSP1_UART4_APPS_CLK 120 #define GCC_BLSP1_UART4_SIM_CLK 121 #define GCC_BLSP1_UART5_APPS_CLK 122 #define GCC_BLSP1_UART5_SIM_CLK 123 #define GCC_BLSP1_UART6_APPS_CLK 124 #define GCC_BLSP1_UART6_SIM_CLK 125 #define GCC_BLSP2_AHB_CLK 126 #define GCC_BLSP2_SLEEP_CLK 127 #define GCC_BLSP2_QUP1_I2C_APPS_CLK 128 #define GCC_BLSP2_QUP1_SPI_APPS_CLK 129 #define GCC_BLSP2_QUP2_I2C_APPS_CLK 130 #define GCC_BLSP2_QUP2_SPI_APPS_CLK 131 #define GCC_BLSP2_QUP3_I2C_APPS_CLK 132 #define GCC_BLSP2_QUP3_SPI_APPS_CLK 133 #define GCC_BLSP2_QUP4_I2C_APPS_CLK 134 #define GCC_BLSP2_QUP4_SPI_APPS_CLK 135 #define GCC_BLSP2_QUP5_I2C_APPS_CLK 136 #define GCC_BLSP2_QUP5_SPI_APPS_CLK 137 #define GCC_BLSP2_QUP6_I2C_APPS_CLK 138 #define GCC_BLSP2_QUP6_SPI_APPS_CLK 139 #define GCC_BLSP2_UART1_APPS_CLK 140 #define GCC_BLSP2_UART1_SIM_CLK 141 #define GCC_BLSP2_UART2_APPS_CLK 142 #define GCC_BLSP2_UART2_SIM_CLK 143 #define GCC_BLSP2_UART3_APPS_CLK 144 #define GCC_BLSP2_UART3_SIM_CLK 145 #define GCC_BLSP2_UART4_APPS_CLK 146 #define GCC_BLSP2_UART4_SIM_CLK 147 #define GCC_BLSP2_UART5_APPS_CLK 148 #define GCC_BLSP2_UART5_SIM_CLK 149 #define GCC_BLSP2_UART6_APPS_CLK 150 #define GCC_BLSP2_UART6_SIM_CLK 151 #define GCC_BOOT_ROM_AHB_CLK 152 #define GCC_CE1_AHB_CLK 153 #define GCC_CE1_AXI_CLK 154 #define GCC_CE1_CLK 155 #define GCC_CE2_AHB_CLK 156 #define GCC_CE2_AXI_CLK 157 #define GCC_CE2_CLK 158 #define GCC_CE3_AHB_CLK 159 #define GCC_CE3_AXI_CLK 160 #define GCC_CE3_CLK 161 #define GCC_CNOC_BUS_TIMEOUT0_AHB_CLK 162 #define GCC_CNOC_BUS_TIMEOUT1_AHB_CLK 163 #define GCC_CNOC_BUS_TIMEOUT2_AHB_CLK 164 #define GCC_CNOC_BUS_TIMEOUT3_AHB_CLK 165 #define GCC_CNOC_BUS_TIMEOUT4_AHB_CLK 166 #define GCC_CNOC_BUS_TIMEOUT5_AHB_CLK 167 #define GCC_CNOC_BUS_TIMEOUT6_AHB_CLK 168 #define GCC_CNOC_BUS_TIMEOUT7_AHB_CLK 169 #define GCC_CFG_NOC_AHB_CLK 170 #define GCC_CFG_NOC_DDR_CFG_CLK 171 #define GCC_CFG_NOC_RPM_AHB_CLK 172 #define GCC_COPSS_SMMU_AHB_CLK 173 #define GCC_COPSS_SMMU_AXI_CLK 174 #define GCC_DCD_XO_CLK 175 #define GCC_BIMC_DDR_CH0_CLK 176 #define GCC_BIMC_DDR_CH1_CLK 177 #define GCC_BIMC_DDR_CPLL0_CLK 178 #define GCC_BIMC_DDR_CPLL1_CLK 179 #define GCC_BIMC_GFX_CLK 180 #define GCC_DDR_DIM_CFG_CLK 181 #define GCC_DDR_DIM_SLEEP_CLK 182 #define GCC_DEHR_CLK 183 #define GCC_AHB_CLK 184 #define GCC_IM_SLEEP_CLK 185 #define GCC_XO_CLK 186 #define GCC_XO_DIV4_CLK 187 #define GCC_GP1_CLK 188 #define GCC_GP2_CLK 189 #define GCC_GP3_CLK 190 #define GCC_IMEM_AXI_CLK 191 #define GCC_IMEM_CFG_AHB_CLK 192 #define GCC_KPSS_AHB_CLK 193 #define GCC_KPSS_AXI_CLK 194 #define GCC_LPASS_MPORT_AXI_CLK 195 #define GCC_LPASS_Q6_AXI_CLK 196 #define GCC_LPASS_SWAY_CLK 197 #define GCC_MMSS_BIMC_GFX_CLK 198 #define GCC_MMSS_NOC_AT_CLK 199 #define GCC_MMSS_NOC_CFG_AHB_CLK 200 #define GCC_MMSS_VPU_MAPLE_SYS_NOC_AXI_CLK 201 #define GCC_OCMEM_NOC_CFG_AHB_CLK 202 #define GCC_OCMEM_SYS_NOC_AXI_CLK 203 #define GCC_MPM_AHB_CLK 204 #define GCC_MSG_RAM_AHB_CLK 205 #define GCC_NOC_CONF_XPU_AHB_CLK 206 #define GCC_PDM2_CLK 207 #define GCC_PDM_AHB_CLK 208 #define GCC_PDM_XO4_CLK 209 #define GCC_PERIPH_NOC_AHB_CLK 210 #define GCC_PERIPH_NOC_AT_CLK 211 #define GCC_PERIPH_NOC_CFG_AHB_CLK 212 #define GCC_PERIPH_NOC_USB_HSIC_AHB_CLK 213 #define GCC_PERIPH_NOC_MPU_CFG_AHB_CLK 214 #define GCC_PERIPH_XPU_AHB_CLK 215 #define GCC_PNOC_BUS_TIMEOUT0_AHB_CLK 216 #define GCC_PNOC_BUS_TIMEOUT1_AHB_CLK 217 #define GCC_PNOC_BUS_TIMEOUT2_AHB_CLK 218 #define GCC_PNOC_BUS_TIMEOUT3_AHB_CLK 219 #define GCC_PNOC_BUS_TIMEOUT4_AHB_CLK 220 #define GCC_PRNG_AHB_CLK 221 #define GCC_QDSS_AT_CLK 222 #define GCC_QDSS_CFG_AHB_CLK 223 #define GCC_QDSS_DAP_AHB_CLK 224 #define GCC_QDSS_DAP_CLK 225 #define GCC_QDSS_ETR_USB_CLK 226 #define GCC_QDSS_STM_CLK 227 #define GCC_QDSS_TRACECLKIN_CLK 228 #define GCC_QDSS_TSCTR_DIV16_CLK 229 #define GCC_QDSS_TSCTR_DIV2_CLK 230 #define GCC_QDSS_TSCTR_DIV3_CLK 231 #define GCC_QDSS_TSCTR_DIV4_CLK 232 #define GCC_QDSS_TSCTR_DIV8_CLK 233 #define GCC_QDSS_RBCPR_XPU_AHB_CLK 234 #define GCC_RBCPR_AHB_CLK 235 #define GCC_RBCPR_CLK 236 #define GCC_RPM_BUS_AHB_CLK 237 #define GCC_RPM_PROC_HCLK 238 #define GCC_RPM_SLEEP_CLK 239 #define GCC_RPM_TIMER_CLK 240 #define GCC_SATA_ASIC0_CLK 241 #define GCC_SATA_AXI_CLK 242 #define GCC_SATA_CFG_AHB_CLK 243 #define GCC_SATA_PMALIVE_CLK 244 #define GCC_SATA_RX_CLK 245 #define GCC_SATA_RX_OOB_CLK 246 #define GCC_SDCC1_AHB_CLK 247 #define GCC_SDCC1_APPS_CLK 248 #define GCC_SDCC1_CDCCAL_FF_CLK 249 #define GCC_SDCC1_CDCCAL_SLEEP_CLK 250 #define GCC_SDCC2_AHB_CLK 251 #define GCC_SDCC2_APPS_CLK 252 #define GCC_SDCC2_INACTIVITY_TIMERS_CLK 253 #define GCC_SDCC3_AHB_CLK 254 #define GCC_SDCC3_APPS_CLK 255 #define GCC_SDCC3_INACTIVITY_TIMERS_CLK 256 #define GCC_SDCC4_AHB_CLK 257 #define GCC_SDCC4_APPS_CLK 258 #define GCC_SDCC4_INACTIVITY_TIMERS_CLK 259 #define GCC_SEC_CTRL_ACC_CLK 260 #define GCC_SEC_CTRL_AHB_CLK 261 #define GCC_SEC_CTRL_BOOT_ROM_PATCH_CLK 262 #define GCC_SEC_CTRL_CLK 263 #define GCC_SEC_CTRL_SENSE_CLK 264 #define GCC_SNOC_BUS_TIMEOUT2_AHB_CLK 265 #define GCC_SNOC_BUS_TIMEOUT3_AHB_CLK 266 #define GCC_SPDM_BIMC_CY_CLK 267 #define GCC_SPDM_CFG_AHB_CLK 268 #define GCC_SPDM_DEBUG_CY_CLK 269 #define GCC_SPDM_FF_CLK 270 #define GCC_SPDM_MSTR_AHB_CLK 271 #define GCC_SPDM_PNOC_CY_CLK 272 #define GCC_SPDM_RPM_CY_CLK 273 #define GCC_SPDM_SNOC_CY_CLK 274 #define GCC_SPMI_AHB_CLK 275 #define GCC_SPMI_CNOC_AHB_CLK 276 #define GCC_SPMI_SER_CLK 277 #define GCC_SPSS_AHB_CLK 278 #define GCC_SNOC_CNOC_AHB_CLK 279 #define GCC_SNOC_PNOC_AHB_CLK 280 #define GCC_SYS_NOC_AT_CLK 281 #define GCC_SYS_NOC_AXI_CLK 282 #define GCC_SYS_NOC_KPSS_AHB_CLK 283 #define GCC_SYS_NOC_QDSS_STM_AXI_CLK 284 #define GCC_SYS_NOC_UFS_AXI_CLK 285 #define GCC_SYS_NOC_USB3_AXI_CLK 286 #define GCC_SYS_NOC_USB3_SEC_AXI_CLK 287 #define GCC_TCSR_AHB_CLK 288 #define GCC_TLMM_AHB_CLK 289 #define GCC_TLMM_CLK 290 #define GCC_TSIF_AHB_CLK 291 #define GCC_TSIF_INACTIVITY_TIMERS_CLK 292 #define GCC_TSIF_REF_CLK 293 #define GCC_UFS_AHB_CLK 294 #define GCC_UFS_AXI_CLK 295 #define GCC_UFS_RX_CFG_CLK 296 #define GCC_UFS_RX_SYMBOL_0_CLK 297 #define GCC_UFS_RX_SYMBOL_1_CLK 298 #define GCC_UFS_TX_CFG_CLK 299 #define GCC_UFS_TX_SYMBOL_0_CLK 300 #define GCC_UFS_TX_SYMBOL_1_CLK 301 #define GCC_USB2A_PHY_SLEEP_CLK 302 #define GCC_USB2B_PHY_SLEEP_CLK 303 #define GCC_USB30_MASTER_CLK 304 #define GCC_USB30_MOCK_UTMI_CLK 305 #define GCC_USB30_SLEEP_CLK 306 #define GCC_USB30_SEC_MASTER_CLK 307 #define GCC_USB30_SEC_MOCK_UTMI_CLK 308 #define GCC_USB30_SEC_SLEEP_CLK 309 #define GCC_USB_HS_AHB_CLK 310 #define GCC_USB_HS_INACTIVITY_TIMERS_CLK 311 #define GCC_USB_HS_SYSTEM_CLK 312 #define GCC_USB_HSIC_AHB_CLK 313 #define GCC_USB_HSIC_CLK 314 #define GCC_USB_HSIC_IO_CAL_CLK 315 #define GCC_USB_HSIC_IO_CAL_SLEEP_CLK 316 #define GCC_USB_HSIC_MOCK_UTMI_CLK 317 #define GCC_USB_HSIC_SYSTEM_CLK 318 #define PCIE_0_AUX_CLK_SRC 319 #define PCIE_0_PIPE_CLK_SRC 320 #define PCIE_1_AUX_CLK_SRC 321 #define PCIE_1_PIPE_CLK_SRC 322 #define GCC_PCIE_0_AUX_CLK 323 #define GCC_PCIE_0_CFG_AHB_CLK 324 #define GCC_PCIE_0_MSTR_AXI_CLK 325 #define GCC_PCIE_0_PIPE_CLK 326 #define GCC_PCIE_0_SLV_AXI_CLK 327 #define GCC_PCIE_1_AUX_CLK 328 #define GCC_PCIE_1_CFG_AHB_CLK 329 #define GCC_PCIE_1_MSTR_AXI_CLK 330 #define GCC_PCIE_1_PIPE_CLK 331 #define GCC_PCIE_1_SLV_AXI_CLK 332 /* gdscs */ #define USB_HS_HSIC_GDSC 0 #define PCIE0_GDSC 1 #define PCIE1_GDSC 2 #define USB30_GDSC 3 #endif ref medium 2001:db8:2::/120 dev eth2 proto kernel metric 256 pref medium 2001:db8:200::/120 via 2001:db8:1::2 dev eth1 metric 1024 pref medium 2001:db8:200::/120 via 2001:db8:2::2 dev eth2 metric 1024 pref medium ... $ ip -6 ro del vrf red 2001:db8:200::/120 $ ip -6 ro ls vrf red 2001:db8:1::/120 dev eth1 proto kernel metric 256 pref medium 2001:db8:2::/120 dev eth2 proto kernel metric 256 pref medium ... Because IPv6 allows individual nexthops to be deleted without deleting the entire route, the ip6_route_multipath_del and non-multipath code path (ip6_route_del) have to be discriminated so that all nexthops are only deleted for the latter case. This is done by making the existing fc_type in fib6_config a u16 and then adding a new u16 field with fc_delete_all_nh as the first bit. Suggested-by: Dinesh Dutt <ddutt@cumulusnetworks.com> Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net> 2017-02-03net: remove support for per driver ndo_busy_poll()Eric Dumazet2-5/+0 We added generic support for busy polling in NAPI layer in linux-4.5 No network driver uses ndo_busy_poll() anymore, we can get rid of the pointer in struct net_device_ops, and its use in sk_busy_loop() Saves NETIF_F_BUSY_POLL features bit. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> 2017-02-03Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-nextDavid S. Miller11-40/+60 Pablo Neira Ayuso says: ==================== Netfilter updates for net-next The following patchset contains Netfilter updates for your net-next tree, they are: 1) Stash ctinfo 3-bit field into pointer to nf_conntrack object from sk_buff so we only access one single cacheline in the conntrack hotpath. Patchset from Florian Westphal. 2) Don't leak pointer to internal structures when exporting x_tables ruleset back to userspace, from Willem DeBruijn. This includes new helper functions to copy data to userspace such as xt_data_to_user() as well as conversions of our ip_tables, ip6_tables and arp_tables clients to use it. Not surprinsingly, ebtables requires an ad-hoc update. There is also a new field in x_tables extensions to indicate the amount of bytes that we copy to userspace. 3) Add nf_log_all_netns sysctl: This new knob allows you to enable logging via nf_log infrastructure for all existing netnamespaces. Given the effort to provide pernet syslog has been discontinued, let's provide a way to restore logging using netfilter kernel logging facilities in trusted environments. Patch from Michal Kubecek. 4) Validate SCTP checksum from conntrack helper, from Davide Caratti. 5) Merge UDPlite conntrack and NAT helpers into UDP, this was mostly a copy&paste from the original helper, from Florian Westphal. 6) Reset netfilter state when duplicating packets, also from Florian. 7) Remove unnecessary check for broadcast in IPv6 in pkttype match and nft_meta, from Liping Zhang. 8) Add missing code to deal with loopback packets from nft_meta when used by the netdev family, also from Liping. 9) Several cleanups on nf_tables, one to remove unnecessary check from the netlink control plane path to add table, set and stateful objects and code consolidation when unregister chain hooks, from Gao Feng. 10) Fix harmless reference counter underflow in IPVS that, however, results in problems with the introduction of the new refcount_t type, from David Windsor. 11) Enable LIBCRC32C from nf_ct_sctp instead of nf_nat_sctp, from Davide Caratti. 12) Missing documentation on nf_tables uapi header, from Liping Zhang. 13) Use rb_entry() helper in xt_connlimit, from Geliang Tang. ==================== Signed-off-by: David S. Miller <davem@davemloft.net> 2017-02-03sched: cls_flower: expose priority to offloading netdeviceJiri Pirko1-0/+1 The driver that offloads flower rules needs to know with which priority user inserted the rules. So add this information into offload struct. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> 2017-02-03lib: Introduce priority array area managerJiri Pirko1-0/+76 This introduces a infrastructure for management of linear priority areas. Priority order in an array matters, however order of items inside a priority group does not matter. As an initial implementation, L-sort algorithm is used. It is quite trivial. More advanced algorithm called P-sort will be introduced as a follow-up. The infrastructure is prepared for other algos. Alongside this, a testing module is introduced as well. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> 2017-02-03list: introduce list_for_each_entry_from_reverse helperJiri Pirko1-0/+13 Similar to list_for_each_entry_continue and its reverse variant list_for_each_entry_continue_reverse, introduce reverse helper for list_for_each_entry_from. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> 2017-02-03trace: rename trace_print_hex_seq arg and add kdocDaniel Borkmann2-3/+3 Steven suggested to improve trace_print_hex_seq() a bit after commit 2acae0d5b0f7 ("trace: add variant without spacing in trace_print_hex_seq") in two ways: i) by adding a kdoc comment for the helper function itself and ii) by renaming 'spacing' argument into 'concatenate' to better denote that we don't add spaces between each hex bytes. Suggested-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net> 2017-02-03bridge: uapi: add per vlan tunnel infoRoopa Prabhu3-0/+13 New nested netlink attribute to associate tunnel info per vlan. This is used by bridge driver to send tunnel metadata to bridge ports in vlan tunnel mode. This patch also adds new per port flag IFLA_BRPORT_VLAN_TUNNEL to enable vlan tunnel mode. off by default. One example use for this is a vxlan bridging gateway or vtep which maps vlans to vn-segments (or vnis). User can configure per-vlan tunnel information which the bridge driver can use to bridge vlan into the corresponding vn-segment. Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net> 2017-02-03vxlan: support fdb and learning in COLLECT_METADATA modeRoopa Prabhu1-0/+1 Vxlan COLLECT_METADATA mode today solves the per-vni netdev scalability problem in l3 networks. It expects all forwarding information to be present in dst_metadata. This patch series enhances collect metadata mode to include the case where only vni is present in dst_metadata, and the vxlan driver can then use the rest of the forwarding information datbase to make forwarding decisions. There is no change to default COLLECT_METADATA behaviour. These changes only apply to COLLECT_METADATA when used with the bridging use-case with a special dst_metadata tunnel info flag (eg: where vxlan device is part of a bridge). For all this to work, the vxlan driver will need to now support a single fdb table hashed by mac + vni. This series essentially makes this happen. use-case and workflow: vxlan collect metadata device participates in bridging vlan to vn-segments. Bridge driver above the vxlan device, sends the vni corresponding to the vlan in the dst_metadata. vxlan driver will lookup forwarding database with (mac + vni) for the required remote destination information to forward the packet. Changes introduced by this patch: - allow learning and forwarding database state in vxlan netdev in COLLECT_METADATA mode. Current behaviour is not changed by default. tunnel info flag IP_TUNNEL_INFO_BRIDGE is used to support the new bridge friendly mode. - A single fdb table hashed by (mac, vni) to allow fdb entries with multiple vnis in the same fdb table - rx path already has the vni - tx path expects a vni in the packet with dst_metadata - prior to this series, fdb remote_dsts carried remote vni and the vxlan device carrying the fdb table represented the source vni. With the vxlan device now representing multiple vnis, this patch adds a src vni attribute to the fdb entry. The remote vni already uses NDA_VNI attribute. This patch introduces NDA_SRC_VNI netlink attribute to represent the src vni in a multi vni fdb table. iproute2 example (patched and pruned iproute2 output to just show relevant fdb entries): example shows same host mac learnt on two vni's. before (netdev per vni): $bridge fdb show | grep "00:02:00:00:00:03" 00:02:00:00:00:03 dev vxlan1001 dst 12.0.0.8 self 00:02:00:00:00:03 dev vxlan1000 dst 12.0.0.8 self after this patch with collect metadata in bridged mode (single netdev): $bridge fdb show | grep "00:02:00:00:00:03" 00:02:00:00:00:03 dev vxlan0 src_vni 1001 dst 12.0.0.8 self 00:02:00:00:00:03 dev vxlan0 src_vni 1000 dst 12.0.0.8 self Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net> 2017-02-03ip_tunnels: new IP_TUNNEL_INFO_BRIDGE flag for ip_tunnel_info modeRoopa Prabhu1-0/+1 New ip_tunnel_info flag to represent bridged tunnel metadata. Used by bridge driver later in the series to pass per vlan dst metadata to bridge ports. Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net> 2017-02-03net/sched: act_ife: Change to use ife moduleYotam Gigi2-10/+1 Use the encode/decode functionality from the ife module instead of using implementation inside the act_ife. Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Yotam Gigi <yotamg@mellanox.com> Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Roman Mashak <mrv@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net> 2017-02-03net: Introduce ife encapsulation moduleYotam Gigi3-0/+70 This module is responsible for the ife encapsulation protocol encode/decode logics. That module can: - ife_encode: encode skb and reserve space for the ife meta header - ife_decode: decode skb and extract the meta header size - ife_tlv_meta_encode - encodes one tlv entry into the reserved ife header space. - ife_tlv_meta_decode - decodes one tlv entry from the packet - ife_tlv_meta_next - advance to the next tlv Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Yotam Gigi <yotamg@mellanox.com> Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Roman Mashak <mrv@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net> 2017-02-03net/sched: act_ife: Unexport ife_tlv_meta_encodeYotam Gigi1-2/+0 As the function ife_tlv_meta_encode is not used by any other module, unexport it and make it static for the act_ife module. Signed-off-by: Yotam Gigi <yotamg@mellanox.com> Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Roman Mashak <mrv@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net> 2017-02-03tcp: add tcp_mss_clamp() helperEric Dumazet1-0/+9 Small cleanup factorizing code doing the TCP_MAXSEG clamping. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> 2017-02-02net: add LINUX_MIB_PFMEMALLOCDROP counterEric Dumazet1-0/+1 Debugging issues caused by pfmemalloc is often tedious. Add a new SNMP counter to more easily diagnose these problems. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Josef Bacik <jbacik@fb.com> Acked-by: Josef Bacik <jbacik@fb.com> Signed-off-by: David S. Miller <davem@davemloft.net> 2017-02-02net: phy: marvell: Add support for 88e1545 PHYAndrew Lunn1-0/+1 The 88e1545 PHYs are discrete Marvell PHYs, found in a quad package on the zii-devel-b board. Add support for it to the Marvell PHY driver. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> 2017-02-02unix: add ioctl to open a unix socket file with O_PATHAndrey Vagin1-0/+2 This ioctl opens a file to which a socket is bound and returns a file descriptor. The caller has to have CAP_NET_ADMIN in the socket network namespace. Currently it is impossible to get a path and a mount point for a socket file. socket_diag reports address, device ID and inode number for unix sockets. An address can contain a relative path or a file may be moved somewhere. And these properties say nothing about a mount namespace and a mount point of a socket file. With the introduced ioctl, we can get a path by reading /proc/self/fd/X and get mnt_id from /proc/self/fdinfo/X. In CRIU we are going to use this ioctl to dump and restore unix socket. Here is an example how it can be used: $ strace -e socket,bind,ioctl ./test /tmp/test_sock socket(AF_UNIX, SOCK_STREAM, 0) = 3 bind(3, {sa_family=AF_UNIX, sun_path="test_sock"}, 11) = 0 ioctl(3, SIOCUNIXFILE, 0) = 4 ^Z $ ss -a | grep test_sock u_str LISTEN 0 1 test_sock 17798 * 0 $ ls -l /proc/760/fd/{3,4} lrwx------ 1 root root 64 Feb 1 09:41 3 -> 'socket:[17798]' l--------- 1 root root 64 Feb 1 09:41 4 -> /tmp/test_sock $ cat /proc/760/fdinfo/4 pos: 0 flags: 012000000 mnt_id: 40 $ cat /proc/self/mountinfo | grep "^40\s" 40 19 0:37 / /tmp rw shared:23 - tmpfs tmpfs rw Signed-off-by: Andrei Vagin <avagin@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net> 2017-02-02net: phy: Marvell: Add mv88e6390 internal PHYAndrew Lunn1-0/+6 The mv88e6390 Ethernet switch has internal PHYs. These PHYs don't have an model ID in the ID2 register. So the MDIO driver in the switch intercepts reads to this register, and returns the switch family ID. Extend the Marvell PHY driver by including this ID, and treat the PHY as a 88E1540. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> 2017-02-02Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller9-30/+40 All merge conflicts were simple overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net> 2017-02-02netfilter: allow logging from non-init namespacesMichal Kubeček1-0/+3 Commit 69b34fb996b2 ("netfilter: xt_LOG: add net namespace support for xt_LOG") disabled logging packets using the LOG target from non-init namespaces. The motivation was to prevent containers from flooding kernel log of the host. The plan was to keep it that way until syslog namespace implementation allows containers to log in a safe way. However, the work on syslog namespace seems to have hit a dead end somewhere in 2013 and there are users who want to use xt_LOG in all network namespaces. This patch allows to do so by setting /proc/sys/net/netfilter/nf_log_all_netns to a nonzero value. This sysctl is only accessible from init_net so that one cannot switch the behaviour from inside a container. Signed-off-by: Michal Kubecek <mkubecek@suse.cz> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> 2017-02-02ipvs: free ip_vs_dest structs when refcnt=0David Windsor1-1/+1 Currently, the ip_vs_dest cache frees ip_vs_dest objects when their reference count becomes < 0. Aside from not being semantically sound, this is problematic for the new type refcount_t, which will be introduced shortly in a separate patch. refcount_t is the new kernel type for holding reference counts, and provides overflow protection and a constrained interface relative to atomic_t (the type currently being used for kernel reference counts). Per Julian Anastasov: "The problem is that dest_trash currently holds deleted dests (unlinked from RCU lists) with refcnt=0." Changing dest_trash to hold dest with refcnt=1 will allow us to free ip_vs_dest structs when their refcnt=0, in ip_vs_dest_put_and_free(). Signed-off-by: David Windsor <dwindsor@gmail.com> Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> 2017-02-02netfilter: merge ctinfo into nfct pointer storage areaFlorian Westphal2-17/+15 After this change conntrack operations (lookup, creation, matching from ruleset) only access one instead of two sk_buff cache lines. This works for normal conntracks because those are allocated from a slab that guarantees hw cacheline or 8byte alignment (whatever is larger) so the 3 bits needed for ctinfo won't overlap with nf_conn addresses. Template allocation now does manual address alignment (see previous change) on arches that don't have sufficent kmalloc min alignment. Some spots intentionally use skb->_nfct instead of skb_nfct() helpers, this is to avoid undoing the skb_nfct() use when we remove untracked conntrack object in the future. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> 2017-02-02netfilter: guarantee 8 byte minalign for template addressesFlorian Westphal1-0/+2 The next change will merge skb->nfct pointer and skb->nfctinfo status bits into single skb->_nfct (unsigned long) area. For this to work nf_conn addresses must always be aligned at least on an 8 byte boundary since we will need the lower 3bits to store nfctinfo. Conntrack templates are allocated via kmalloc. kbuild test robot reported BUILD_BUG_ON failed: NFCT_INFOMASK >= ARCH_KMALLOC_MINALIGN on v1 of this patchset, so not all platforms meet this requirement. Do manual alignment if needed, the alignment offset is stored in the nf_conn entry protocol area. This works because templates are not handed off to L4 protocol trackers. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> 2017-02-02netfilter: add and use nf_ct_set helperFlorian Westphal2-2/+9 Add a helper to assign a nf_conn entry and the ctinfo bits to an sk_buff. This avoids changing code in followup patch that merges skb->nfct and skb->nfctinfo into skb->_nfct. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> 2017-02-02skbuff: add and use skb_nfct helperFlorian Westphal2-4/+11 Followup patch renames skb->nfct and changes its type so add a helper to avoid intrusive rename change later. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> 2017-02-02netfilter: reduce direct skb->nfct usageFlorian Westphal1-3/+6 Next patch makes direct skb->nfct access illegal, reduce noise in next patch by using accessors we already have. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> 2017-02-02netfilter: conntrack: no need to pass ctinfo to error handlerFlorian Westphal1-1/+1 It is never accessed for reading and the only places that write to it are the icmp(6) handlers, which also set skb->nfct (and skb->nfctinfo). The conntrack core specifically checks for attached skb->nfct after ->error() invocation and returns early in this case. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>