br 337 arch/arm64/include/asm/insn.h __AARCH64_INSN_FUNCS(br, 0xFFFFFC1F, 0xD61F0000) br 52 arch/arm64/include/asm/module.h __le32 br; /* br x16 */ br 67 arch/arm64/include/asm/module.h return e->adrp || e->add || e->br; br 27 arch/arm64/kernel/module-plts.c static u32 br; br 29 arch/arm64/kernel/module-plts.c if (!br) br 30 arch/arm64/kernel/module-plts.c br = aarch64_insn_gen_branch_reg(AARCH64_INSN_REG_16, br 34 arch/arm64/kernel/module-plts.c plt.br = cpu_to_le32(br); br 49 arch/arm64/kernel/module-plts.c if (a->add != b->add || a->br != b->br) br 110 arch/arm64/kernel/module-plts.c u32 br; br 123 arch/arm64/kernel/module-plts.c br = aarch64_insn_gen_branch_imm((u64)&plt[i].br, (u64)loc + 4, br 127 arch/arm64/kernel/module-plts.c plt[i].br = cpu_to_le32(br); br 39 arch/csky/abiv2/inc/abi/entry.h br 2f br 219 arch/csky/abiv2/inc/abi/entry.h br 2f br 96 arch/ia64/include/asm/asmmacro.h br.call.sptk.many b7=2f;; \ br 101 arch/ia64/include/asm/asmmacro.h br.ret.sptk.many b6;; \ br 104 arch/ia64/include/asm/asmmacro.h # define FSYS_RETURN br.ret.sptk.many b6 br 453 arch/ia64/include/asm/pal.h br : 1, /* Branch regs valid */ br 689 arch/ia64/include/asm/pal.h #define pmci_proc_branch_regs_valid pme_processor.br br 381 arch/ia64/include/asm/sal.h br : 1, br 389 arch/ia64/include/asm/sal.h u64 br[8]; br 866 arch/ia64/include/asm/sal.h u64 br[6]; /* br0: br 217 arch/ia64/include/uapi/asm/ptrace.h unsigned long br[8]; br 73 arch/ia64/kernel/entry.h br.cond.sptk.many save_switch_stack; \ br 81 arch/ia64/kernel/entry.h br.cond.sptk.many load_switch_stack; \ br 13 arch/ia64/kernel/minstate.h (pUStk) br.call.spnt rp=account_sys_enter \ br 218 arch/ia64/kernel/minstate.h [1:](pKStk) br.cond.sptk.many 1f; \ br 227 arch/ia64/kernel/minstate.h (p1) br.cond.sptk.many 1f; \ br 235 arch/ia64/kernel/minstate.h br.ret.sptk b0; \ br 912 arch/ia64/kernel/ptrace.c retval |= __put_user(pt->b0, &ppr->br[0]); br 919 arch/ia64/kernel/ptrace.c __put_user(val, &ppr->br[i]); br 924 arch/ia64/kernel/ptrace.c retval |= __put_user(pt->b6, &ppr->br[6]); br 925 arch/ia64/kernel/ptrace.c retval |= __put_user(pt->b7, &ppr->br[7]); br 1049 arch/ia64/kernel/ptrace.c retval |= __get_user(pt->b0, &ppr->br[0]); br 1054 arch/ia64/kernel/ptrace.c retval |= __get_user(val, &ppr->br[i]); br 1060 arch/ia64/kernel/ptrace.c retval |= __get_user(pt->b6, &ppr->br[6]); br 1061 arch/ia64/kernel/ptrace.c retval |= __get_user(pt->b7, &ppr->br[7]); br 183 arch/ia64/kernel/smpboot.c sal_boot_rendez_state[0].br[0] = sal_boot_rendez_state[cpuid].br[0]; br 399 arch/mips/alchemy/common/clock.c long tdv, tpr, pr, nr, br, bpr, diff, lastdiff; br 405 arch/mips/alchemy/common/clock.c br = -EINVAL; br 440 arch/mips/alchemy/common/clock.c br = nr; br 467 arch/mips/alchemy/common/clock.c br = nr; br 474 arch/mips/alchemy/common/clock.c if (br < 0) br 475 arch/mips/alchemy/common/clock.c return br; br 479 arch/mips/alchemy/common/clock.c req->rate = br; br 512 arch/mips/alchemy/common/usb.c static void au1000_usb_pm(unsigned long br, int creg, int susp) br 514 arch/mips/alchemy/common/usb.c void __iomem *base = (void __iomem *)KSEG1ADDR(br); br 33 arch/nios2/include/asm/entry.h br 2f br 42 arch/powerpc/include/asm/cmpxchg.h #define CMPXCHG_GEN(type, sfx, br, br2, cl) \ br 56 arch/powerpc/include/asm/cmpxchg.h br \ br 21 arch/powerpc/include/asm/fsl_lbc.h __be32 br; /**< Base Register */ br 135 arch/powerpc/platforms/85xx/p1022_ds.c static phys_addr_t lbc_br_to_phys(const void *ecm, unsigned int count, u32 br) br 142 arch/powerpc/platforms/85xx/p1022_ds.c return br & BR_BA; br 153 arch/powerpc/platforms/85xx/p1022_ds.c return (br & BR_BA) | ((lawbar & LAWBAR_MASK) << 12); br 233 arch/powerpc/platforms/85xx/p1022_ds.c br0 = in_be32(&lbc->bank[0].br); br 234 arch/powerpc/platforms/85xx/p1022_ds.c br1 = in_be32(&lbc->bank[1].br); br 252 arch/powerpc/platforms/85xx/p1022_ds.c out_be32(&lbc->bank[0].br, br0); br 258 arch/powerpc/platforms/85xx/p1022_ds.c out_be32(&lbc->bank[1].br, br1); br 74 arch/powerpc/sysdev/fsl_lbc.c u32 br = in_be32(&lbc->bank[i].br); br 77 arch/powerpc/sysdev/fsl_lbc.c if (br & BR_V && (br & or & BR_BA) == fsl_lbc_addr(addr_base)) br 97 arch/powerpc/sysdev/fsl_lbc.c u32 br; br 108 arch/powerpc/sysdev/fsl_lbc.c br = in_be32(&lbc->bank[bank].br); br 110 arch/powerpc/sysdev/fsl_lbc.c switch (br & BR_MSEL) { br 124 arch/powerpc/sysdev/fsl_lbc.c switch (br & BR_PS) { br 126 arch/s390/include/asm/nospec-insn.h 555: br \reg br 182 arch/s390/include/asm/nospec-insn.h br \reg br 102 arch/s390/kernel/nospec-branch.c u8 *instr, *thunk, *br; br 118 arch/s390/kernel/nospec-branch.c br = thunk + (*(int *)(thunk + 2)) * 2; br 124 arch/s390/kernel/nospec-branch.c br = thunk + (*(int *)(thunk + 2)) * 2; br 128 arch/s390/kernel/nospec-branch.c if ((br[0] & 0xbf) != 0x07 || (br[1] & 0xf0) != 0xf0) br 134 arch/s390/kernel/nospec-branch.c insnbuf[0] = br[0]; br 135 arch/s390/kernel/nospec-branch.c insnbuf[1] = (instr[1] & 0xf0) | (br[1] & 0x0f); br 136 arch/s390/kernel/nospec-branch.c if (br[0] == 0x47) { br 138 arch/s390/kernel/nospec-branch.c insnbuf[2] = br[2]; br 139 arch/s390/kernel/nospec-branch.c insnbuf[3] = br[3]; br 145 arch/s390/kernel/nospec-branch.c insnbuf[1] = (instr[1] & 0xf0) | (br[1] & 0x0f); br 146 arch/s390/kernel/nospec-branch.c if (br[0] == 0x47) { br 149 arch/s390/kernel/nospec-branch.c insnbuf[2] = br[2]; br 150 arch/s390/kernel/nospec-branch.c insnbuf[3] = br[3]; br 116 arch/xtensa/variants/csp/include/variant/tie.h XCHAL_SA_REG(s,0,0,0,1, br, 4, 4, 4,0x0204, sr,4 , 16,0,0,0) \ br 119 arch/xtensa/variants/test_kc705_be/include/variant/tie.h XCHAL_SA_REG(s,0,0,0,1, br, 4, 4, 4,0x0204, sr,4 , 16,0,0,0) \ br 123 arch/xtensa/variants/test_kc705_hifi/include/variant/tie.h XCHAL_SA_REG(s,0,0,0,1, br, 4, 4, 4,0x0204, sr,4 , 16,0,0,0) \ br 93 arch/xtensa/variants/test_mmuhifi_c3/include/variant/tie.h XCHAL_SA_REG(s,0,0,0,1, br, 4, 4, 4,0x0204, sr,4 , 16,0,0,0) \ br 748 drivers/acpi/acpi_video.c struct acpi_video_device_brightness *br = device->brightness; br 788 drivers/acpi/acpi_video.c ? br->levels[ACPI_VIDEO_FIRST_LEVEL + 1] br 801 drivers/acpi/acpi_video.c if (level < br->count) { br 802 drivers/acpi/acpi_video.c if (br->flags._BCL_reversed) br 803 drivers/acpi/acpi_video.c level = br->count - ACPI_VIDEO_FIRST_LEVEL - 1 - level; br 804 drivers/acpi/acpi_video.c if (br->levels[level + ACPI_VIDEO_FIRST_LEVEL] == test_level) br 805 drivers/acpi/acpi_video.c br->flags._BQC_use_index = 1; br 808 drivers/acpi/acpi_video.c if (!br->flags._BQC_use_index) br 822 drivers/acpi/acpi_video.c struct acpi_video_device_brightness *br = NULL; br 839 drivers/acpi/acpi_video.c br = kzalloc(sizeof(*br), GFP_KERNEL); br 840 drivers/acpi/acpi_video.c if (!br) { br 851 drivers/acpi/acpi_video.c br->levels = kmalloc_array(obj->package.count + ACPI_VIDEO_FIRST_LEVEL, br 852 drivers/acpi/acpi_video.c sizeof(*br->levels), br 854 drivers/acpi/acpi_video.c if (!br->levels) { br 868 drivers/acpi/acpi_video.c && br->levels[count - 1] == value) br 871 drivers/acpi/acpi_video.c br->levels[count] = value; br 873 drivers/acpi/acpi_video.c if (br->levels[count] > max_level) br 874 drivers/acpi/acpi_video.c max_level = br->levels[count]; br 885 drivers/acpi/acpi_video.c if (br->levels[i] == br->levels[ACPI_VIDEO_AC_LEVEL]) br 887 drivers/acpi/acpi_video.c if (br->levels[i] == br->levels[ACPI_VIDEO_BATTERY_LEVEL]) br 893 drivers/acpi/acpi_video.c br->flags._BCL_no_ac_battery_levels = 1; br 896 drivers/acpi/acpi_video.c br->levels[i] = br->levels[i - level_ac_battery]; br 902 drivers/acpi/acpi_video.c if (max_level == br->levels[ACPI_VIDEO_FIRST_LEVEL]) { br 903 drivers/acpi/acpi_video.c br->flags._BCL_reversed = 1; br 904 drivers/acpi/acpi_video.c sort(&br->levels[ACPI_VIDEO_FIRST_LEVEL], br 906 drivers/acpi/acpi_video.c sizeof(br->levels[ACPI_VIDEO_FIRST_LEVEL]), br 908 drivers/acpi/acpi_video.c } else if (max_level != br->levels[count - 1]) br 912 drivers/acpi/acpi_video.c br->count = count; br 913 drivers/acpi/acpi_video.c *dev_br = br; br 921 drivers/acpi/acpi_video.c kfree(br); br 941 drivers/acpi/acpi_video.c struct acpi_video_device_brightness *br = NULL; br 944 drivers/acpi/acpi_video.c result = acpi_video_get_levels(device->dev, &br, &max_level); br 947 drivers/acpi/acpi_video.c device->brightness = br; br 950 drivers/acpi/acpi_video.c br->curr = level = max_level; br 977 drivers/acpi/acpi_video.c for (i = ACPI_VIDEO_FIRST_LEVEL; i < br->count; i++) br 978 drivers/acpi/acpi_video.c if (level == br->levels[i]) br 980 drivers/acpi/acpi_video.c if (i == br->count || !level) br 990 drivers/acpi/acpi_video.c br->count - ACPI_VIDEO_FIRST_LEVEL)); br 994 drivers/acpi/acpi_video.c kfree(br->levels); br 995 drivers/acpi/acpi_video.c kfree(br); br 179 drivers/android/binder.c atomic_t br[_IOC_NR(BR_FAILED_REPLY) + 1]; br 4040 drivers/android/binder.c if (_IOC_NR(cmd) < ARRAY_SIZE(binder_stats.br)) { br 4041 drivers/android/binder.c atomic_inc(&binder_stats.br[_IOC_NR(cmd)]); br 4042 drivers/android/binder.c atomic_inc(&proc->stats.br[_IOC_NR(cmd)]); br 4043 drivers/android/binder.c atomic_inc(&thread->stats.br[_IOC_NR(cmd)]); br 5842 drivers/android/binder.c BUILD_BUG_ON(ARRAY_SIZE(stats->br) != br 5844 drivers/android/binder.c for (i = 0; i < ARRAY_SIZE(stats->br); i++) { br 5845 drivers/android/binder.c int temp = atomic_read(&stats->br[i]); br 576 drivers/atm/horizon.c const unsigned long br = test_bit(ultra, &dev->flags) ? BR_ULT : BR_HRZ; br 585 drivers/atm/horizon.c unsigned long br_man = br; br 588 drivers/atm/horizon.c PRINTD (DBG_QOS|DBG_FLOW, "make_rate b=%lu, c=%u, %s", br, c, br 609 drivers/atm/horizon.c pre = DIV_ROUND_UP(br, c<<div); br 615 drivers/atm/horizon.c pre = DIV_ROUND_CLOSEST(br, c<<div); br 621 drivers/atm/horizon.c pre = br/(c<<div); br 642 drivers/atm/horizon.c pre = DIV_ROUND_UP(br, c<<div); br 645 drivers/atm/horizon.c pre = DIV_ROUND_CLOSEST(br, c<<div); br 648 drivers/atm/horizon.c pre = br/(c<<div); br 672 drivers/atm/horizon.c *actual = DIV_ROUND_UP(br, pre<<div); br 16 drivers/clk/qcom/clk-branch.c static bool clk_branch_in_hwcg_mode(const struct clk_branch *br) br 20 drivers/clk/qcom/clk-branch.c if (!br->hwcg_reg) br 23 drivers/clk/qcom/clk-branch.c regmap_read(br->clkr.regmap, br->hwcg_reg, &val); br 25 drivers/clk/qcom/clk-branch.c return !!(val & BIT(br->hwcg_bit)); br 28 drivers/clk/qcom/clk-branch.c static bool clk_branch_check_halt(const struct clk_branch *br, bool enabling) br 30 drivers/clk/qcom/clk-branch.c bool invert = (br->halt_check == BRANCH_HALT_ENABLE); br 33 drivers/clk/qcom/clk-branch.c regmap_read(br->clkr.regmap, br->halt_reg, &val); br 35 drivers/clk/qcom/clk-branch.c val &= BIT(br->halt_bit); br 47 drivers/clk/qcom/clk-branch.c static bool clk_branch2_check_halt(const struct clk_branch *br, bool enabling) br 55 drivers/clk/qcom/clk-branch.c regmap_read(br->clkr.regmap, br->halt_reg, &val); br 66 drivers/clk/qcom/clk-branch.c static int clk_branch_wait(const struct clk_branch *br, bool enabling, br 69 drivers/clk/qcom/clk-branch.c bool voted = br->halt_check & BRANCH_VOTED; br 70 drivers/clk/qcom/clk-branch.c const char *name = clk_hw_get_name(&br->clkr.hw); br 76 drivers/clk/qcom/clk-branch.c if (br->halt_check == BRANCH_HALT_SKIP || clk_branch_in_hwcg_mode(br)) br 79 drivers/clk/qcom/clk-branch.c if (br->halt_check == BRANCH_HALT_DELAY || (!enabling && voted)) { br 81 drivers/clk/qcom/clk-branch.c } else if (br->halt_check == BRANCH_HALT_ENABLE || br 82 drivers/clk/qcom/clk-branch.c br->halt_check == BRANCH_HALT || br 87 drivers/clk/qcom/clk-branch.c if (check_halt(br, enabling)) br 101 drivers/clk/qcom/clk-branch.c struct clk_branch *br = to_clk_branch(hw); br 112 drivers/clk/qcom/clk-branch.c return clk_branch_wait(br, en, check_halt); br 98 drivers/fpga/altera-fpga2sdram.c struct fpga_bridge *br; br 124 drivers/fpga/altera-fpga2sdram.c br = devm_fpga_bridge_create(dev, F2S_BRIDGE_NAME, br 126 drivers/fpga/altera-fpga2sdram.c if (!br) br 129 drivers/fpga/altera-fpga2sdram.c platform_set_drvdata(pdev, br); br 131 drivers/fpga/altera-fpga2sdram.c ret = fpga_bridge_register(br); br 145 drivers/fpga/altera-fpga2sdram.c fpga_bridge_unregister(br); br 156 drivers/fpga/altera-fpga2sdram.c struct fpga_bridge *br = platform_get_drvdata(pdev); br 158 drivers/fpga/altera-fpga2sdram.c fpga_bridge_unregister(br); br 213 drivers/fpga/altera-freeze-bridge.c struct fpga_bridge *br; br 247 drivers/fpga/altera-freeze-bridge.c br = devm_fpga_bridge_create(dev, FREEZE_BRIDGE_NAME, br 249 drivers/fpga/altera-freeze-bridge.c if (!br) br 252 drivers/fpga/altera-freeze-bridge.c platform_set_drvdata(pdev, br); br 254 drivers/fpga/altera-freeze-bridge.c return fpga_bridge_register(br); br 259 drivers/fpga/altera-freeze-bridge.c struct fpga_bridge *br = platform_get_drvdata(pdev); br 261 drivers/fpga/altera-freeze-bridge.c fpga_bridge_unregister(br); br 131 drivers/fpga/altera-hps2fpga.c struct fpga_bridge *br; br 183 drivers/fpga/altera-hps2fpga.c br = devm_fpga_bridge_create(dev, priv->name, br 185 drivers/fpga/altera-hps2fpga.c if (!br) { br 190 drivers/fpga/altera-hps2fpga.c platform_set_drvdata(pdev, br); br 192 drivers/fpga/altera-hps2fpga.c ret = fpga_bridge_register(br); br 63 drivers/fpga/dfl-fme-br.c struct fpga_bridge *br; br 71 drivers/fpga/dfl-fme-br.c br = devm_fpga_bridge_create(dev, "DFL FPGA FME Bridge", br 73 drivers/fpga/dfl-fme-br.c if (!br) br 76 drivers/fpga/dfl-fme-br.c platform_set_drvdata(pdev, br); br 78 drivers/fpga/dfl-fme-br.c return fpga_bridge_register(br); br 83 drivers/fpga/dfl-fme-br.c struct fpga_bridge *br = platform_get_drvdata(pdev); br 84 drivers/fpga/dfl-fme-br.c struct fme_br_priv *priv = br->priv; br 86 drivers/fpga/dfl-fme-br.c fpga_bridge_unregister(br); br 248 drivers/fpga/dfl-fme-pr.c fme_br->br = platform_device_alloc(DFL_FPGA_FME_BRIDGE, br 250 drivers/fpga/dfl-fme-pr.c if (!fme_br->br) br 253 drivers/fpga/dfl-fme-pr.c fme_br->br->dev.parent = dev; br 255 drivers/fpga/dfl-fme-pr.c ret = platform_device_add_data(fme_br->br, &br_pdata, sizeof(br_pdata)); br 259 drivers/fpga/dfl-fme-pr.c ret = platform_device_add(fme_br->br); br 266 drivers/fpga/dfl-fme-pr.c platform_device_put(fme_br->br); br 276 drivers/fpga/dfl-fme-pr.c platform_device_unregister(fme_br->br); br 307 drivers/fpga/dfl-fme-pr.c struct platform_device *br, int port_id) br 319 drivers/fpga/dfl-fme-pr.c region_pdata.br = br; br 325 drivers/fpga/dfl-fme-pr.c fme_region->region = platform_device_alloc(DFL_FPGA_FME_REGION, br->id); br 422 drivers/fpga/dfl-fme-pr.c fme_br->br, i); br 45 drivers/fpga/dfl-fme-pr.h struct platform_device *br; br 56 drivers/fpga/dfl-fme-pr.h struct platform_device *br; br 25 drivers/fpga/dfl-fme-region.c struct device *dev = &pdata->br->dev; br 91 drivers/fpga/of-fpga-region.c struct device_node *br, *np, *parent_br = NULL; br 107 drivers/fpga/of-fpga-region.c br = of_parse_phandle(info->overlay, "fpga-bridges", 0); br 108 drivers/fpga/of-fpga-region.c if (br) { br 109 drivers/fpga/of-fpga-region.c of_node_put(br); br 116 drivers/fpga/of-fpga-region.c br = of_parse_phandle(np, "fpga-bridges", i); br 117 drivers/fpga/of-fpga-region.c if (!br) br 121 drivers/fpga/of-fpga-region.c if (br == parent_br) { br 122 drivers/fpga/of-fpga-region.c of_node_put(br); br 127 drivers/fpga/of-fpga-region.c ret = of_fpga_bridge_get_to_list(br, info, br 129 drivers/fpga/of-fpga-region.c of_node_put(br); br 89 drivers/fpga/xilinx-pr-decoupler.c struct fpga_bridge *br; br 116 drivers/fpga/xilinx-pr-decoupler.c br = devm_fpga_bridge_create(&pdev->dev, "Xilinx PR Decoupler", br 118 drivers/fpga/xilinx-pr-decoupler.c if (!br) { br 123 drivers/fpga/xilinx-pr-decoupler.c platform_set_drvdata(pdev, br); br 125 drivers/fpga/xilinx-pr-decoupler.c err = fpga_bridge_register(br); br 1324 drivers/gpu/drm/omapdrm/dss/dispc.c coef_b = FLD_VAL(coefs->br, 31, 22) | FLD_VAL(coefs->bg, 20, 11) | br 226 drivers/gpu/drm/omapdrm/dss/omapdss.h s16 br, bg, bb; br 324 drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c u8 br; br 328 drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c br = 0xdf; br 331 drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c br = 0xdd; br 335 drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c br = 0xd9; br 338 drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c br = 0xd0; br 343 drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c 0xc4, 0x0f, 0x40, 0x41, br, 0x00, 0x60, 0x19); br 286 drivers/hid/hid-google-hammer.c enum led_brightness br) br 294 drivers/hid/hid-google-hammer.c led->buf[1] = br; br 79 drivers/hid/hid-led.c int (*write)(struct led_classdev *cdev, enum led_brightness br); br 189 drivers/hid/hid-led.c static int riso_kagaku_write(struct led_classdev *cdev, enum led_brightness br) br 200 drivers/hid/hid-led.c static int dream_cheeky_write(struct led_classdev *cdev, enum led_brightness br) br 229 drivers/hid/hid-led.c static int _thingm_write(struct led_classdev *cdev, enum led_brightness br, br 243 drivers/hid/hid-led.c static int thingm_write_v1(struct led_classdev *cdev, enum led_brightness br) br 245 drivers/hid/hid-led.c return _thingm_write(cdev, br, 0); br 248 drivers/hid/hid-led.c static int thingm_write(struct led_classdev *cdev, enum led_brightness br) br 250 drivers/hid/hid-led.c return _thingm_write(cdev, br, 1); br 309 drivers/hid/hid-led.c static int delcom_write(struct led_classdev *cdev, enum led_brightness br) br 341 drivers/hid/hid-led.c static int luxafor_write(struct led_classdev *cdev, enum led_brightness br) br 2206 drivers/hid/hid-wiimote-modules.c __u8 sx, sy, tb, wb, bd, bm, bp, bo, br, bb, bg, by, bu; br 2247 drivers/hid/hid-wiimote-modules.c br = !(ext[5] & 0x40); br 2269 drivers/hid/hid-wiimote-modules.c br); br 37 drivers/media/dvb-frontends/zl10036.c u8 br, bf; br 192 drivers/media/dvb-frontends/zl10036.c u8 br, bf; br 212 drivers/media/dvb-frontends/zl10036.c br = _BR_MAXIMUM; br 218 drivers/media/dvb-frontends/zl10036.c br = ((_XTAL * 21 * 1000) / (fbw * 419)); br 222 drivers/media/dvb-frontends/zl10036.c if (br < 4) br 223 drivers/media/dvb-frontends/zl10036.c br = 4; br 224 drivers/media/dvb-frontends/zl10036.c if (br > _BR_MAXIMUM) br 225 drivers/media/dvb-frontends/zl10036.c br = _BR_MAXIMUM; br 231 drivers/media/dvb-frontends/zl10036.c bf = (fbw * br * 1257) / (_XTAL * 1000) - 1; br 238 drivers/media/dvb-frontends/zl10036.c buf_br[1] = (br << 2) & 0x7c; br 239 drivers/media/dvb-frontends/zl10036.c deb_info("%s: BW=%d br=%u bf=%u\n", __func__, fbw, br, bf); br 241 drivers/media/dvb-frontends/zl10036.c if (br != state->br) { br 263 drivers/media/dvb-frontends/zl10036.c state->br = br; br 397 drivers/media/dvb-frontends/zl10036.c state->br = 0xff; br 1443 drivers/media/i2c/s5k5baf.c struct v4l2_rect *r, *br; br 1449 drivers/media/i2c/s5k5baf.c br = rects[i - 1]; br 1450 drivers/media/i2c/s5k5baf.c s5k5baf_bound_rect(r, br->width, br->height); br 123 drivers/media/usb/dvb-usb/vp7045.c u8 v, br[2]; br 126 drivers/media/usb/dvb-usb/vp7045.c ret = vp7045_usb_op(d, GET_EE_VALUE, &v, 1, br, 2, 5); br 130 drivers/media/usb/dvb-usb/vp7045.c buf[i] = br[1]; br 579 drivers/media/usb/stkwebcam/stk-sensor.c int stk_sensor_set_brightness(struct stk_camera *dev, int br) br 581 drivers/media/usb/stkwebcam/stk-sensor.c if (br < 0 || br > 0xff) br 583 drivers/media/usb/stkwebcam/stk-sensor.c stk_sensor_outb(dev, REG_AEB, max(0x00, br - 6)); br 584 drivers/media/usb/stkwebcam/stk-sensor.c stk_sensor_outb(dev, REG_AEW, min(0xff, br + 6)); br 119 drivers/media/usb/stkwebcam/stk-webcam.h int stk_sensor_set_brightness(struct stk_camera *dev, int br); br 738 drivers/mtd/nand/raw/fsl_elbc_nand.c if ((in_be32(&lbc->bank[priv->bank].br) & BR_DECC) == br 875 drivers/mtd/nand/raw/fsl_elbc_nand.c if ((in_be32(&lbc->bank[bank].br) & BR_V) && br 876 drivers/mtd/nand/raw/fsl_elbc_nand.c (in_be32(&lbc->bank[bank].br) & BR_MSEL) == BR_MS_FCM && br 877 drivers/mtd/nand/raw/fsl_elbc_nand.c (in_be32(&lbc->bank[bank].br) & br 1664 drivers/net/dsa/b53/b53_common.c int b53_br_join(struct dsa_switch *ds, int port, struct net_device *br) br 1685 drivers/net/dsa/b53/b53_common.c if (dsa_to_port(ds, i)->bridge_dev != br) br 1709 drivers/net/dsa/b53/b53_common.c void b53_br_leave(struct dsa_switch *ds, int port, struct net_device *br) br 1721 drivers/net/dsa/b53/b53_common.c if (dsa_to_port(ds, i)->bridge_dev != br) br 1100 drivers/net/dsa/lan9303-core.c struct net_device *br) br 1114 drivers/net/dsa/lan9303-core.c struct net_device *br) br 197 drivers/net/dsa/microchip/ksz_common.c struct net_device *br) br 214 drivers/net/dsa/microchip/ksz_common.c struct net_device *br) br 168 drivers/net/dsa/microchip/ksz_common.h struct net_device *br); br 170 drivers/net/dsa/microchip/ksz_common.h struct net_device *br); br 1063 drivers/net/dsa/mv88e6xxx/chip.c struct net_device *br; br 1078 drivers/net/dsa/mv88e6xxx/chip.c br = ds->ports[port].bridge_dev; br 1087 drivers/net/dsa/mv88e6xxx/chip.c (br && dsa_to_port(chip->ds, i)->bridge_dev == br)) br 2036 drivers/net/dsa/mv88e6xxx/chip.c struct net_device *br) br 2045 drivers/net/dsa/mv88e6xxx/chip.c if (chip->ds->ports[port].bridge_dev == br) { br 2062 drivers/net/dsa/mv88e6xxx/chip.c if (ds->ports[port].bridge_dev == br) { br 2074 drivers/net/dsa/mv88e6xxx/chip.c struct net_device *br) br 2080 drivers/net/dsa/mv88e6xxx/chip.c err = mv88e6xxx_bridge_map(chip, br); br 2087 drivers/net/dsa/mv88e6xxx/chip.c struct net_device *br) br 2092 drivers/net/dsa/mv88e6xxx/chip.c if (mv88e6xxx_bridge_map(chip, br) || br 2099 drivers/net/dsa/mv88e6xxx/chip.c int port, struct net_device *br) br 2115 drivers/net/dsa/mv88e6xxx/chip.c int port, struct net_device *br) br 884 drivers/net/dsa/qca8k.c qca8k_port_bridge_join(struct dsa_switch *ds, int port, struct net_device *br) br 891 drivers/net/dsa/qca8k.c if (dsa_to_port(ds, i)->bridge_dev != br) br 910 drivers/net/dsa/qca8k.c qca8k_port_bridge_leave(struct dsa_switch *ds, int port, struct net_device *br) br 916 drivers/net/dsa/qca8k.c if (dsa_to_port(ds, i)->bridge_dev != br) br 1284 drivers/net/dsa/sja1105/sja1105_main.c struct net_device *br, bool member) br 1309 drivers/net/dsa/sja1105/sja1105_main.c if (dsa_to_port(ds, i)->bridge_dev != br) br 1369 drivers/net/dsa/sja1105/sja1105_main.c struct net_device *br) br 1371 drivers/net/dsa/sja1105/sja1105_main.c return sja1105_bridge_member(ds, port, br, true); br 1375 drivers/net/dsa/sja1105/sja1105_main.c struct net_device *br) br 1377 drivers/net/dsa/sja1105/sja1105_main.c sja1105_bridge_member(ds, port, br, false); br 73 drivers/net/ethernet/apm/xgene/xgene_enet_cle.c const struct xgene_cle_ptree_branch *br; br 86 drivers/net/ethernet/apm/xgene/xgene_enet_cle.c br = &dn->branch[i]; br 87 drivers/net/ethernet/apm/xgene/xgene_enet_cle.c npp = br->next_packet_pointer; br 89 drivers/net/ethernet/apm/xgene/xgene_enet_cle.c if ((br->jump_rel == JMP_ABS) && (npp < CLE_PKTRAM_SIZE)) br 92 drivers/net/ethernet/apm/xgene/xgene_enet_cle.c buf[j++] = SET_VAL(CLE_BR_VALID, br->valid) | br 94 drivers/net/ethernet/apm/xgene/xgene_enet_cle.c SET_VAL(CLE_BR_JB, br->jump_bw) | br 95 drivers/net/ethernet/apm/xgene/xgene_enet_cle.c SET_VAL(CLE_BR_JR, br->jump_rel) | br 96 drivers/net/ethernet/apm/xgene/xgene_enet_cle.c SET_VAL(CLE_BR_OP, br->operation) | br 97 drivers/net/ethernet/apm/xgene/xgene_enet_cle.c SET_VAL(CLE_BR_NNODE, br->next_node) | br 98 drivers/net/ethernet/apm/xgene/xgene_enet_cle.c SET_VAL(CLE_BR_NBR, br->next_branch); br 100 drivers/net/ethernet/apm/xgene/xgene_enet_cle.c buf[j++] = SET_VAL(CLE_BR_DATA, br->data) | br 101 drivers/net/ethernet/apm/xgene/xgene_enet_cle.c SET_VAL(CLE_BR_MASK, br->mask); br 409 drivers/net/wan/hd64570.c unsigned int tmc, br = 10, brv = 1024; br 415 drivers/net/wan/hd64570.c br--; br 420 drivers/net/wan/hd64570.c }while (br > 1 && tmc <= 128); br 424 drivers/net/wan/hd64570.c br = 0; /* For baud=CLOCK_BASE we use tmc=1 br=0 */ br 431 drivers/net/wan/hd64570.c br = 9; /* Minimum clock rate */ br 436 drivers/net/wan/hd64570.c port->rxs = (port->rxs & ~CLK_BRG_MASK) | br; br 437 drivers/net/wan/hd64570.c port->txs = (port->txs & ~CLK_BRG_MASK) | br; br 372 drivers/net/wan/hd64572.c unsigned int tmc, br = 10, brv = 1024; br 378 drivers/net/wan/hd64572.c br--; br 383 drivers/net/wan/hd64572.c }while (br > 1 && tmc <= 128); br 387 drivers/net/wan/hd64572.c br = 0; /* For baud=CLOCK_BASE we use tmc=1 br=0 */ br 394 drivers/net/wan/hd64572.c br = 9; /* Minimum clock rate */ br 399 drivers/net/wan/hd64572.c port->rxs = (port->rxs & ~CLK_BRG_MASK) | br; br 400 drivers/net/wan/hd64572.c port->txs = (port->txs & ~CLK_BRG_MASK) | br; br 3433 drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c u8 *br = wlc->band->basic_rate; br 3437 drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c memset(br, 0, BRCM_MAXRATE + 1); br 3457 drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c br[rate] = rate; br 3477 drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c if (br[rate] != 0) { br 3495 drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c br[rate] = is_ofdm_rate(rate) ? ofdm_basic : cck_basic; br 3497 drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c if (br[rate] != 0) br 3516 drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c br[rate] = mandatory; br 489 drivers/spi/spi-fsl-dspi.c static void hz_to_spi_baud(char *pbr, char *br, int speed_hz, br 511 drivers/spi/spi-fsl-dspi.c *br = i; br 522 drivers/spi/spi-fsl-dspi.c *br = ARRAY_SIZE(brs) - 1; br 818 drivers/spi/spi-fsl-dspi.c unsigned char br = 0, pbr = 0, pcssck = 0, cssck = 0; br 849 drivers/spi/spi-fsl-dspi.c hz_to_spi_baud(&pbr, &br, spi->max_speed_hz, clkrate); br 869 drivers/spi/spi-fsl-dspi.c SPI_CTAR_BR(br); br 209 drivers/spi/spi-stm32.c const struct stm32_spi_reg br; br 328 drivers/spi/spi-stm32.c .br = { STM32F4_SPI_CR1, STM32F4_SPI_CR1_BR, STM32F4_SPI_CR1_BR_SHIFT }, br 346 drivers/spi/spi-stm32.c .br = { STM32H7_SPI_CFG1, STM32H7_SPI_CFG1_MBR, br 1420 drivers/spi/spi-stm32.c clrb |= spi->cfg->regs->br.mask; br 1421 drivers/spi/spi-stm32.c setb |= ((u32)mbrdiv << spi->cfg->regs->br.shift) & br 1422 drivers/spi/spi-stm32.c spi->cfg->regs->br.mask; br 1424 drivers/spi/spi-stm32.c writel_relaxed((readl_relaxed(spi->base + spi->cfg->regs->br.reg) & br 1426 drivers/spi/spi-stm32.c spi->base + spi->cfg->regs->br.reg); br 22 drivers/thermal/intel/int340x_thermal/int3406_thermal.c struct acpi_video_device_brightness *br; br 60 drivers/thermal/intel/int340x_thermal/int3406_thermal.c acpi_level = d->br->levels[d->upper_limit - state]; br 83 drivers/thermal/intel/int340x_thermal/int3406_thermal.c if (acpi_level <= d->br->levels[index]) br 115 drivers/thermal/intel/int340x_thermal/int3406_thermal.c d->lower_limit = int3406_thermal_get_index(d->br->levels, br 116 drivers/thermal/intel/int340x_thermal/int3406_thermal.c d->br->count, lower_limit); br 120 drivers/thermal/intel/int340x_thermal/int3406_thermal.c d->upper_limit = int3406_thermal_get_index(d->br->levels, br 121 drivers/thermal/intel/int340x_thermal/int3406_thermal.c d->br->count, upper_limit); br 125 drivers/thermal/intel/int340x_thermal/int3406_thermal.c d->upper_limit = d->upper_limit > 0 ? d->upper_limit : d->br->count - 1; br 154 drivers/thermal/intel/int340x_thermal/int3406_thermal.c ret = acpi_video_get_levels(ACPI_COMPANION(&pdev->dev), &d->br, NULL); br 177 drivers/thermal/intel/int340x_thermal/int3406_thermal.c kfree(d->br); br 186 drivers/thermal/intel/int340x_thermal/int3406_thermal.c kfree(d->br); br 2275 drivers/tty/serial/sh-sci.c unsigned int sr, br, prediv, scrate, c; br 2314 drivers/tty/serial/sh-sci.c br = DIV_ROUND_CLOSEST(freq, scrate); br 2315 drivers/tty/serial/sh-sci.c br = clamp(br, 1U, 256U); br 2317 drivers/tty/serial/sh-sci.c err = DIV_ROUND_CLOSEST(freq, br * prediv) - bps; br 2322 drivers/tty/serial/sh-sci.c *brr = br - 1; br 330 drivers/tty/serial/sirfsoc_uart.h #define SIRFSOC_UART_RX_TIMEOUT(br, to) (((br) * (((to) + 999) / 1000)) / 1000) br 90 drivers/uio/uio_fsl_elbc_gpcm.c in_be32(&bank->br)); br 117 drivers/uio/uio_fsl_elbc_gpcm.c reg_br_cur = in_be32(&bank->br); br 132 drivers/uio/uio_fsl_elbc_gpcm.c out_be32(&bank->br, reg_new | BR_V); br 347 drivers/uio/uio_fsl_elbc_gpcm.c reg_br_cur = in_be32(&priv->lbc->bank[priv->bank].br); br 379 drivers/uio/uio_fsl_elbc_gpcm.c out_be32(&priv->lbc->bank[priv->bank].br, reg_br_new); br 407 drivers/usb/serial/oti6858.c int br; br 439 drivers/usb/serial/oti6858.c br = tty_get_baud_rate(tty); br 440 drivers/usb/serial/oti6858.c if (br == 0) { br 445 drivers/usb/serial/oti6858.c br = min(br, OTI6858_MAX_BAUD_RATE); br 447 drivers/usb/serial/oti6858.c new_divisor = (96000000 + 8 * br) / (16 * br); br 168 drivers/video/backlight/lm3630a_bl.c static void lm3630a_pwm_ctrl(struct lm3630a_chip *pchip, int br, int br_max) br 171 drivers/video/backlight/lm3630a_bl.c unsigned int duty = br * period / br_max; br 234 drivers/video/backlight/lp855x_bl.c static void lp855x_pwm_ctrl(struct lp855x *lp, int br, int max_br) br 237 drivers/video/backlight/lp855x_bl.c unsigned int duty = br * period / max_br; br 121 drivers/video/backlight/lp8788_bl.c static void lp8788_pwm_ctrl(struct lp8788_bl *bl, int br, int max_br) br 132 drivers/video/backlight/lp8788_bl.c duty = br * period / max_br; br 1101 drivers/video/fbdev/omap2/omapfb/dss/dispc.c coef_b = FLD_VAL(coefs->br, 31, 22) | FLD_VAL(coefs->bg, 20, 11) | br 369 drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c info.cpr_coefs.br, br 388 drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c &coefs.br, &coefs.bg, &coefs.bb) != 9) br 393 drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c coefs.br, coefs.bg, coefs.bb }; br 2680 fs/ocfs2/dlm/dlmrecovery.c struct dlm_begin_reco br; br 2694 fs/ocfs2/dlm/dlmrecovery.c memset(&br, 0, sizeof(br)); br 2695 fs/ocfs2/dlm/dlmrecovery.c br.node_idx = dlm->node_num; br 2696 fs/ocfs2/dlm/dlmrecovery.c br.dead_node = dead_node; br 2714 fs/ocfs2/dlm/dlmrecovery.c &br, sizeof(br), nodenum, &status); br 2769 fs/ocfs2/dlm/dlmrecovery.c struct dlm_begin_reco *br = (struct dlm_begin_reco *)msg->buf; br 2779 fs/ocfs2/dlm/dlmrecovery.c dlm->name, br->node_idx, br->dead_node, br 2788 fs/ocfs2/dlm/dlmrecovery.c dlm->name, br->node_idx, br->dead_node, br 2791 fs/ocfs2/dlm/dlmrecovery.c dlm_fire_domain_eviction_callbacks(dlm, br->dead_node); br 2798 fs/ocfs2/dlm/dlmrecovery.c br->node_idx); br 2802 fs/ocfs2/dlm/dlmrecovery.c br->node_idx); br 2809 fs/ocfs2/dlm/dlmrecovery.c dlm->reco.dead_node, br->node_idx, br->dead_node); br 2811 fs/ocfs2/dlm/dlmrecovery.c dlm_set_reco_master(dlm, br->node_idx); br 2812 fs/ocfs2/dlm/dlmrecovery.c dlm_set_reco_dead_node(dlm, br->dead_node); br 2813 fs/ocfs2/dlm/dlmrecovery.c if (!test_bit(br->dead_node, dlm->recovery_map)) { br 2816 fs/ocfs2/dlm/dlmrecovery.c br->node_idx, br->dead_node, br->dead_node); br 2817 fs/ocfs2/dlm/dlmrecovery.c if (!test_bit(br->dead_node, dlm->domain_map) || br 2818 fs/ocfs2/dlm/dlmrecovery.c !test_bit(br->dead_node, dlm->live_nodes_map)) br 2821 fs/ocfs2/dlm/dlmrecovery.c br->dead_node); br 2824 fs/ocfs2/dlm/dlmrecovery.c set_bit(br->dead_node, dlm->domain_map); br 2825 fs/ocfs2/dlm/dlmrecovery.c set_bit(br->dead_node, dlm->live_nodes_map); br 2826 fs/ocfs2/dlm/dlmrecovery.c __dlm_hb_node_down(dlm, br->dead_node); br 2833 fs/ocfs2/dlm/dlmrecovery.c dlm->name, br->node_idx, br->dead_node, br 584 fs/ubifs/commit.c struct ubifs_branch *br; br 638 fs/ubifs/commit.c br = ubifs_idx_branch(c, idx, child_cnt - 1); br 639 fs/ubifs/commit.c key_read(c, &br->key, &u_key); br 684 fs/ubifs/commit.c br = ubifs_idx_branch(c, idx, iip); br 685 fs/ubifs/commit.c lnum = le32_to_cpu(br->lnum); br 686 fs/ubifs/commit.c offs = le32_to_cpu(br->offs); br 687 fs/ubifs/commit.c len = le32_to_cpu(br->len); br 688 fs/ubifs/commit.c key_read(c, &br->key, &lower_key); br 690 fs/ubifs/commit.c br = ubifs_idx_branch(c, idx, iip + 1); br 691 fs/ubifs/commit.c key_read(c, &br->key, &upper_key); br 505 fs/ubifs/debug.c const struct ubifs_branch *br; br 507 fs/ubifs/debug.c br = ubifs_idx_branch(c, idx, i); br 508 fs/ubifs/debug.c key_read(c, &br->key, &key); br 510 fs/ubifs/debug.c i, le32_to_cpu(br->lnum), le32_to_cpu(br->offs), br 511 fs/ubifs/debug.c le32_to_cpu(br->len), br 77 fs/ubifs/sb.c struct ubifs_branch *br; br 279 fs/ubifs/sb.c br = ubifs_idx_branch(c, idx, 0); br 280 fs/ubifs/sb.c key_write_idx(c, &key, &br->key); br 281 fs/ubifs/sb.c br->lnum = cpu_to_le32(main_first + DEFAULT_DATA_LEB); br 282 fs/ubifs/sb.c br->len = cpu_to_le32(UBIFS_INO_NODE_SZ); br 332 fs/ubifs/sb.c ubifs_copy_hash(c, hash, ubifs_branch_hash(c, br)); br 37 fs/ubifs/tnc_commit.c struct ubifs_branch *br = ubifs_idx_branch(c, idx, i); br 40 fs/ubifs/tnc_commit.c key_write_idx(c, &zbr->key, &br->key); br 41 fs/ubifs/tnc_commit.c br->lnum = cpu_to_le32(zbr->lnum); br 42 fs/ubifs/tnc_commit.c br->offs = cpu_to_le32(zbr->offs); br 43 fs/ubifs/tnc_commit.c br->len = cpu_to_le32(zbr->len); br 44 fs/ubifs/tnc_commit.c ubifs_copy_hash(c, zbr->hash, ubifs_branch_hash(c, br)); br 870 fs/ubifs/tnc_commit.c struct ubifs_branch *br = ubifs_idx_branch(c, idx, i); br 873 fs/ubifs/tnc_commit.c key_write_idx(c, &zbr->key, &br->key); br 874 fs/ubifs/tnc_commit.c br->lnum = cpu_to_le32(zbr->lnum); br 875 fs/ubifs/tnc_commit.c br->offs = cpu_to_le32(zbr->offs); br 876 fs/ubifs/tnc_commit.c br->len = cpu_to_le32(zbr->len); br 877 fs/ubifs/tnc_commit.c ubifs_copy_hash(c, zbr->hash, ubifs_branch_hash(c, br)); br 307 fs/ubifs/tnc_misc.c struct ubifs_branch *br = ubifs_idx_branch(c, idx, i); br 310 fs/ubifs/tnc_misc.c key_read(c, &br->key, &zbr->key); br 311 fs/ubifs/tnc_misc.c zbr->lnum = le32_to_cpu(br->lnum); br 312 fs/ubifs/tnc_misc.c zbr->offs = le32_to_cpu(br->offs); br 313 fs/ubifs/tnc_misc.c zbr->len = le32_to_cpu(br->len); br 314 fs/ubifs/tnc_misc.c ubifs_copy_hash(c, ubifs_branch_hash(c, br), zbr->hash); br 1625 fs/ubifs/ubifs.h struct ubifs_branch *br) br 1627 fs/ubifs/ubifs.h return (void *)br + sizeof(*br) + c->key_len; br 485 fs/xfs/scrub/agheader_repair.c struct xfs_bitmap_range *br; br 531 fs/xfs/scrub/agheader_repair.c for_each_xfs_bitmap_extent(br, n, agfl_extents) { br 532 fs/xfs/scrub/agheader_repair.c *flcount += br->len; br 581 fs/xfs/scrub/agheader_repair.c struct xfs_bitmap_range *br; br 606 fs/xfs/scrub/agheader_repair.c for_each_xfs_bitmap_extent(br, n, agfl_extents) { br 607 fs/xfs/scrub/agheader_repair.c agbno = XFS_FSB_TO_AGBNO(mp, br->start); br 609 fs/xfs/scrub/agheader_repair.c trace_xrep_agfl_insert(mp, sc->sa.agno, agbno, br->len); br 611 fs/xfs/scrub/agheader_repair.c while (br->len > 0 && fl_off < flcount) { br 620 fs/xfs/scrub/agheader_repair.c br->start++; br 621 fs/xfs/scrub/agheader_repair.c br->len--; br 624 fs/xfs/scrub/agheader_repair.c if (br->len) br 626 fs/xfs/scrub/agheader_repair.c list_del(&br->list); br 627 fs/xfs/scrub/agheader_repair.c kmem_free(br); br 104 fs/xfs/scrub/bitmap.c struct xfs_bitmap_range *br; br 131 fs/xfs/scrub/bitmap.c br = list_entry(lp, struct xfs_bitmap_range, list); br 137 fs/xfs/scrub/bitmap.c while (sub_br->start + sub_br->len <= br->start) { br 142 fs/xfs/scrub/bitmap.c if (sub_br->start >= br->start + br->len) { br 150 fs/xfs/scrub/bitmap.c if (sub_br->start < br->start) { br 151 fs/xfs/scrub/bitmap.c sub_len -= br->start - sub_br->start; br 152 fs/xfs/scrub/bitmap.c sub_start = br->start; br 154 fs/xfs/scrub/bitmap.c if (sub_len > br->len) br 155 fs/xfs/scrub/bitmap.c sub_len = br->len; br 158 fs/xfs/scrub/bitmap.c if (sub_start == br->start) br 160 fs/xfs/scrub/bitmap.c if (sub_start + sub_len == br->start + br->len) br 165 fs/xfs/scrub/bitmap.c br->start += sub_len; br 166 fs/xfs/scrub/bitmap.c br->len -= sub_len; br 170 fs/xfs/scrub/bitmap.c br->len -= sub_len; br 176 fs/xfs/scrub/bitmap.c list_del(&br->list); br 177 fs/xfs/scrub/bitmap.c kmem_free(br); br 192 fs/xfs/scrub/bitmap.c new_br->len = br->start + br->len - new_br->start; br 193 fs/xfs/scrub/bitmap.c list_add(&new_br->list, &br->list); br 194 fs/xfs/scrub/bitmap.c br->len = sub_start - br->start; br 68 include/linux/fpga/fpga-bridge.h void fpga_bridge_free(struct fpga_bridge *br); br 69 include/linux/fpga/fpga-bridge.h int fpga_bridge_register(struct fpga_bridge *br); br 70 include/linux/fpga/fpga-bridge.h void fpga_bridge_unregister(struct fpga_bridge *br); br 525 include/net/dsa.h int port, struct net_device *br); br 527 include/net/dsa.h int port, struct net_device *br); br 49 include/net/netfilter/br_netfilter.h return port ? &port->br->fake_rtable : NULL; br 44 include/trace/events/bridge.h TP_PROTO(struct net_bridge *br, struct net_bridge_port *p, br 47 include/trace/events/bridge.h TP_ARGS(br, p, addr, vid), br 50 include/trace/events/bridge.h __string(br_dev, br->dev->name) br 57 include/trace/events/bridge.h __assign_str(br_dev, br->dev->name); br 71 include/trace/events/bridge.h TP_PROTO(struct net_bridge *br, struct net_bridge_fdb_entry *f), br 73 include/trace/events/bridge.h TP_ARGS(br, f), br 76 include/trace/events/bridge.h __string(br_dev, br->dev->name) br 83 include/trace/events/bridge.h __assign_str(br_dev, br->dev->name); br 97 include/trace/events/bridge.h TP_PROTO(struct net_bridge *br, struct net_bridge_port *source, br 100 include/trace/events/bridge.h TP_ARGS(br, source, addr, vid, added_by_user), br 103 include/trace/events/bridge.h __string(br_dev, br->dev->name) br 111 include/trace/events/bridge.h __assign_str(br_dev, br->dev->name); br 291 include/video/omapfb_dss.h s16 br, bg, bb; br 761 kernel/bpf/verifier.c u32 br = --st->branches; br 766 kernel/bpf/verifier.c WARN_ONCE((int)br < 0, br 768 kernel/bpf/verifier.c br); br 769 kernel/bpf/verifier.c if (br) br 7412 kernel/bpf/verifier.c u32 br = sl->state.branches; br 7414 kernel/bpf/verifier.c WARN_ONCE(br, br 7416 kernel/bpf/verifier.c br); br 34 net/bridge/br.c struct net_bridge *br; br 56 net/bridge/br.c br = p->br; br 60 net/bridge/br.c br_mtu_auto_adjust(br); br 64 net/bridge/br.c if (br->dev->addr_assign_type == NET_ADDR_SET) br 67 net/bridge/br.c err = dev_pre_changeaddr_notify(br->dev, br 75 net/bridge/br.c spin_lock_bh(&br->lock); br 77 net/bridge/br.c changed_addr = br_stp_recalculate_bridge_id(br); br 78 net/bridge/br.c spin_unlock_bh(&br->lock); br 81 net/bridge/br.c call_netdevice_notifiers(NETDEV_CHANGEADDR, br->dev); br 90 net/bridge/br.c netdev_update_features(br->dev); br 94 net/bridge/br.c spin_lock_bh(&br->lock); br 95 net/bridge/br.c if (br->dev->flags & IFF_UP) { br 99 net/bridge/br.c spin_unlock_bh(&br->lock); br 103 net/bridge/br.c if (netif_running(br->dev) && netif_oper_up(dev)) { br 104 net/bridge/br.c spin_lock_bh(&br->lock); br 107 net/bridge/br.c spin_unlock_bh(&br->lock); br 112 net/bridge/br.c br_del_if(br, dev); br 127 net/bridge/br.c call_netdevice_notifiers(event, br->dev); br 152 net/bridge/br.c struct net_bridge *br; br 160 net/bridge/br.c br = p->br; br 165 net/bridge/br.c err = br_fdb_external_learn_add(br, p, fdb_info->addr, br 171 net/bridge/br.c br_fdb_offloaded_set(br, p, fdb_info->addr, br 176 net/bridge/br.c err = br_fdb_external_learn_del(br, p, fdb_info->addr, br 183 net/bridge/br.c br_fdb_offloaded_set(br, p, fdb_info->addr, br 206 net/bridge/br.c int br_boolopt_toggle(struct net_bridge *br, enum br_boolopt_id opt, bool on, br 211 net/bridge/br.c br_opt_toggle(br, BROPT_NO_LL_LEARN, on); br 222 net/bridge/br.c int br_boolopt_get(const struct net_bridge *br, enum br_boolopt_id opt) br 226 net/bridge/br.c return br_opt_get(br, BROPT_NO_LL_LEARN); br 236 net/bridge/br.c int br_boolopt_multi_toggle(struct net_bridge *br, br 247 net/bridge/br.c err = br_boolopt_toggle(br, opt_id, on, extack); br 249 net/bridge/br.c br_debug(br, "boolopt multi-toggle error: option: %d current: %d new: %d error: %d\n", br 250 net/bridge/br.c opt_id, br_boolopt_get(br, opt_id), on, err); br 258 net/bridge/br.c void br_boolopt_multi_get(const struct net_bridge *br, br 265 net/bridge/br.c optval |= (br_boolopt_get(br, opt_id) << opt_id); br 272 net/bridge/br.c void br_opt_toggle(struct net_bridge *br, enum net_bridge_opts opt, bool on) br 274 net/bridge/br.c bool cur = !!br_opt_get(br, opt); br 276 net/bridge/br.c br_debug(br, "toggle option: %d state: %d -> %d\n", br 283 net/bridge/br.c set_bit(opt, &br->options); br 285 net/bridge/br.c clear_bit(opt, &br->options); br 27 net/bridge/br_arp_nd_proxy.c void br_recalculate_neigh_suppress_enabled(struct net_bridge *br) br 32 net/bridge/br_arp_nd_proxy.c list_for_each_entry(p, &br->port_list, list) { br 39 net/bridge/br_arp_nd_proxy.c br_opt_toggle(br, BROPT_NEIGH_SUPPRESS_ENABLED, neigh_suppress); br 43 net/bridge/br_arp_nd_proxy.c static void br_arp_send(struct net_bridge *br, struct net_bridge_port *p, br 71 net/bridge/br_arp_nd_proxy.c vg = br_vlan_group_rcu(br); br 120 net/bridge/br_arp_nd_proxy.c void br_do_proxy_suppress_arp(struct sk_buff *skb, struct net_bridge *br, br 123 net/bridge/br_arp_nd_proxy.c struct net_device *dev = br->dev; br 155 net/bridge/br_arp_nd_proxy.c if (br_opt_get(br, BROPT_NEIGH_SUPPRESS_ENABLED)) { br 169 net/bridge/br_arp_nd_proxy.c vlandev = __vlan_find_dev_deep_rcu(br->dev, skb->vlan_proto, br 175 net/bridge/br_arp_nd_proxy.c if (br_opt_get(br, BROPT_NEIGH_SUPPRESS_ENABLED) && br 193 net/bridge/br_arp_nd_proxy.c f = br_fdb_find_rcu(br, n->ha, vid); br 201 net/bridge/br_arp_nd_proxy.c br_arp_send(br, p, skb->dev, sip, tip, br 204 net/bridge/br_arp_nd_proxy.c br_arp_send(br, p, skb->dev, sip, tip, br 215 net/bridge/br_arp_nd_proxy.c br_opt_get(br, BROPT_NEIGH_SUPPRESS_ENABLED)) br 242 net/bridge/br_arp_nd_proxy.c static void br_nd_send(struct net_bridge *br, struct net_bridge_port *p, br 341 net/bridge/br_arp_nd_proxy.c vg = br_vlan_group_rcu(br); br 387 net/bridge/br_arp_nd_proxy.c void br_do_suppress_nd(struct sk_buff *skb, struct net_bridge *br, br 390 net/bridge/br_arp_nd_proxy.c struct net_device *dev = br->dev; br 423 net/bridge/br_arp_nd_proxy.c vlandev = __vlan_find_dev_deep_rcu(br->dev, skb->vlan_proto, br 448 net/bridge/br_arp_nd_proxy.c f = br_fdb_find_rcu(br, n->ha, vid); br 454 net/bridge/br_arp_nd_proxy.c br_nd_send(br, p, skb, n, br 458 net/bridge/br_arp_nd_proxy.c br_nd_send(br, p, skb, n, 0, 0, msg); br 467 net/bridge/br_arp_nd_proxy.c br_opt_get(br, BROPT_NEIGH_SUPPRESS_ENABLED)) br 30 net/bridge/br_device.c struct net_bridge *br = netdev_priv(dev); br 33 net/bridge/br_device.c struct pcpu_sw_netstats *brstats = this_cpu_ptr(br->stats); br 59 net/bridge/br_device.c if (!br_allowed_ingress(br, br_vlan_group_rcu(br), skb, &vid)) br 65 net/bridge/br_device.c br_opt_get(br, BROPT_NEIGH_SUPPRESS_ENABLED)) { br 66 net/bridge/br_device.c br_do_proxy_suppress_arp(skb, br, vid, NULL); br 69 net/bridge/br_device.c br_opt_get(br, BROPT_NEIGH_SUPPRESS_ENABLED) && br 77 net/bridge/br_device.c br_do_suppress_nd(skb, br, vid, NULL, msg); br 82 net/bridge/br_device.c br_flood(br, skb, BR_PKT_BROADCAST, false, true); br 85 net/bridge/br_device.c br_flood(br, skb, BR_PKT_MULTICAST, false, true); br 88 net/bridge/br_device.c if (br_multicast_rcv(br, NULL, skb, vid)) { br 93 net/bridge/br_device.c mdst = br_mdb_get(br, skb, vid); br 95 net/bridge/br_device.c br_multicast_querier_exists(br, eth_hdr(skb))) br 98 net/bridge/br_device.c br_flood(br, skb, BR_PKT_MULTICAST, false, true); br 99 net/bridge/br_device.c } else if ((dst = br_fdb_find_rcu(br, dest, vid)) != NULL) { br 102 net/bridge/br_device.c br_flood(br, skb, BR_PKT_UNICAST, false, true); br 111 net/bridge/br_device.c struct net_bridge *br = netdev_priv(dev); br 114 net/bridge/br_device.c br->stats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats); br 115 net/bridge/br_device.c if (!br->stats) br 118 net/bridge/br_device.c err = br_fdb_hash_init(br); br 120 net/bridge/br_device.c free_percpu(br->stats); br 124 net/bridge/br_device.c err = br_mdb_hash_init(br); br 126 net/bridge/br_device.c free_percpu(br->stats); br 127 net/bridge/br_device.c br_fdb_hash_fini(br); br 131 net/bridge/br_device.c err = br_vlan_init(br); br 133 net/bridge/br_device.c free_percpu(br->stats); br 134 net/bridge/br_device.c br_mdb_hash_fini(br); br 135 net/bridge/br_device.c br_fdb_hash_fini(br); br 139 net/bridge/br_device.c err = br_multicast_init_stats(br); br 141 net/bridge/br_device.c free_percpu(br->stats); br 142 net/bridge/br_device.c br_vlan_flush(br); br 143 net/bridge/br_device.c br_mdb_hash_fini(br); br 144 net/bridge/br_device.c br_fdb_hash_fini(br); br 152 net/bridge/br_device.c struct net_bridge *br = netdev_priv(dev); br 154 net/bridge/br_device.c br_multicast_dev_del(br); br 155 net/bridge/br_device.c br_multicast_uninit_stats(br); br 156 net/bridge/br_device.c br_vlan_flush(br); br 157 net/bridge/br_device.c br_mdb_hash_fini(br); br 158 net/bridge/br_device.c br_fdb_hash_fini(br); br 159 net/bridge/br_device.c free_percpu(br->stats); br 164 net/bridge/br_device.c struct net_bridge *br = netdev_priv(dev); br 168 net/bridge/br_device.c br_stp_enable_bridge(br); br 169 net/bridge/br_device.c br_multicast_open(br); br 186 net/bridge/br_device.c struct net_bridge *br = netdev_priv(dev); br 188 net/bridge/br_device.c br_stp_disable_bridge(br); br 189 net/bridge/br_device.c br_multicast_stop(br); br 199 net/bridge/br_device.c struct net_bridge *br = netdev_priv(dev); br 206 net/bridge/br_device.c = per_cpu_ptr(br->stats, cpu); br 225 net/bridge/br_device.c struct net_bridge *br = netdev_priv(dev); br 230 net/bridge/br_device.c br_opt_toggle(br, BROPT_MTU_SET_BY_USER, true); br 233 net/bridge/br_device.c dst_metric_set(&br->fake_rtable.dst, RTAX_MTU, new_mtu); br 242 net/bridge/br_device.c struct net_bridge *br = netdev_priv(dev); br 254 net/bridge/br_device.c spin_lock_bh(&br->lock); br 257 net/bridge/br_device.c br_stp_change_bridge_id(br, addr->sa_data); br 259 net/bridge/br_device.c spin_unlock_bh(&br->lock); br 275 net/bridge/br_device.c struct net_bridge *br = netdev_priv(dev); br 277 net/bridge/br_device.c return br_features_recompute(br, features); br 287 net/bridge/br_device.c struct net_bridge *br = netdev_priv(dev); br 290 net/bridge/br_device.c list_for_each_entry(p, &br->port_list, list) br 315 net/bridge/br_device.c if (!p->br->dev->npinfo) br 323 net/bridge/br_device.c struct net_bridge *br = netdev_priv(dev); br 327 net/bridge/br_device.c list_for_each_entry(p, &br->port_list, list) { br 361 net/bridge/br_device.c struct net_bridge *br = netdev_priv(dev); br 363 net/bridge/br_device.c return br_add_if(br, slave_dev, extack); br 368 net/bridge/br_device.c struct net_bridge *br = netdev_priv(dev); br 370 net/bridge/br_device.c return br_del_if(br, slave_dev); br 414 net/bridge/br_device.c struct net_bridge *br = netdev_priv(dev); br 431 net/bridge/br_device.c br->dev = dev; br 432 net/bridge/br_device.c spin_lock_init(&br->lock); br 433 net/bridge/br_device.c INIT_LIST_HEAD(&br->port_list); br 434 net/bridge/br_device.c INIT_HLIST_HEAD(&br->fdb_list); br 435 net/bridge/br_device.c spin_lock_init(&br->hash_lock); br 437 net/bridge/br_device.c br->bridge_id.prio[0] = 0x80; br 438 net/bridge/br_device.c br->bridge_id.prio[1] = 0x00; br 440 net/bridge/br_device.c ether_addr_copy(br->group_addr, eth_stp_addr); br 442 net/bridge/br_device.c br->stp_enabled = BR_NO_STP; br 443 net/bridge/br_device.c br->group_fwd_mask = BR_GROUPFWD_DEFAULT; br 444 net/bridge/br_device.c br->group_fwd_mask_required = BR_GROUPFWD_DEFAULT; br 446 net/bridge/br_device.c br->designated_root = br->bridge_id; br 447 net/bridge/br_device.c br->bridge_max_age = br->max_age = 20 * HZ; br 448 net/bridge/br_device.c br->bridge_hello_time = br->hello_time = 2 * HZ; br 449 net/bridge/br_device.c br->bridge_forward_delay = br->forward_delay = 15 * HZ; br 450 net/bridge/br_device.c br->bridge_ageing_time = br->ageing_time = BR_DEFAULT_AGEING_TIME; br 453 net/bridge/br_device.c br_netfilter_rtable_init(br); br 454 net/bridge/br_device.c br_stp_timer_init(br); br 455 net/bridge/br_device.c br_multicast_init(br); br 456 net/bridge/br_device.c INIT_DELAYED_WORK(&br->gc_work, br_fdb_cleanup); br 35 net/bridge/br_fdb.c static int fdb_insert(struct net_bridge *br, struct net_bridge_port *source, br 37 net/bridge/br_fdb.c static void fdb_notify(struct net_bridge *br, br 57 net/bridge/br_fdb.c int br_fdb_hash_init(struct net_bridge *br) br 59 net/bridge/br_fdb.c return rhashtable_init(&br->fdb_hash_tbl, &br_fdb_rht_params); br 62 net/bridge/br_fdb.c void br_fdb_hash_fini(struct net_bridge *br) br 64 net/bridge/br_fdb.c rhashtable_destroy(&br->fdb_hash_tbl); br 70 net/bridge/br_fdb.c static inline unsigned long hold_time(const struct net_bridge *br) br 72 net/bridge/br_fdb.c return br->topology_change ? br->forward_delay : br->ageing_time; br 75 net/bridge/br_fdb.c static inline int has_expired(const struct net_bridge *br, br 79 net/bridge/br_fdb.c time_before_eq(fdb->updated + hold_time(br), jiffies); br 104 net/bridge/br_fdb.c static struct net_bridge_fdb_entry *br_fdb_find(struct net_bridge *br, br 110 net/bridge/br_fdb.c lockdep_assert_held_once(&br->hash_lock); br 113 net/bridge/br_fdb.c fdb = fdb_find_rcu(&br->fdb_hash_tbl, addr, vid); br 125 net/bridge/br_fdb.c struct net_bridge *br; br 132 net/bridge/br_fdb.c br = netdev_priv(br_dev); br 134 net/bridge/br_fdb.c f = br_fdb_find_rcu(br, addr, vid); br 143 net/bridge/br_fdb.c struct net_bridge_fdb_entry *br_fdb_find_rcu(struct net_bridge *br, br 147 net/bridge/br_fdb.c return fdb_find_rcu(&br->fdb_hash_tbl, addr, vid); br 155 net/bridge/br_fdb.c static void fdb_add_hw_addr(struct net_bridge *br, const unsigned char *addr) br 162 net/bridge/br_fdb.c list_for_each_entry(p, &br->port_list, list) { br 172 net/bridge/br_fdb.c list_for_each_entry_continue_reverse(p, &br->port_list, list) { br 183 net/bridge/br_fdb.c static void fdb_del_hw_addr(struct net_bridge *br, const unsigned char *addr) br 189 net/bridge/br_fdb.c list_for_each_entry(p, &br->port_list, list) { br 195 net/bridge/br_fdb.c static void fdb_delete(struct net_bridge *br, struct net_bridge_fdb_entry *f, br 198 net/bridge/br_fdb.c trace_fdb_delete(br, f); br 201 net/bridge/br_fdb.c fdb_del_hw_addr(br, f->key.addr.addr); br 204 net/bridge/br_fdb.c rhashtable_remove_fast(&br->fdb_hash_tbl, &f->rhnode, br 206 net/bridge/br_fdb.c fdb_notify(br, f, RTM_DELNEIGH, swdev_notify); br 211 net/bridge/br_fdb.c static void fdb_delete_local(struct net_bridge *br, br 222 net/bridge/br_fdb.c list_for_each_entry(op, &br->port_list, list) { br 232 net/bridge/br_fdb.c vg = br_vlan_group(br); br 235 net/bridge/br_fdb.c if (p && ether_addr_equal(br->dev->dev_addr, addr) && br 242 net/bridge/br_fdb.c fdb_delete(br, f, true); br 245 net/bridge/br_fdb.c void br_fdb_find_delete_local(struct net_bridge *br, br 251 net/bridge/br_fdb.c spin_lock_bh(&br->hash_lock); br 252 net/bridge/br_fdb.c f = br_fdb_find(br, addr, vid); br 254 net/bridge/br_fdb.c fdb_delete_local(br, p, f); br 255 net/bridge/br_fdb.c spin_unlock_bh(&br->hash_lock); br 262 net/bridge/br_fdb.c struct net_bridge *br = p->br; br 265 net/bridge/br_fdb.c spin_lock_bh(&br->hash_lock); br 267 net/bridge/br_fdb.c hlist_for_each_entry(f, &br->fdb_list, fdb_node) { br 270 net/bridge/br_fdb.c fdb_delete_local(br, p, f); br 283 net/bridge/br_fdb.c fdb_insert(br, p, newaddr, 0); br 293 net/bridge/br_fdb.c fdb_insert(br, p, newaddr, v->vid); br 296 net/bridge/br_fdb.c spin_unlock_bh(&br->hash_lock); br 299 net/bridge/br_fdb.c void br_fdb_change_mac_address(struct net_bridge *br, const u8 *newaddr) br 305 net/bridge/br_fdb.c spin_lock_bh(&br->hash_lock); br 308 net/bridge/br_fdb.c f = br_fdb_find(br, br->dev->dev_addr, 0); br 310 net/bridge/br_fdb.c fdb_delete_local(br, NULL, f); br 312 net/bridge/br_fdb.c fdb_insert(br, NULL, newaddr, 0); br 313 net/bridge/br_fdb.c vg = br_vlan_group(br); br 323 net/bridge/br_fdb.c f = br_fdb_find(br, br->dev->dev_addr, v->vid); br 325 net/bridge/br_fdb.c fdb_delete_local(br, NULL, f); br 326 net/bridge/br_fdb.c fdb_insert(br, NULL, newaddr, v->vid); br 329 net/bridge/br_fdb.c spin_unlock_bh(&br->hash_lock); br 334 net/bridge/br_fdb.c struct net_bridge *br = container_of(work, struct net_bridge, br 337 net/bridge/br_fdb.c unsigned long delay = hold_time(br); br 346 net/bridge/br_fdb.c hlist_for_each_entry_rcu(f, &br->fdb_list, fdb_node) { br 355 net/bridge/br_fdb.c spin_lock_bh(&br->hash_lock); br 357 net/bridge/br_fdb.c fdb_delete(br, f, true); br 358 net/bridge/br_fdb.c spin_unlock_bh(&br->hash_lock); br 365 net/bridge/br_fdb.c mod_delayed_work(system_long_wq, &br->gc_work, work_delay); br 369 net/bridge/br_fdb.c void br_fdb_flush(struct net_bridge *br) br 374 net/bridge/br_fdb.c spin_lock_bh(&br->hash_lock); br 375 net/bridge/br_fdb.c hlist_for_each_entry_safe(f, tmp, &br->fdb_list, fdb_node) { br 377 net/bridge/br_fdb.c fdb_delete(br, f, true); br 379 net/bridge/br_fdb.c spin_unlock_bh(&br->hash_lock); br 386 net/bridge/br_fdb.c void br_fdb_delete_by_port(struct net_bridge *br, br 394 net/bridge/br_fdb.c spin_lock_bh(&br->hash_lock); br 395 net/bridge/br_fdb.c hlist_for_each_entry_safe(f, tmp, &br->fdb_list, fdb_node) { br 404 net/bridge/br_fdb.c fdb_delete_local(br, p, f); br 406 net/bridge/br_fdb.c fdb_delete(br, f, true); br 408 net/bridge/br_fdb.c spin_unlock_bh(&br->hash_lock); br 425 net/bridge/br_fdb.c fdb = br_fdb_find_rcu(port->br, addr, 0); br 439 net/bridge/br_fdb.c int br_fdb_fillbuf(struct net_bridge *br, void *buf, br 449 net/bridge/br_fdb.c hlist_for_each_entry_rcu(f, &br->fdb_list, fdb_node) { br 453 net/bridge/br_fdb.c if (has_expired(br, f)) br 483 net/bridge/br_fdb.c static struct net_bridge_fdb_entry *fdb_create(struct net_bridge *br, br 504 net/bridge/br_fdb.c if (rhashtable_lookup_insert_fast(&br->fdb_hash_tbl, br 510 net/bridge/br_fdb.c hlist_add_head_rcu(&fdb->fdb_node, &br->fdb_list); br 516 net/bridge/br_fdb.c static int fdb_insert(struct net_bridge *br, struct net_bridge_port *source, br 524 net/bridge/br_fdb.c fdb = br_fdb_find(br, addr, vid); br 531 net/bridge/br_fdb.c br_warn(br, "adding interface %s with same address as a received packet (addr:%pM, vlan:%u)\n", br 532 net/bridge/br_fdb.c source ? source->dev->name : br->dev->name, addr, vid); br 533 net/bridge/br_fdb.c fdb_delete(br, fdb, true); br 536 net/bridge/br_fdb.c fdb = fdb_create(br, source, addr, vid, 1, 1); br 540 net/bridge/br_fdb.c fdb_add_hw_addr(br, addr); br 541 net/bridge/br_fdb.c fdb_notify(br, fdb, RTM_NEWNEIGH, true); br 546 net/bridge/br_fdb.c int br_fdb_insert(struct net_bridge *br, struct net_bridge_port *source, br 551 net/bridge/br_fdb.c spin_lock_bh(&br->hash_lock); br 552 net/bridge/br_fdb.c ret = fdb_insert(br, source, addr, vid); br 553 net/bridge/br_fdb.c spin_unlock_bh(&br->hash_lock); br 557 net/bridge/br_fdb.c void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source, br 564 net/bridge/br_fdb.c if (hold_time(br) == 0) br 572 net/bridge/br_fdb.c fdb = fdb_find_rcu(&br->fdb_hash_tbl, addr, vid); br 577 net/bridge/br_fdb.c br_warn(br, "received packet on %s with own address as source address (addr:%pM, vlan:%u)\n", br 595 net/bridge/br_fdb.c trace_br_fdb_update(br, source, addr, vid, added_by_user); br 596 net/bridge/br_fdb.c fdb_notify(br, fdb, RTM_NEWNEIGH, true); br 600 net/bridge/br_fdb.c spin_lock(&br->hash_lock); br 601 net/bridge/br_fdb.c fdb = fdb_create(br, source, addr, vid, 0, 0); br 605 net/bridge/br_fdb.c trace_br_fdb_update(br, source, addr, vid, br 607 net/bridge/br_fdb.c fdb_notify(br, fdb, RTM_NEWNEIGH, true); br 612 net/bridge/br_fdb.c spin_unlock(&br->hash_lock); br 616 net/bridge/br_fdb.c static int fdb_to_nud(const struct net_bridge *br, br 623 net/bridge/br_fdb.c else if (has_expired(br, fdb)) br 629 net/bridge/br_fdb.c static int fdb_fill_info(struct sk_buff *skb, const struct net_bridge *br, br 648 net/bridge/br_fdb.c ndm->ndm_ifindex = fdb->dst ? fdb->dst->dev->ifindex : br->dev->ifindex; br 649 net/bridge/br_fdb.c ndm->ndm_state = fdb_to_nud(br, fdb); br 660 net/bridge/br_fdb.c if (nla_put_u32(skb, NDA_MASTER, br->dev->ifindex)) br 690 net/bridge/br_fdb.c static void fdb_notify(struct net_bridge *br, br 694 net/bridge/br_fdb.c struct net *net = dev_net(br->dev); br 705 net/bridge/br_fdb.c err = fdb_fill_info(skb, br, fdb, 0, 0, type, 0); br 725 net/bridge/br_fdb.c struct net_bridge *br = netdev_priv(dev); br 739 net/bridge/br_fdb.c hlist_for_each_entry_rcu(f, &br->fdb_list, fdb_node) { br 756 net/bridge/br_fdb.c err = fdb_fill_info(skb, br, f, br 778 net/bridge/br_fdb.c struct net_bridge *br = netdev_priv(dev); br 783 net/bridge/br_fdb.c f = br_fdb_find_rcu(br, addr, vid); br 790 net/bridge/br_fdb.c err = fdb_fill_info(skb, br, f, portid, seq, br 798 net/bridge/br_fdb.c static int fdb_add_entry(struct net_bridge *br, struct net_bridge_port *source, br 814 net/bridge/br_fdb.c br->dev->name); br 821 net/bridge/br_fdb.c fdb = br_fdb_find(br, addr, vid); br 826 net/bridge/br_fdb.c fdb = fdb_create(br, source, addr, vid, 0, 0); br 841 net/bridge/br_fdb.c if (fdb_to_nud(br, fdb) != state) { br 846 net/bridge/br_fdb.c fdb_add_hw_addr(br, addr); br 852 net/bridge/br_fdb.c fdb_add_hw_addr(br, addr); br 858 net/bridge/br_fdb.c fdb_del_hw_addr(br, addr); br 875 net/bridge/br_fdb.c fdb_notify(br, fdb, RTM_NEWNEIGH, true); br 881 net/bridge/br_fdb.c static int __br_fdb_add(struct ndmsg *ndm, struct net_bridge *br, br 890 net/bridge/br_fdb.c br->dev->name); br 895 net/bridge/br_fdb.c br_fdb_update(br, p, addr, vid, true); br 899 net/bridge/br_fdb.c err = br_fdb_external_learn_add(br, p, addr, vid, true); br 901 net/bridge/br_fdb.c spin_lock_bh(&br->hash_lock); br 902 net/bridge/br_fdb.c err = fdb_add_entry(br, p, addr, ndm->ndm_state, br 904 net/bridge/br_fdb.c spin_unlock_bh(&br->hash_lock); br 919 net/bridge/br_fdb.c struct net_bridge *br = NULL; br 935 net/bridge/br_fdb.c br = netdev_priv(dev); br 936 net/bridge/br_fdb.c vg = br_vlan_group(br); br 944 net/bridge/br_fdb.c br = p->br; br 956 net/bridge/br_fdb.c err = __br_fdb_add(ndm, br, p, addr, nlh_flags, vid); br 958 net/bridge/br_fdb.c err = __br_fdb_add(ndm, br, p, addr, nlh_flags, 0); br 969 net/bridge/br_fdb.c err = __br_fdb_add(ndm, br, p, addr, nlh_flags, v->vid); br 979 net/bridge/br_fdb.c static int fdb_delete_by_addr_and_port(struct net_bridge *br, br 985 net/bridge/br_fdb.c fdb = br_fdb_find(br, addr, vlan); br 989 net/bridge/br_fdb.c fdb_delete(br, fdb, true); br 994 net/bridge/br_fdb.c static int __br_fdb_delete(struct net_bridge *br, br 1000 net/bridge/br_fdb.c spin_lock_bh(&br->hash_lock); br 1001 net/bridge/br_fdb.c err = fdb_delete_by_addr_and_port(br, p, addr, vid); br 1002 net/bridge/br_fdb.c spin_unlock_bh(&br->hash_lock); br 1015 net/bridge/br_fdb.c struct net_bridge *br; br 1019 net/bridge/br_fdb.c br = netdev_priv(dev); br 1020 net/bridge/br_fdb.c vg = br_vlan_group(br); br 1029 net/bridge/br_fdb.c br = p->br; br 1039 net/bridge/br_fdb.c err = __br_fdb_delete(br, p, addr, vid); br 1042 net/bridge/br_fdb.c err &= __br_fdb_delete(br, p, addr, 0); br 1049 net/bridge/br_fdb.c err &= __br_fdb_delete(br, p, addr, v->vid); br 1056 net/bridge/br_fdb.c int br_fdb_sync_static(struct net_bridge *br, struct net_bridge_port *p) br 1065 net/bridge/br_fdb.c hlist_for_each_entry_rcu(f, &br->fdb_list, fdb_node) { br 1079 net/bridge/br_fdb.c hlist_for_each_entry_rcu(tmp, &br->fdb_list, fdb_node) { br 1091 net/bridge/br_fdb.c void br_fdb_unsync_static(struct net_bridge *br, struct net_bridge_port *p) br 1098 net/bridge/br_fdb.c hlist_for_each_entry_rcu(f, &br->fdb_list, fdb_node) { br 1108 net/bridge/br_fdb.c int br_fdb_external_learn_add(struct net_bridge *br, struct net_bridge_port *p, br 1116 net/bridge/br_fdb.c trace_br_fdb_external_learn_add(br, p, addr, vid); br 1118 net/bridge/br_fdb.c spin_lock_bh(&br->hash_lock); br 1120 net/bridge/br_fdb.c fdb = br_fdb_find(br, addr, vid); br 1122 net/bridge/br_fdb.c fdb = fdb_create(br, p, addr, vid, 0, 0); br 1130 net/bridge/br_fdb.c fdb_notify(br, fdb, RTM_NEWNEIGH, swdev_notify); br 1152 net/bridge/br_fdb.c fdb_notify(br, fdb, RTM_NEWNEIGH, swdev_notify); br 1156 net/bridge/br_fdb.c spin_unlock_bh(&br->hash_lock); br 1161 net/bridge/br_fdb.c int br_fdb_external_learn_del(struct net_bridge *br, struct net_bridge_port *p, br 1168 net/bridge/br_fdb.c spin_lock_bh(&br->hash_lock); br 1170 net/bridge/br_fdb.c fdb = br_fdb_find(br, addr, vid); br 1172 net/bridge/br_fdb.c fdb_delete(br, fdb, swdev_notify); br 1176 net/bridge/br_fdb.c spin_unlock_bh(&br->hash_lock); br 1181 net/bridge/br_fdb.c void br_fdb_offloaded_set(struct net_bridge *br, struct net_bridge_port *p, br 1186 net/bridge/br_fdb.c spin_lock_bh(&br->hash_lock); br 1188 net/bridge/br_fdb.c fdb = br_fdb_find(br, addr, vid); br 1192 net/bridge/br_fdb.c spin_unlock_bh(&br->hash_lock); br 1206 net/bridge/br_fdb.c spin_lock_bh(&p->br->hash_lock); br 1207 net/bridge/br_fdb.c hlist_for_each_entry(f, &p->br->fdb_list, fdb_node) { br 1211 net/bridge/br_fdb.c spin_unlock_bh(&p->br->hash_lock); br 81 net/bridge/br_forward.c skb = br_handle_vlan(to->br, to, vg, skb); br 96 net/bridge/br_forward.c if (unlikely(netpoll_tx_running(to->br->dev))) { br 185 net/bridge/br_forward.c br_multicast_count(p->br, p, skb, igmp_type, BR_MCAST_DIR_TX); br 191 net/bridge/br_forward.c void br_flood(struct net_bridge *br, struct sk_buff *skb, br 197 net/bridge/br_forward.c list_for_each_entry_rcu(p, &br->port_list, list) { br 207 net/bridge/br_forward.c if (!(p->flags & BR_MCAST_FLOOD) && skb->dev != br->dev) br 211 net/bridge/br_forward.c if (!(p->flags & BR_BCAST_FLOOD) && skb->dev != br->dev) br 274 net/bridge/br_forward.c struct net_bridge *br = netdev_priv(dev); br 279 net/bridge/br_forward.c rp = rcu_dereference(hlist_first_rcu(&br->router_list)); br 67 net/bridge/br_if.c struct net_bridge *br = p->br; br 74 net/bridge/br_if.c if (!netif_running(br->dev)) br 77 net/bridge/br_if.c spin_lock_bh(&br->lock); br 89 net/bridge/br_if.c spin_unlock_bh(&br->lock); br 103 net/bridge/br_if.c br_fdb_unsync_static(p->br, p); br 122 net/bridge/br_if.c err = br_fdb_sync_static(p->br, p); br 135 net/bridge/br_if.c void br_manage_promisc(struct net_bridge *br) br 143 net/bridge/br_if.c if ((br->dev->flags & IFF_PROMISC) || !br_vlan_enabled(br->dev)) br 146 net/bridge/br_if.c list_for_each_entry(p, &br->port_list, list) { br 160 net/bridge/br_if.c if (br->auto_cnt == 0 || br 161 net/bridge/br_if.c (br->auto_cnt == 1 && br_auto_port(p))) br 182 net/bridge/br_if.c if (backup_p->br != p->br) br 209 net/bridge/br_if.c list_for_each_entry(cur_p, &p->br->port_list, list) { br 221 net/bridge/br_if.c static void nbp_update_port_count(struct net_bridge *br) br 226 net/bridge/br_if.c list_for_each_entry(p, &br->port_list, list) { br 230 net/bridge/br_if.c if (br->auto_cnt != cnt) { br 231 net/bridge/br_if.c br->auto_cnt = cnt; br 232 net/bridge/br_if.c br_manage_promisc(br); br 246 net/bridge/br_if.c br_fdb_unsync_static(p->br, p); br 275 net/bridge/br_if.c p->br = NULL; br 289 net/bridge/br_if.c static unsigned get_max_headroom(struct net_bridge *br) br 294 net/bridge/br_if.c list_for_each_entry(p, &br->port_list, list) { br 304 net/bridge/br_if.c static void update_headroom(struct net_bridge *br, int new_hr) br 308 net/bridge/br_if.c list_for_each_entry(p, &br->port_list, list) br 311 net/bridge/br_if.c br->dev->needed_headroom = new_hr; br 325 net/bridge/br_if.c struct net_bridge *br = p->br; br 328 net/bridge/br_if.c sysfs_remove_link(br->ifobj, p->dev->name); br 332 net/bridge/br_if.c spin_lock_bh(&br->lock); br 334 net/bridge/br_if.c spin_unlock_bh(&br->lock); br 339 net/bridge/br_if.c if (netdev_get_fwd_headroom(dev) == br->dev->needed_headroom) br 340 net/bridge/br_if.c update_headroom(br, get_max_headroom(br)); br 344 net/bridge/br_if.c br_fdb_delete_by_port(br, p, 0, 1); br 348 net/bridge/br_if.c nbp_update_port_count(br); br 350 net/bridge/br_if.c netdev_upper_dev_unlink(dev, br->dev); br 369 net/bridge/br_if.c struct net_bridge *br = netdev_priv(dev); br 372 net/bridge/br_if.c list_for_each_entry_safe(p, n, &br->port_list, list) { br 376 net/bridge/br_if.c br_recalculate_neigh_suppress_enabled(br); br 378 net/bridge/br_if.c br_fdb_delete_by_port(br, NULL, 0, 1); br 380 net/bridge/br_if.c cancel_delayed_work_sync(&br->gc_work); br 382 net/bridge/br_if.c br_sysfs_delbr(br->dev); br 383 net/bridge/br_if.c unregister_netdevice_queue(br->dev, head); br 387 net/bridge/br_if.c static int find_portno(struct net_bridge *br) br 398 net/bridge/br_if.c list_for_each_entry(p, &br->port_list, list) { br 408 net/bridge/br_if.c static struct net_bridge_port *new_nbp(struct net_bridge *br, br 414 net/bridge/br_if.c index = find_portno(br); br 422 net/bridge/br_if.c p->br = br; br 490 net/bridge/br_if.c static int br_mtu_min(const struct net_bridge *br) br 495 net/bridge/br_if.c list_for_each_entry(p, &br->port_list, list) br 502 net/bridge/br_if.c void br_mtu_auto_adjust(struct net_bridge *br) br 507 net/bridge/br_if.c if (br_opt_get(br, BROPT_MTU_SET_BY_USER)) br 513 net/bridge/br_if.c dev_set_mtu(br->dev, br_mtu_min(br)); br 514 net/bridge/br_if.c br_opt_toggle(br, BROPT_MTU_SET_BY_USER, false); br 517 net/bridge/br_if.c static void br_set_gso_limits(struct net_bridge *br) br 523 net/bridge/br_if.c list_for_each_entry(p, &br->port_list, list) { br 527 net/bridge/br_if.c br->dev->gso_max_size = gso_max_size; br 528 net/bridge/br_if.c br->dev->gso_max_segs = gso_max_segs; br 534 net/bridge/br_if.c netdev_features_t br_features_recompute(struct net_bridge *br, br 540 net/bridge/br_if.c if (list_empty(&br->port_list)) br 546 net/bridge/br_if.c list_for_each_entry(p, &br->port_list, list) { br 556 net/bridge/br_if.c int br_add_if(struct net_bridge *br, struct net_device *dev, br 594 net/bridge/br_if.c p = new_nbp(br, dev); br 625 net/bridge/br_if.c err = netdev_master_upper_dev_link(dev, br->dev, NULL, NULL, extack); br 635 net/bridge/br_if.c list_add_rcu(&p->list, &br->port_list); br 637 net/bridge/br_if.c nbp_update_port_count(br); br 639 net/bridge/br_if.c netdev_update_features(br->dev); br 641 net/bridge/br_if.c br_hr = br->dev->needed_headroom; br 644 net/bridge/br_if.c update_headroom(br, dev_hr); br 648 net/bridge/br_if.c if (br_fdb_insert(br, p, dev->dev_addr, 0)) br 651 net/bridge/br_if.c if (br->dev->addr_assign_type != NET_ADDR_SET) { br 655 net/bridge/br_if.c err = dev_pre_changeaddr_notify(br->dev, dev->dev_addr, extack); br 666 net/bridge/br_if.c spin_lock_bh(&br->lock); br 667 net/bridge/br_if.c changed_addr = br_stp_recalculate_bridge_id(br); br 670 net/bridge/br_if.c (br->dev->flags & IFF_UP)) br 672 net/bridge/br_if.c spin_unlock_bh(&br->lock); br 677 net/bridge/br_if.c call_netdevice_notifiers(NETDEV_CHANGEADDR, br->dev); br 679 net/bridge/br_if.c br_mtu_auto_adjust(br); br 680 net/bridge/br_if.c br_set_gso_limits(br); br 688 net/bridge/br_if.c br_fdb_delete_by_port(br, p, 0, 1); br 689 net/bridge/br_if.c nbp_update_port_count(br); br 691 net/bridge/br_if.c netdev_upper_dev_unlink(dev, br->dev); br 698 net/bridge/br_if.c sysfs_remove_link(br->ifobj, p->dev->name); br 708 net/bridge/br_if.c int br_del_if(struct net_bridge *br, struct net_device *dev) br 714 net/bridge/br_if.c if (!p || p->br != br) br 723 net/bridge/br_if.c br_mtu_auto_adjust(br); br 724 net/bridge/br_if.c br_set_gso_limits(br); br 726 net/bridge/br_if.c spin_lock_bh(&br->lock); br 727 net/bridge/br_if.c changed_addr = br_stp_recalculate_bridge_id(br); br 728 net/bridge/br_if.c spin_unlock_bh(&br->lock); br 731 net/bridge/br_if.c call_netdevice_notifiers(NETDEV_CHANGEADDR, br->dev); br 733 net/bridge/br_if.c netdev_update_features(br->dev); br 740 net/bridge/br_if.c struct net_bridge *br = p->br; br 743 net/bridge/br_if.c nbp_update_port_count(br); br 746 net/bridge/br_if.c br_recalculate_neigh_suppress_enabled(br); br 35 net/bridge/br_input.c struct net_bridge *br = netdev_priv(brdev); br 37 net/bridge/br_input.c struct pcpu_sw_netstats *brstats = this_cpu_ptr(br->stats); br 44 net/bridge/br_input.c vg = br_vlan_group_rcu(br); br 57 net/bridge/br_input.c skb = br_handle_vlan(br, NULL, vg, skb); br 61 net/bridge/br_input.c br_multicast_count(br, NULL, skb, br_multicast_igmp_type(skb), br 77 net/bridge/br_input.c struct net_bridge *br; br 83 net/bridge/br_input.c if (!br_allowed_ingress(p->br, nbp_vlan_group_rcu(p), skb, &vid)) br 89 net/bridge/br_input.c br = p->br; br 91 net/bridge/br_input.c br_fdb_update(br, p, eth_hdr(skb)->h_source, vid, false); br 93 net/bridge/br_input.c local_rcv = !!(br->dev->flags & IFF_PROMISC); br 101 net/bridge/br_input.c if (br_multicast_rcv(br, p, skb, vid)) br 109 net/bridge/br_input.c BR_INPUT_SKB_CB(skb)->brdev = br->dev; br 115 net/bridge/br_input.c br_do_proxy_suppress_arp(skb, br, vid, p); br 118 net/bridge/br_input.c br_opt_get(br, BROPT_NEIGH_SUPPRESS_ENABLED) && br 126 net/bridge/br_input.c br_do_suppress_nd(skb, br, vid, p, msg); br 131 net/bridge/br_input.c mdst = br_mdb_get(br, skb, vid); br 133 net/bridge/br_input.c br_multicast_querier_exists(br, eth_hdr(skb))) { br 135 net/bridge/br_input.c br_multicast_is_router(br)) { br 137 net/bridge/br_input.c br->dev->stats.multicast++; br 142 net/bridge/br_input.c br->dev->stats.multicast++; br 146 net/bridge/br_input.c dst = br_fdb_find_rcu(br, eth_hdr(skb)->h_dest, vid); br 162 net/bridge/br_input.c br_flood(br, skb, pkt_type, local_rcv, false); br 185 net/bridge/br_input.c !br_opt_get(p->br, BROPT_NO_LL_LEARN) && br 187 net/bridge/br_input.c br_fdb_update(p->br, p, eth_hdr(skb)->h_source, vid, false); br 282 net/bridge/br_input.c u16 fwd_mask = p->br->group_fwd_mask_required; br 302 net/bridge/br_input.c if (p->br->stp_enabled == BR_NO_STP || br 313 net/bridge/br_input.c fwd_mask |= p->br->group_fwd_mask; br 322 net/bridge/br_input.c fwd_mask |= p->br->group_fwd_mask; br 345 net/bridge/br_input.c if (ether_addr_equal(p->br->dev->dev_addr, dest)) br 38 net/bridge/br_ioctl.c static void get_port_ifindices(struct net_bridge *br, int *ifindices, int num) br 42 net/bridge/br_ioctl.c list_for_each_entry(p, &br->port_list, list) { br 55 net/bridge/br_ioctl.c static int get_fdb_entries(struct net_bridge *br, void __user *userbuf, br 72 net/bridge/br_ioctl.c num = br_fdb_fillbuf(br, buf, maxnum, offset); br 83 net/bridge/br_ioctl.c static int add_del_if(struct net_bridge *br, int ifindex, int isadd) br 85 net/bridge/br_ioctl.c struct net *net = dev_net(br->dev); br 97 net/bridge/br_ioctl.c ret = br_add_if(br, dev, NULL); br 99 net/bridge/br_ioctl.c ret = br_del_if(br, dev); br 111 net/bridge/br_ioctl.c struct net_bridge *br = netdev_priv(dev); br 122 net/bridge/br_ioctl.c return add_del_if(br, args[1], args[0] == BRCTL_ADD_IF); br 130 net/bridge/br_ioctl.c memcpy(&b.designated_root, &br->designated_root, 8); br 131 net/bridge/br_ioctl.c memcpy(&b.bridge_id, &br->bridge_id, 8); br 132 net/bridge/br_ioctl.c b.root_path_cost = br->root_path_cost; br 133 net/bridge/br_ioctl.c b.max_age = jiffies_to_clock_t(br->max_age); br 134 net/bridge/br_ioctl.c b.hello_time = jiffies_to_clock_t(br->hello_time); br 135 net/bridge/br_ioctl.c b.forward_delay = br->forward_delay; br 136 net/bridge/br_ioctl.c b.bridge_max_age = br->bridge_max_age; br 137 net/bridge/br_ioctl.c b.bridge_hello_time = br->bridge_hello_time; br 138 net/bridge/br_ioctl.c b.bridge_forward_delay = jiffies_to_clock_t(br->bridge_forward_delay); br 139 net/bridge/br_ioctl.c b.topology_change = br->topology_change; br 140 net/bridge/br_ioctl.c b.topology_change_detected = br->topology_change_detected; br 141 net/bridge/br_ioctl.c b.root_port = br->root_port; br 143 net/bridge/br_ioctl.c b.stp_enabled = (br->stp_enabled != BR_NO_STP); br 144 net/bridge/br_ioctl.c b.ageing_time = jiffies_to_clock_t(br->ageing_time); br 145 net/bridge/br_ioctl.c b.hello_timer_value = br_timer_value(&br->hello_timer); br 146 net/bridge/br_ioctl.c b.tcn_timer_value = br_timer_value(&br->tcn_timer); br 147 net/bridge/br_ioctl.c b.topology_change_timer_value = br_timer_value(&br->topology_change_timer); br 148 net/bridge/br_ioctl.c b.gc_timer_value = br_timer_value(&br->gc_work.timer); br 173 net/bridge/br_ioctl.c get_port_ifindices(br, indices, num); br 184 net/bridge/br_ioctl.c ret = br_set_forward_delay(br, args[1]); br 191 net/bridge/br_ioctl.c ret = br_set_hello_time(br, args[1]); br 198 net/bridge/br_ioctl.c ret = br_set_max_age(br, args[1]); br 205 net/bridge/br_ioctl.c ret = br_set_ageing_time(br, args[1]); br 214 net/bridge/br_ioctl.c if ((pt = br_get_port(br, args[2])) == NULL) { br 245 net/bridge/br_ioctl.c br_stp_set_enabled(br, args[1]); br 253 net/bridge/br_ioctl.c br_stp_set_bridge_priority(br, args[1]); br 262 net/bridge/br_ioctl.c spin_lock_bh(&br->lock); br 263 net/bridge/br_ioctl.c if ((p = br_get_port(br, args[1])) == NULL) br 267 net/bridge/br_ioctl.c spin_unlock_bh(&br->lock); br 276 net/bridge/br_ioctl.c spin_lock_bh(&br->lock); br 277 net/bridge/br_ioctl.c if ((p = br_get_port(br, args[1])) == NULL) br 281 net/bridge/br_ioctl.c spin_unlock_bh(&br->lock); br 286 net/bridge/br_ioctl.c return get_fdb_entries(br, (void __user *)args[1], br 294 net/bridge/br_ioctl.c netdev_state_change(br->dev); br 384 net/bridge/br_ioctl.c struct net_bridge *br = netdev_priv(dev); br 392 net/bridge/br_ioctl.c return add_del_if(br, rq->ifr_ifindex, cmd == SIOCBRADDIF); br 396 net/bridge/br_ioctl.c br_debug(br, "Bridge does not support ioctl 0x%x\n", cmd); br 22 net/bridge/br_mdb.c struct net_bridge *br = netdev_priv(dev); br 26 net/bridge/br_mdb.c if (!br->multicast_router || hlist_empty(&br->router_list)) br 33 net/bridge/br_mdb.c hlist_for_each_entry_rcu(p, &br->router_list, rlist) { br 96 net/bridge/br_mdb.c ifindex = mp->br->dev->ifindex; br 131 net/bridge/br_mdb.c struct net_bridge *br = netdev_priv(dev); br 135 net/bridge/br_mdb.c if (!br_opt_get(br, BROPT_MULTICAST_ENABLED)) br 142 net/bridge/br_mdb.c hlist_for_each_entry_rcu(mp, &br->mdb_list, mdb_node) { br 321 net/bridge/br_mdb.c struct net_bridge *br = port->br; br 326 net/bridge/br_mdb.c spin_lock_bh(&br->multicast_lock); br 327 net/bridge/br_mdb.c mp = br_mdb_ip_get(br, &data->ip); br 330 net/bridge/br_mdb.c for (pp = &mp->ports; (p = mlock_dereference(*pp, br)) != NULL; br 337 net/bridge/br_mdb.c spin_unlock_bh(&br->multicast_lock); br 602 net/bridge/br_mdb.c static int br_mdb_add_group(struct net_bridge *br, struct net_bridge_port *port, br 611 net/bridge/br_mdb.c mp = br_mdb_ip_get(br, group); br 613 net/bridge/br_mdb.c mp = br_multicast_new_group(br, group); br 633 net/bridge/br_mdb.c (p = mlock_dereference(*pp, br)) != NULL; br 646 net/bridge/br_mdb.c mod_timer(&p->timer, now + br->multicast_membership_interval); br 651 net/bridge/br_mdb.c static int __br_mdb_add(struct net *net, struct net_bridge *br, br 659 net/bridge/br_mdb.c if (!netif_running(br->dev) || !br_opt_get(br, BROPT_MULTICAST_ENABLED)) br 662 net/bridge/br_mdb.c if (entry->ifindex != br->dev->ifindex) { br 668 net/bridge/br_mdb.c if (!p || p->br != br || p->state == BR_STATE_DISABLED) br 674 net/bridge/br_mdb.c spin_lock_bh(&br->multicast_lock); br 675 net/bridge/br_mdb.c ret = br_mdb_add_group(br, p, &ip, entry->state); br 676 net/bridge/br_mdb.c spin_unlock_bh(&br->multicast_lock); br 689 net/bridge/br_mdb.c struct net_bridge *br; br 696 net/bridge/br_mdb.c br = netdev_priv(dev); br 698 net/bridge/br_mdb.c if (entry->ifindex != br->dev->ifindex) { br 704 net/bridge/br_mdb.c if (!p || p->br != br || p->state == BR_STATE_DISABLED) br 708 net/bridge/br_mdb.c vg = br_vlan_group(br); br 714 net/bridge/br_mdb.c if (br_vlan_enabled(br->dev) && vg && entry->vid == 0) { br 717 net/bridge/br_mdb.c err = __br_mdb_add(net, br, entry); br 723 net/bridge/br_mdb.c err = __br_mdb_add(net, br, entry); br 731 net/bridge/br_mdb.c static int __br_mdb_del(struct net_bridge *br, struct br_mdb_entry *entry) br 739 net/bridge/br_mdb.c if (!netif_running(br->dev) || !br_opt_get(br, BROPT_MULTICAST_ENABLED)) br 744 net/bridge/br_mdb.c spin_lock_bh(&br->multicast_lock); br 745 net/bridge/br_mdb.c mp = br_mdb_ip_get(br, &ip); br 750 net/bridge/br_mdb.c if (entry->ifindex == mp->br->dev->ifindex && mp->host_joined) { br 753 net/bridge/br_mdb.c if (!mp->ports && netif_running(br->dev)) br 759 net/bridge/br_mdb.c (p = mlock_dereference(*pp, br)) != NULL; br 775 net/bridge/br_mdb.c netif_running(br->dev)) br 781 net/bridge/br_mdb.c spin_unlock_bh(&br->multicast_lock); br 794 net/bridge/br_mdb.c struct net_bridge *br; br 801 net/bridge/br_mdb.c br = netdev_priv(dev); br 803 net/bridge/br_mdb.c if (entry->ifindex != br->dev->ifindex) { br 809 net/bridge/br_mdb.c if (!p || p->br != br || p->state == BR_STATE_DISABLED) br 813 net/bridge/br_mdb.c vg = br_vlan_group(br); br 819 net/bridge/br_mdb.c if (br_vlan_enabled(br->dev) && vg && entry->vid == 0) { br 822 net/bridge/br_mdb.c err = __br_mdb_del(br, entry); br 827 net/bridge/br_mdb.c err = __br_mdb_del(br, entry); br 44 net/bridge/br_multicast.c static void br_multicast_start_querier(struct net_bridge *br, br 46 net/bridge/br_multicast.c static void br_multicast_add_router(struct net_bridge *br, br 48 net/bridge/br_multicast.c static void br_ip4_multicast_leave_group(struct net_bridge *br, br 56 net/bridge/br_multicast.c static void br_ip6_multicast_leave_group(struct net_bridge *br, br 62 net/bridge/br_multicast.c static struct net_bridge_mdb_entry *br_mdb_ip_get_rcu(struct net_bridge *br, br 65 net/bridge/br_multicast.c return rhashtable_lookup(&br->mdb_hash_tbl, dst, br_mdb_rht_params); br 68 net/bridge/br_multicast.c struct net_bridge_mdb_entry *br_mdb_ip_get(struct net_bridge *br, br 73 net/bridge/br_multicast.c lockdep_assert_held_once(&br->multicast_lock); br 76 net/bridge/br_multicast.c ent = rhashtable_lookup(&br->mdb_hash_tbl, dst, br_mdb_rht_params); br 82 net/bridge/br_multicast.c static struct net_bridge_mdb_entry *br_mdb_ip4_get(struct net_bridge *br, br 92 net/bridge/br_multicast.c return br_mdb_ip_get(br, &br_dst); br 96 net/bridge/br_multicast.c static struct net_bridge_mdb_entry *br_mdb_ip6_get(struct net_bridge *br, br 107 net/bridge/br_multicast.c return br_mdb_ip_get(br, &br_dst); br 111 net/bridge/br_multicast.c struct net_bridge_mdb_entry *br_mdb_get(struct net_bridge *br, br 116 net/bridge/br_multicast.c if (!br_opt_get(br, BROPT_MULTICAST_ENABLED)) br 139 net/bridge/br_multicast.c return br_mdb_ip_get_rcu(br, &ip); br 145 net/bridge/br_multicast.c struct net_bridge *br = mp->br; br 147 net/bridge/br_multicast.c spin_lock(&br->multicast_lock); br 148 net/bridge/br_multicast.c if (!netif_running(br->dev) || timer_pending(&mp->timer)) br 156 net/bridge/br_multicast.c rhashtable_remove_fast(&br->mdb_hash_tbl, &mp->rhnode, br 163 net/bridge/br_multicast.c spin_unlock(&br->multicast_lock); br 166 net/bridge/br_multicast.c static void br_multicast_del_pg(struct net_bridge *br, br 173 net/bridge/br_multicast.c mp = br_mdb_ip_get(br, &pg->addr); br 178 net/bridge/br_multicast.c (p = mlock_dereference(*pp, br)) != NULL; br 186 net/bridge/br_multicast.c br_mdb_notify(br->dev, p->port, &pg->addr, RTM_DELMDB, br 191 net/bridge/br_multicast.c netif_running(br->dev)) br 203 net/bridge/br_multicast.c struct net_bridge *br = pg->port->br; br 205 net/bridge/br_multicast.c spin_lock(&br->multicast_lock); br 206 net/bridge/br_multicast.c if (!netif_running(br->dev) || timer_pending(&pg->timer) || br 210 net/bridge/br_multicast.c br_multicast_del_pg(br, pg); br 213 net/bridge/br_multicast.c spin_unlock(&br->multicast_lock); br 216 net/bridge/br_multicast.c static struct sk_buff *br_ip4_multicast_alloc_query(struct net_bridge *br, br 228 net/bridge/br_multicast.c if (br->multicast_igmp_version == 3) br 230 net/bridge/br_multicast.c skb = netdev_alloc_skb_ip_align(br->dev, sizeof(*eth) + sizeof(*iph) + br 240 net/bridge/br_multicast.c ether_addr_copy(eth->h_source, br->dev->dev_addr); br 261 net/bridge/br_multicast.c iph->saddr = br_opt_get(br, BROPT_MULTICAST_QUERY_USE_IFADDR) ? br 262 net/bridge/br_multicast.c inet_select_addr(br->dev, 0, RT_SCOPE_LINK) : 0; br 274 net/bridge/br_multicast.c switch (br->multicast_igmp_version) { br 278 net/bridge/br_multicast.c ih->code = (group ? br->multicast_last_member_interval : br 279 net/bridge/br_multicast.c br->multicast_query_response_interval) / br 288 net/bridge/br_multicast.c ihv3->code = (group ? br->multicast_last_member_interval : br 289 net/bridge/br_multicast.c br->multicast_query_response_interval) / br 292 net/bridge/br_multicast.c ihv3->qqic = br->multicast_query_interval / HZ; br 310 net/bridge/br_multicast.c static struct sk_buff *br_ip6_multicast_alloc_query(struct net_bridge *br, br 324 net/bridge/br_multicast.c if (br->multicast_mld_version == 2) br 326 net/bridge/br_multicast.c skb = netdev_alloc_skb_ip_align(br->dev, sizeof(*eth) + sizeof(*ip6h) + br 337 net/bridge/br_multicast.c ether_addr_copy(eth->h_source, br->dev->dev_addr); br 350 net/bridge/br_multicast.c if (ipv6_dev_get_saddr(dev_net(br->dev), br->dev, &ip6h->daddr, 0, br 353 net/bridge/br_multicast.c br_opt_toggle(br, BROPT_HAS_IPV6_ADDR, false); br 357 net/bridge/br_multicast.c br_opt_toggle(br, BROPT_HAS_IPV6_ADDR, true); br 375 net/bridge/br_multicast.c br->multicast_query_response_interval : br 376 net/bridge/br_multicast.c br->multicast_last_member_interval; br 378 net/bridge/br_multicast.c switch (br->multicast_mld_version) { br 404 net/bridge/br_multicast.c mld2q->mld2q_qqic = br->multicast_query_interval / HZ; br 423 net/bridge/br_multicast.c static struct sk_buff *br_multicast_alloc_query(struct net_bridge *br, br 429 net/bridge/br_multicast.c return br_ip4_multicast_alloc_query(br, addr->u.ip4, igmp_type); br 432 net/bridge/br_multicast.c return br_ip6_multicast_alloc_query(br, &addr->u.ip6, br 439 net/bridge/br_multicast.c struct net_bridge_mdb_entry *br_multicast_new_group(struct net_bridge *br, br 445 net/bridge/br_multicast.c mp = br_mdb_ip_get(br, group); br 449 net/bridge/br_multicast.c if (atomic_read(&br->mdb_hash_tbl.nelems) >= br->hash_max) { br 450 net/bridge/br_multicast.c br_opt_toggle(br, BROPT_MULTICAST_ENABLED, false); br 458 net/bridge/br_multicast.c mp->br = br; br 461 net/bridge/br_multicast.c err = rhashtable_lookup_insert_fast(&br->mdb_hash_tbl, &mp->rhnode, br 467 net/bridge/br_multicast.c hlist_add_head_rcu(&mp->mdb_node, &br->mdb_list); br 519 net/bridge/br_multicast.c br_mdb_notify(mp->br->dev, NULL, &mp->addr, br 522 net/bridge/br_multicast.c mod_timer(&mp->timer, jiffies + mp->br->multicast_membership_interval); br 532 net/bridge/br_multicast.c br_mdb_notify(mp->br->dev, NULL, &mp->addr, RTM_DELMDB, 0); br 535 net/bridge/br_multicast.c static int br_multicast_add_group(struct net_bridge *br, br 546 net/bridge/br_multicast.c spin_lock(&br->multicast_lock); br 547 net/bridge/br_multicast.c if (!netif_running(br->dev) || br 551 net/bridge/br_multicast.c mp = br_multicast_new_group(br, group); br 562 net/bridge/br_multicast.c (p = mlock_dereference(*pp, br)) != NULL; br 574 net/bridge/br_multicast.c br_mdb_notify(br->dev, port, group, RTM_NEWMDB, 0); br 577 net/bridge/br_multicast.c mod_timer(&p->timer, now + br->multicast_membership_interval); br 582 net/bridge/br_multicast.c spin_unlock(&br->multicast_lock); br 586 net/bridge/br_multicast.c static int br_ip4_multicast_add_group(struct net_bridge *br, br 602 net/bridge/br_multicast.c return br_multicast_add_group(br, port, &br_group, src); br 606 net/bridge/br_multicast.c static int br_ip6_multicast_add_group(struct net_bridge *br, br 622 net/bridge/br_multicast.c return br_multicast_add_group(br, port, &br_group, src); br 630 net/bridge/br_multicast.c struct net_bridge *br = port->br; br 632 net/bridge/br_multicast.c spin_lock(&br->multicast_lock); br 640 net/bridge/br_multicast.c spin_unlock(&br->multicast_lock); br 658 net/bridge/br_multicast.c struct net_bridge *br = from_timer(br, t, multicast_router_timer); br 660 net/bridge/br_multicast.c spin_lock(&br->multicast_lock); br 661 net/bridge/br_multicast.c if (br->multicast_router == MDB_RTR_TYPE_DISABLED || br 662 net/bridge/br_multicast.c br->multicast_router == MDB_RTR_TYPE_PERM || br 663 net/bridge/br_multicast.c timer_pending(&br->multicast_router_timer)) br 666 net/bridge/br_multicast.c br_mc_router_state_change(br, false); br 668 net/bridge/br_multicast.c spin_unlock(&br->multicast_lock); br 671 net/bridge/br_multicast.c static void br_multicast_querier_expired(struct net_bridge *br, br 674 net/bridge/br_multicast.c spin_lock(&br->multicast_lock); br 675 net/bridge/br_multicast.c if (!netif_running(br->dev) || !br_opt_get(br, BROPT_MULTICAST_ENABLED)) br 678 net/bridge/br_multicast.c br_multicast_start_querier(br, query); br 681 net/bridge/br_multicast.c spin_unlock(&br->multicast_lock); br 686 net/bridge/br_multicast.c struct net_bridge *br = from_timer(br, t, ip4_other_query.timer); br 688 net/bridge/br_multicast.c br_multicast_querier_expired(br, &br->ip4_own_query); br 694 net/bridge/br_multicast.c struct net_bridge *br = from_timer(br, t, ip6_other_query.timer); br 696 net/bridge/br_multicast.c br_multicast_querier_expired(br, &br->ip6_own_query); br 700 net/bridge/br_multicast.c static void br_multicast_select_own_querier(struct net_bridge *br, br 705 net/bridge/br_multicast.c br->ip4_querier.addr.u.ip4 = ip_hdr(skb)->saddr; br 708 net/bridge/br_multicast.c br->ip6_querier.addr.u.ip6 = ipv6_hdr(skb)->saddr; br 712 net/bridge/br_multicast.c static void __br_multicast_send_query(struct net_bridge *br, br 719 net/bridge/br_multicast.c skb = br_multicast_alloc_query(br, ip, &igmp_type); br 725 net/bridge/br_multicast.c br_multicast_count(br, port, skb, igmp_type, br 731 net/bridge/br_multicast.c br_multicast_select_own_querier(br, ip, skb); br 732 net/bridge/br_multicast.c br_multicast_count(br, port, skb, igmp_type, br 738 net/bridge/br_multicast.c static void br_multicast_send_query(struct net_bridge *br, br 746 net/bridge/br_multicast.c if (!netif_running(br->dev) || br 747 net/bridge/br_multicast.c !br_opt_get(br, BROPT_MULTICAST_ENABLED) || br 748 net/bridge/br_multicast.c !br_opt_get(br, BROPT_MULTICAST_QUERIER)) br 754 net/bridge/br_multicast.c (own_query == &br->ip4_own_query)) { br 755 net/bridge/br_multicast.c other_query = &br->ip4_other_query; br 759 net/bridge/br_multicast.c other_query = &br->ip6_other_query; br 767 net/bridge/br_multicast.c __br_multicast_send_query(br, port, &br_group); br 770 net/bridge/br_multicast.c time += own_query->startup_sent < br->multicast_startup_query_count ? br 771 net/bridge/br_multicast.c br->multicast_startup_query_interval : br 772 net/bridge/br_multicast.c br->multicast_query_interval; br 780 net/bridge/br_multicast.c struct net_bridge *br = port->br; br 782 net/bridge/br_multicast.c spin_lock(&br->multicast_lock); br 787 net/bridge/br_multicast.c if (query->startup_sent < br->multicast_startup_query_count) br 790 net/bridge/br_multicast.c br_multicast_send_query(port->br, port, query); br 793 net/bridge/br_multicast.c spin_unlock(&br->multicast_lock); br 837 net/bridge/br_multicast.c br_opt_get(port->br, BROPT_MULTICAST_ENABLED)); br 848 net/bridge/br_multicast.c struct net_bridge *br = port->br; br 853 net/bridge/br_multicast.c spin_lock_bh(&br->multicast_lock); br 855 net/bridge/br_multicast.c br_multicast_del_pg(br, pg); br 856 net/bridge/br_multicast.c spin_unlock_bh(&br->multicast_lock); br 872 net/bridge/br_multicast.c struct net_bridge *br = port->br; br 874 net/bridge/br_multicast.c if (!br_opt_get(br, BROPT_MULTICAST_ENABLED) || !netif_running(br->dev)) br 883 net/bridge/br_multicast.c br_multicast_add_router(br, port); br 888 net/bridge/br_multicast.c struct net_bridge *br = port->br; br 890 net/bridge/br_multicast.c spin_lock(&br->multicast_lock); br 892 net/bridge/br_multicast.c spin_unlock(&br->multicast_lock); br 897 net/bridge/br_multicast.c struct net_bridge *br = port->br; br 901 net/bridge/br_multicast.c spin_lock(&br->multicast_lock); br 904 net/bridge/br_multicast.c br_multicast_del_pg(br, pg); br 913 net/bridge/br_multicast.c spin_unlock(&br->multicast_lock); br 916 net/bridge/br_multicast.c static int br_ip4_multicast_igmp3_report(struct net_bridge *br, br 968 net/bridge/br_multicast.c br_ip4_multicast_leave_group(br, port, group, vid, src); br 970 net/bridge/br_multicast.c err = br_ip4_multicast_add_group(br, port, group, vid, br 981 net/bridge/br_multicast.c static int br_ip6_multicast_mld2_report(struct net_bridge *br, br 1045 net/bridge/br_multicast.c br_ip6_multicast_leave_group(br, port, &grec->grec_mca, br 1048 net/bridge/br_multicast.c err = br_ip6_multicast_add_group(br, port, br 1060 net/bridge/br_multicast.c static bool br_ip4_multicast_select_querier(struct net_bridge *br, br 1064 net/bridge/br_multicast.c if (!timer_pending(&br->ip4_own_query.timer) && br 1065 net/bridge/br_multicast.c !timer_pending(&br->ip4_other_query.timer)) br 1068 net/bridge/br_multicast.c if (!br->ip4_querier.addr.u.ip4) br 1071 net/bridge/br_multicast.c if (ntohl(saddr) <= ntohl(br->ip4_querier.addr.u.ip4)) br 1077 net/bridge/br_multicast.c br->ip4_querier.addr.u.ip4 = saddr; br 1080 net/bridge/br_multicast.c rcu_assign_pointer(br->ip4_querier.port, port); br 1086 net/bridge/br_multicast.c static bool br_ip6_multicast_select_querier(struct net_bridge *br, br 1090 net/bridge/br_multicast.c if (!timer_pending(&br->ip6_own_query.timer) && br 1091 net/bridge/br_multicast.c !timer_pending(&br->ip6_other_query.timer)) br 1094 net/bridge/br_multicast.c if (ipv6_addr_cmp(saddr, &br->ip6_querier.addr.u.ip6) <= 0) br 1100 net/bridge/br_multicast.c br->ip6_querier.addr.u.ip6 = *saddr; br 1103 net/bridge/br_multicast.c rcu_assign_pointer(br->ip6_querier.port, port); br 1109 net/bridge/br_multicast.c static bool br_multicast_select_querier(struct net_bridge *br, br 1115 net/bridge/br_multicast.c return br_ip4_multicast_select_querier(br, port, saddr->u.ip4); br 1118 net/bridge/br_multicast.c return br_ip6_multicast_select_querier(br, port, &saddr->u.ip6); br 1126 net/bridge/br_multicast.c br_multicast_update_query_timer(struct net_bridge *br, br 1133 net/bridge/br_multicast.c mod_timer(&query->timer, jiffies + br->multicast_querier_interval); br 1154 net/bridge/br_multicast.c static void br_multicast_add_router(struct net_bridge *br, br 1163 net/bridge/br_multicast.c hlist_for_each_entry(p, &br->router_list, rlist) { br 1172 net/bridge/br_multicast.c hlist_add_head_rcu(&port->rlist, &br->router_list); br 1173 net/bridge/br_multicast.c br_rtr_notify(br->dev, port, RTM_NEWMDB); br 1177 net/bridge/br_multicast.c static void br_multicast_mark_router(struct net_bridge *br, br 1183 net/bridge/br_multicast.c if (br->multicast_router == MDB_RTR_TYPE_TEMP_QUERY) { br 1184 net/bridge/br_multicast.c if (!timer_pending(&br->multicast_router_timer)) br 1185 net/bridge/br_multicast.c br_mc_router_state_change(br, true); br 1186 net/bridge/br_multicast.c mod_timer(&br->multicast_router_timer, br 1187 net/bridge/br_multicast.c now + br->multicast_querier_interval); br 1196 net/bridge/br_multicast.c br_multicast_add_router(br, port); br 1199 net/bridge/br_multicast.c now + br->multicast_querier_interval); br 1202 net/bridge/br_multicast.c static void br_multicast_query_received(struct net_bridge *br, br 1208 net/bridge/br_multicast.c if (!br_multicast_select_querier(br, port, saddr)) br 1211 net/bridge/br_multicast.c br_multicast_update_query_timer(br, query, max_delay); br 1212 net/bridge/br_multicast.c br_multicast_mark_router(br, port); br 1215 net/bridge/br_multicast.c static void br_ip4_multicast_query(struct net_bridge *br, br 1232 net/bridge/br_multicast.c spin_lock(&br->multicast_lock); br 1233 net/bridge/br_multicast.c if (!netif_running(br->dev) || br 1261 net/bridge/br_multicast.c br_multicast_query_received(br, port, &br->ip4_other_query, br 1266 net/bridge/br_multicast.c mp = br_mdb_ip4_get(br, group, vid); br 1270 net/bridge/br_multicast.c max_delay *= br->multicast_last_member_count; br 1279 net/bridge/br_multicast.c (p = mlock_dereference(*pp, br)) != NULL; br 1288 net/bridge/br_multicast.c spin_unlock(&br->multicast_lock); br 1292 net/bridge/br_multicast.c static int br_ip6_multicast_query(struct net_bridge *br, br 1311 net/bridge/br_multicast.c spin_lock(&br->multicast_lock); br 1312 net/bridge/br_multicast.c if (!netif_running(br->dev) || br 1343 net/bridge/br_multicast.c br_multicast_query_received(br, port, &br->ip6_other_query, br 1350 net/bridge/br_multicast.c mp = br_mdb_ip6_get(br, group, vid); br 1354 net/bridge/br_multicast.c max_delay *= br->multicast_last_member_count; br 1362 net/bridge/br_multicast.c (p = mlock_dereference(*pp, br)) != NULL; br 1371 net/bridge/br_multicast.c spin_unlock(&br->multicast_lock); br 1377 net/bridge/br_multicast.c br_multicast_leave_group(struct net_bridge *br, br 1389 net/bridge/br_multicast.c spin_lock(&br->multicast_lock); br 1390 net/bridge/br_multicast.c if (!netif_running(br->dev) || br 1394 net/bridge/br_multicast.c mp = br_mdb_ip_get(br, group); br 1402 net/bridge/br_multicast.c (p = mlock_dereference(*pp, br)) != NULL; br 1414 net/bridge/br_multicast.c br_mdb_notify(br->dev, port, group, RTM_DELMDB, br 1418 net/bridge/br_multicast.c netif_running(br->dev)) br 1427 net/bridge/br_multicast.c if (br_opt_get(br, BROPT_MULTICAST_QUERIER)) { br 1428 net/bridge/br_multicast.c __br_multicast_send_query(br, port, &mp->addr); br 1430 net/bridge/br_multicast.c time = jiffies + br->multicast_last_member_count * br 1431 net/bridge/br_multicast.c br->multicast_last_member_interval; br 1435 net/bridge/br_multicast.c for (p = mlock_dereference(mp->ports, br); br 1437 net/bridge/br_multicast.c p = mlock_dereference(p->next, br)) { br 1453 net/bridge/br_multicast.c time = now + br->multicast_last_member_count * br 1454 net/bridge/br_multicast.c br->multicast_last_member_interval; br 1467 net/bridge/br_multicast.c for (p = mlock_dereference(mp->ports, br); br 1469 net/bridge/br_multicast.c p = mlock_dereference(p->next, br)) { br 1483 net/bridge/br_multicast.c spin_unlock(&br->multicast_lock); br 1486 net/bridge/br_multicast.c static void br_ip4_multicast_leave_group(struct net_bridge *br, br 1498 net/bridge/br_multicast.c own_query = port ? &port->ip4_own_query : &br->ip4_own_query; br 1505 net/bridge/br_multicast.c br_multicast_leave_group(br, port, &br_group, &br->ip4_other_query, br 1510 net/bridge/br_multicast.c static void br_ip6_multicast_leave_group(struct net_bridge *br, br 1522 net/bridge/br_multicast.c own_query = port ? &port->ip6_own_query : &br->ip6_own_query; br 1529 net/bridge/br_multicast.c br_multicast_leave_group(br, port, &br_group, &br->ip6_other_query, br 1534 net/bridge/br_multicast.c static void br_multicast_err_count(const struct net_bridge *br, br 1541 net/bridge/br_multicast.c if (!br_opt_get(br, BROPT_MULTICAST_STATS_ENABLED)) br 1547 net/bridge/br_multicast.c stats = br->mcast_stats; br 1567 net/bridge/br_multicast.c static void br_multicast_pim(struct net_bridge *br, br 1579 net/bridge/br_multicast.c br_multicast_mark_router(br, port); br 1582 net/bridge/br_multicast.c static int br_ip4_multicast_mrd_rcv(struct net_bridge *br, br 1590 net/bridge/br_multicast.c br_multicast_mark_router(br, port); br 1595 net/bridge/br_multicast.c static int br_multicast_ipv4_rcv(struct net_bridge *br, br 1611 net/bridge/br_multicast.c br_multicast_pim(br, port, skb); br 1613 net/bridge/br_multicast.c br_ip4_multicast_mrd_rcv(br, port, skb); br 1618 net/bridge/br_multicast.c br_multicast_err_count(br, port, skb->protocol); br 1630 net/bridge/br_multicast.c err = br_ip4_multicast_add_group(br, port, ih->group, vid, src); br 1633 net/bridge/br_multicast.c err = br_ip4_multicast_igmp3_report(br, port, skb, vid); br 1636 net/bridge/br_multicast.c br_ip4_multicast_query(br, port, skb, vid); br 1639 net/bridge/br_multicast.c br_ip4_multicast_leave_group(br, port, ih->group, vid, src); br 1643 net/bridge/br_multicast.c br_multicast_count(br, port, skb, BR_INPUT_SKB_CB(skb)->igmp, br 1650 net/bridge/br_multicast.c static int br_ip6_multicast_mrd_rcv(struct net_bridge *br, br 1666 net/bridge/br_multicast.c br_multicast_mark_router(br, port); br 1671 net/bridge/br_multicast.c static int br_multicast_ipv6_rcv(struct net_bridge *br, br 1687 net/bridge/br_multicast.c err = br_ip6_multicast_mrd_rcv(br, port, skb); br 1690 net/bridge/br_multicast.c br_multicast_err_count(br, port, skb->protocol); br 1697 net/bridge/br_multicast.c br_multicast_err_count(br, port, skb->protocol); br 1708 net/bridge/br_multicast.c err = br_ip6_multicast_add_group(br, port, &mld->mld_mca, vid, br 1712 net/bridge/br_multicast.c err = br_ip6_multicast_mld2_report(br, port, skb, vid); br 1715 net/bridge/br_multicast.c err = br_ip6_multicast_query(br, port, skb, vid); br 1719 net/bridge/br_multicast.c br_ip6_multicast_leave_group(br, port, &mld->mld_mca, vid, src); br 1723 net/bridge/br_multicast.c br_multicast_count(br, port, skb, BR_INPUT_SKB_CB(skb)->igmp, br 1730 net/bridge/br_multicast.c int br_multicast_rcv(struct net_bridge *br, struct net_bridge_port *port, br 1738 net/bridge/br_multicast.c if (!br_opt_get(br, BROPT_MULTICAST_ENABLED)) br 1743 net/bridge/br_multicast.c ret = br_multicast_ipv4_rcv(br, port, skb, vid); br 1747 net/bridge/br_multicast.c ret = br_multicast_ipv6_rcv(br, port, skb, vid); br 1755 net/bridge/br_multicast.c static void br_multicast_query_expired(struct net_bridge *br, br 1759 net/bridge/br_multicast.c spin_lock(&br->multicast_lock); br 1760 net/bridge/br_multicast.c if (query->startup_sent < br->multicast_startup_query_count) br 1764 net/bridge/br_multicast.c br_multicast_send_query(br, NULL, query); br 1765 net/bridge/br_multicast.c spin_unlock(&br->multicast_lock); br 1770 net/bridge/br_multicast.c struct net_bridge *br = from_timer(br, t, ip4_own_query.timer); br 1772 net/bridge/br_multicast.c br_multicast_query_expired(br, &br->ip4_own_query, &br->ip4_querier); br 1778 net/bridge/br_multicast.c struct net_bridge *br = from_timer(br, t, ip6_own_query.timer); br 1780 net/bridge/br_multicast.c br_multicast_query_expired(br, &br->ip6_own_query, &br->ip6_querier); br 1784 net/bridge/br_multicast.c void br_multicast_init(struct net_bridge *br) br 1786 net/bridge/br_multicast.c br->hash_max = BR_MULTICAST_DEFAULT_HASH_MAX; br 1788 net/bridge/br_multicast.c br->multicast_router = MDB_RTR_TYPE_TEMP_QUERY; br 1789 net/bridge/br_multicast.c br->multicast_last_member_count = 2; br 1790 net/bridge/br_multicast.c br->multicast_startup_query_count = 2; br 1792 net/bridge/br_multicast.c br->multicast_last_member_interval = HZ; br 1793 net/bridge/br_multicast.c br->multicast_query_response_interval = 10 * HZ; br 1794 net/bridge/br_multicast.c br->multicast_startup_query_interval = 125 * HZ / 4; br 1795 net/bridge/br_multicast.c br->multicast_query_interval = 125 * HZ; br 1796 net/bridge/br_multicast.c br->multicast_querier_interval = 255 * HZ; br 1797 net/bridge/br_multicast.c br->multicast_membership_interval = 260 * HZ; br 1799 net/bridge/br_multicast.c br->ip4_other_query.delay_time = 0; br 1800 net/bridge/br_multicast.c br->ip4_querier.port = NULL; br 1801 net/bridge/br_multicast.c br->multicast_igmp_version = 2; br 1803 net/bridge/br_multicast.c br->multicast_mld_version = 1; br 1804 net/bridge/br_multicast.c br->ip6_other_query.delay_time = 0; br 1805 net/bridge/br_multicast.c br->ip6_querier.port = NULL; br 1807 net/bridge/br_multicast.c br_opt_toggle(br, BROPT_MULTICAST_ENABLED, true); br 1808 net/bridge/br_multicast.c br_opt_toggle(br, BROPT_HAS_IPV6_ADDR, true); br 1810 net/bridge/br_multicast.c spin_lock_init(&br->multicast_lock); br 1811 net/bridge/br_multicast.c timer_setup(&br->multicast_router_timer, br 1813 net/bridge/br_multicast.c timer_setup(&br->ip4_other_query.timer, br 1815 net/bridge/br_multicast.c timer_setup(&br->ip4_own_query.timer, br 1818 net/bridge/br_multicast.c timer_setup(&br->ip6_other_query.timer, br 1820 net/bridge/br_multicast.c timer_setup(&br->ip6_own_query.timer, br 1823 net/bridge/br_multicast.c INIT_HLIST_HEAD(&br->mdb_list); br 1826 net/bridge/br_multicast.c static void br_ip4_multicast_join_snoopers(struct net_bridge *br) br 1828 net/bridge/br_multicast.c struct in_device *in_dev = in_dev_get(br->dev); br 1838 net/bridge/br_multicast.c static void br_ip6_multicast_join_snoopers(struct net_bridge *br) br 1843 net/bridge/br_multicast.c ipv6_dev_mc_inc(br->dev, &addr); br 1846 net/bridge/br_multicast.c static inline void br_ip6_multicast_join_snoopers(struct net_bridge *br) br 1851 net/bridge/br_multicast.c static void br_multicast_join_snoopers(struct net_bridge *br) br 1853 net/bridge/br_multicast.c br_ip4_multicast_join_snoopers(br); br 1854 net/bridge/br_multicast.c br_ip6_multicast_join_snoopers(br); br 1857 net/bridge/br_multicast.c static void br_ip4_multicast_leave_snoopers(struct net_bridge *br) br 1859 net/bridge/br_multicast.c struct in_device *in_dev = in_dev_get(br->dev); br 1869 net/bridge/br_multicast.c static void br_ip6_multicast_leave_snoopers(struct net_bridge *br) br 1874 net/bridge/br_multicast.c ipv6_dev_mc_dec(br->dev, &addr); br 1877 net/bridge/br_multicast.c static inline void br_ip6_multicast_leave_snoopers(struct net_bridge *br) br 1882 net/bridge/br_multicast.c static void br_multicast_leave_snoopers(struct net_bridge *br) br 1884 net/bridge/br_multicast.c br_ip4_multicast_leave_snoopers(br); br 1885 net/bridge/br_multicast.c br_ip6_multicast_leave_snoopers(br); br 1888 net/bridge/br_multicast.c static void __br_multicast_open(struct net_bridge *br, br 1893 net/bridge/br_multicast.c if (!br_opt_get(br, BROPT_MULTICAST_ENABLED)) br 1899 net/bridge/br_multicast.c void br_multicast_open(struct net_bridge *br) br 1901 net/bridge/br_multicast.c if (br_opt_get(br, BROPT_MULTICAST_ENABLED)) br 1902 net/bridge/br_multicast.c br_multicast_join_snoopers(br); br 1904 net/bridge/br_multicast.c __br_multicast_open(br, &br->ip4_own_query); br 1906 net/bridge/br_multicast.c __br_multicast_open(br, &br->ip6_own_query); br 1910 net/bridge/br_multicast.c void br_multicast_stop(struct net_bridge *br) br 1912 net/bridge/br_multicast.c del_timer_sync(&br->multicast_router_timer); br 1913 net/bridge/br_multicast.c del_timer_sync(&br->ip4_other_query.timer); br 1914 net/bridge/br_multicast.c del_timer_sync(&br->ip4_own_query.timer); br 1916 net/bridge/br_multicast.c del_timer_sync(&br->ip6_other_query.timer); br 1917 net/bridge/br_multicast.c del_timer_sync(&br->ip6_own_query.timer); br 1920 net/bridge/br_multicast.c if (br_opt_get(br, BROPT_MULTICAST_ENABLED)) br 1921 net/bridge/br_multicast.c br_multicast_leave_snoopers(br); br 1924 net/bridge/br_multicast.c void br_multicast_dev_del(struct net_bridge *br) br 1929 net/bridge/br_multicast.c spin_lock_bh(&br->multicast_lock); br 1930 net/bridge/br_multicast.c hlist_for_each_entry_safe(mp, tmp, &br->mdb_list, mdb_node) { br 1932 net/bridge/br_multicast.c rhashtable_remove_fast(&br->mdb_hash_tbl, &mp->rhnode, br 1937 net/bridge/br_multicast.c spin_unlock_bh(&br->multicast_lock); br 1942 net/bridge/br_multicast.c int br_multicast_set_router(struct net_bridge *br, unsigned long val) br 1946 net/bridge/br_multicast.c spin_lock_bh(&br->multicast_lock); br 1951 net/bridge/br_multicast.c br_mc_router_state_change(br, val == MDB_RTR_TYPE_PERM); br 1952 net/bridge/br_multicast.c del_timer(&br->multicast_router_timer); br 1953 net/bridge/br_multicast.c br->multicast_router = val; br 1957 net/bridge/br_multicast.c if (br->multicast_router != MDB_RTR_TYPE_TEMP_QUERY) br 1958 net/bridge/br_multicast.c br_mc_router_state_change(br, false); br 1959 net/bridge/br_multicast.c br->multicast_router = val; br 1964 net/bridge/br_multicast.c spin_unlock_bh(&br->multicast_lock); br 1974 net/bridge/br_multicast.c br_rtr_notify(p->br->dev, p, RTM_DELMDB); br 1984 net/bridge/br_multicast.c struct net_bridge *br = p->br; br 1988 net/bridge/br_multicast.c spin_lock(&br->multicast_lock); br 1993 net/bridge/br_multicast.c now + br->multicast_querier_interval); br 2010 net/bridge/br_multicast.c br_multicast_add_router(br, p); br 2014 net/bridge/br_multicast.c br_multicast_mark_router(br, p); br 2021 net/bridge/br_multicast.c spin_unlock(&br->multicast_lock); br 2026 net/bridge/br_multicast.c static void br_multicast_start_querier(struct net_bridge *br, br 2031 net/bridge/br_multicast.c __br_multicast_open(br, query); br 2034 net/bridge/br_multicast.c list_for_each_entry_rcu(port, &br->port_list, list) { br 2039 net/bridge/br_multicast.c if (query == &br->ip4_own_query) br 2049 net/bridge/br_multicast.c int br_multicast_toggle(struct net_bridge *br, unsigned long val) br 2053 net/bridge/br_multicast.c spin_lock_bh(&br->multicast_lock); br 2054 net/bridge/br_multicast.c if (!!br_opt_get(br, BROPT_MULTICAST_ENABLED) == !!val) br 2057 net/bridge/br_multicast.c br_mc_disabled_update(br->dev, val); br 2058 net/bridge/br_multicast.c br_opt_toggle(br, BROPT_MULTICAST_ENABLED, !!val); br 2059 net/bridge/br_multicast.c if (!br_opt_get(br, BROPT_MULTICAST_ENABLED)) { br 2060 net/bridge/br_multicast.c br_multicast_leave_snoopers(br); br 2064 net/bridge/br_multicast.c if (!netif_running(br->dev)) br 2067 net/bridge/br_multicast.c br_multicast_open(br); br 2068 net/bridge/br_multicast.c list_for_each_entry(port, &br->port_list, list) br 2072 net/bridge/br_multicast.c spin_unlock_bh(&br->multicast_lock); br 2079 net/bridge/br_multicast.c struct net_bridge *br = netdev_priv(dev); br 2081 net/bridge/br_multicast.c return !!br_opt_get(br, BROPT_MULTICAST_ENABLED); br 2087 net/bridge/br_multicast.c struct net_bridge *br = netdev_priv(dev); br 2090 net/bridge/br_multicast.c spin_lock_bh(&br->multicast_lock); br 2091 net/bridge/br_multicast.c is_router = br_multicast_is_router(br); br 2092 net/bridge/br_multicast.c spin_unlock_bh(&br->multicast_lock); br 2097 net/bridge/br_multicast.c int br_multicast_set_querier(struct net_bridge *br, unsigned long val) br 2103 net/bridge/br_multicast.c spin_lock_bh(&br->multicast_lock); br 2104 net/bridge/br_multicast.c if (br_opt_get(br, BROPT_MULTICAST_QUERIER) == val) br 2107 net/bridge/br_multicast.c br_opt_toggle(br, BROPT_MULTICAST_QUERIER, !!val); br 2111 net/bridge/br_multicast.c max_delay = br->multicast_query_response_interval; br 2113 net/bridge/br_multicast.c if (!timer_pending(&br->ip4_other_query.timer)) br 2114 net/bridge/br_multicast.c br->ip4_other_query.delay_time = jiffies + max_delay; br 2116 net/bridge/br_multicast.c br_multicast_start_querier(br, &br->ip4_own_query); br 2119 net/bridge/br_multicast.c if (!timer_pending(&br->ip6_other_query.timer)) br 2120 net/bridge/br_multicast.c br->ip6_other_query.delay_time = jiffies + max_delay; br 2122 net/bridge/br_multicast.c br_multicast_start_querier(br, &br->ip6_own_query); br 2126 net/bridge/br_multicast.c spin_unlock_bh(&br->multicast_lock); br 2131 net/bridge/br_multicast.c int br_multicast_set_igmp_version(struct net_bridge *br, unsigned long val) br 2142 net/bridge/br_multicast.c spin_lock_bh(&br->multicast_lock); br 2143 net/bridge/br_multicast.c br->multicast_igmp_version = val; br 2144 net/bridge/br_multicast.c spin_unlock_bh(&br->multicast_lock); br 2150 net/bridge/br_multicast.c int br_multicast_set_mld_version(struct net_bridge *br, unsigned long val) br 2161 net/bridge/br_multicast.c spin_lock_bh(&br->multicast_lock); br 2162 net/bridge/br_multicast.c br->multicast_mld_version = val; br 2163 net/bridge/br_multicast.c spin_unlock_bh(&br->multicast_lock); br 2189 net/bridge/br_multicast.c struct net_bridge *br; br 2200 net/bridge/br_multicast.c if (!port || !port->br) br 2203 net/bridge/br_multicast.c br = port->br; br 2205 net/bridge/br_multicast.c list_for_each_entry_rcu(port, &br->port_list, list) { br 2237 net/bridge/br_multicast.c struct net_bridge *br; br 2247 net/bridge/br_multicast.c if (!port || !port->br) br 2250 net/bridge/br_multicast.c br = port->br; br 2255 net/bridge/br_multicast.c ret = br_multicast_querier_exists(br, ð); br 2274 net/bridge/br_multicast.c struct net_bridge *br; br 2283 net/bridge/br_multicast.c if (!port || !port->br) br 2286 net/bridge/br_multicast.c br = port->br; br 2290 net/bridge/br_multicast.c if (!timer_pending(&br->ip4_other_query.timer) || br 2291 net/bridge/br_multicast.c rcu_dereference(br->ip4_querier.port) == port) br 2296 net/bridge/br_multicast.c if (!timer_pending(&br->ip6_other_query.timer) || br 2297 net/bridge/br_multicast.c rcu_dereference(br->ip6_querier.port) == port) br 2383 net/bridge/br_multicast.c void br_multicast_count(struct net_bridge *br, const struct net_bridge_port *p, br 2389 net/bridge/br_multicast.c if (!type || !br_opt_get(br, BROPT_MULTICAST_STATS_ENABLED)) br 2395 net/bridge/br_multicast.c stats = br->mcast_stats; br 2402 net/bridge/br_multicast.c int br_multicast_init_stats(struct net_bridge *br) br 2404 net/bridge/br_multicast.c br->mcast_stats = netdev_alloc_pcpu_stats(struct bridge_mcast_stats); br 2405 net/bridge/br_multicast.c if (!br->mcast_stats) br 2411 net/bridge/br_multicast.c void br_multicast_uninit_stats(struct net_bridge *br) br 2413 net/bridge/br_multicast.c free_percpu(br->mcast_stats); br 2422 net/bridge/br_multicast.c void br_multicast_get_stats(const struct net_bridge *br, br 2434 net/bridge/br_multicast.c stats = br->mcast_stats; br 2468 net/bridge/br_multicast.c int br_mdb_hash_init(struct net_bridge *br) br 2470 net/bridge/br_multicast.c return rhashtable_init(&br->mdb_hash_tbl, &br_mdb_rht_params); br 2473 net/bridge/br_multicast.c void br_mdb_hash_fini(struct net_bridge *br) br 2475 net/bridge/br_multicast.c rhashtable_destroy(&br->mdb_hash_tbl); br 155 net/bridge/br_netfilter_hooks.c return port ? port->br->dev : NULL; br 431 net/bridge/br_netfilter_hooks.c struct net_device *vlan, *br; br 434 net/bridge/br_netfilter_hooks.c br = bridge_parent(dev); br 437 net/bridge/br_netfilter_hooks.c return br; br 439 net/bridge/br_netfilter_hooks.c vlan = __vlan_find_dev_deep_rcu(br, skb->vlan_proto, br 442 net/bridge/br_netfilter_hooks.c return vlan ? vlan : br; br 481 net/bridge/br_netfilter_hooks.c struct net_bridge *br; br 491 net/bridge/br_netfilter_hooks.c br = p->br; br 497 net/bridge/br_netfilter_hooks.c !br_opt_get(br, BROPT_NF_CALL_IP6TABLES)) br 508 net/bridge/br_netfilter_hooks.c if (!brnet->call_iptables && !br_opt_get(br, BROPT_NF_CALL_IPTABLES)) br 646 net/bridge/br_netfilter_hooks.c struct net_bridge *br; br 653 net/bridge/br_netfilter_hooks.c br = p->br; br 656 net/bridge/br_netfilter_hooks.c if (!brnet->call_arptables && !br_opt_get(br, BROPT_NF_CALL_ARPTABLES)) br 96 net/bridge/br_netlink.c struct net_bridge *br; br 105 net/bridge/br_netlink.c br = netdev_priv(dev); br 106 net/bridge/br_netlink.c vg = br_vlan_group_rcu(br); br 377 net/bridge/br_netlink.c struct net_bridge *br; br 382 net/bridge/br_netlink.c br = port->br; br 384 net/bridge/br_netlink.c br = netdev_priv(dev); br 386 net/bridge/br_netlink.c br_debug(br, "br_fill_info event %d port %s master %s\n", br 387 net/bridge/br_netlink.c event, dev->name, br->dev->name); br 402 net/bridge/br_netlink.c nla_put_u32(skb, IFLA_MASTER, br->dev->ifindex) || br 432 net/bridge/br_netlink.c vg = br_vlan_group_rcu(br); br 466 net/bridge/br_netlink.c void br_ifinfo_notify(int event, const struct net_bridge *br, br 476 net/bridge/br_netlink.c if (WARN_ON(!port && !br)) br 481 net/bridge/br_netlink.c br = port->br; br 484 net/bridge/br_netlink.c dev = br->dev; br 488 net/bridge/br_netlink.c br_debug(br, "port %u(%s) event %d\n", port_no, dev->name, event); br 523 net/bridge/br_netlink.c static int br_vlan_info(struct net_bridge *br, struct net_bridge_port *p, br 540 net/bridge/br_netlink.c err = br_vlan_add(br, vinfo->vid, vinfo->flags, br 553 net/bridge/br_netlink.c !br_vlan_delete(p->br, vinfo->vid)) br 555 net/bridge/br_netlink.c } else if (!br_vlan_delete(br, vinfo->vid)) { br 564 net/bridge/br_netlink.c static int br_process_vlan_info(struct net_bridge *br, br 599 net/bridge/br_netlink.c err = br_vlan_info(br, p, cmd, &tmp_vinfo, changed, br 609 net/bridge/br_netlink.c return br_vlan_info(br, p, cmd, vinfo_curr, changed, extack); br 612 net/bridge/br_netlink.c static int br_afspec(struct net_bridge *br, br 634 net/bridge/br_netlink.c err = br_process_vlan_tunnel_info(br, p, cmd, br 645 net/bridge/br_netlink.c err = br_process_vlan_info(br, p, cmd, vinfo_curr, br 687 net/bridge/br_netlink.c if (p->br->stp_enabled == BR_KERNEL_STP) br 698 net/bridge/br_netlink.c br_port_state_selection(p->br); br 803 net/bridge/br_netlink.c br_fdb_delete_by_port(p->br, p, 0, 0); br 857 net/bridge/br_netlink.c struct net_bridge *br = (struct net_bridge *)netdev_priv(dev); br 886 net/bridge/br_netlink.c spin_lock_bh(&p->br->lock); br 888 net/bridge/br_netlink.c spin_unlock_bh(&p->br->lock); br 894 net/bridge/br_netlink.c spin_lock_bh(&p->br->lock); br 896 net/bridge/br_netlink.c spin_unlock_bh(&p->br->lock); br 904 net/bridge/br_netlink.c err = br_afspec(br, p, afspec, RTM_SETLINK, &changed, extack); br 907 net/bridge/br_netlink.c br_ifinfo_notify(RTM_NEWLINK, br, p); br 915 net/bridge/br_netlink.c struct net_bridge *br = (struct net_bridge *)netdev_priv(dev); br 930 net/bridge/br_netlink.c err = br_afspec(br, p, afspec, RTM_DELLINK, &changed, NULL); br 935 net/bridge/br_netlink.c br_ifinfo_notify(RTM_NEWLINK, br, p); br 981 net/bridge/br_netlink.c struct net_bridge *br = netdev_priv(brdev); br 987 net/bridge/br_netlink.c spin_lock_bh(&br->lock); br 989 net/bridge/br_netlink.c spin_unlock_bh(&br->lock); br 1050 net/bridge/br_netlink.c struct net_bridge *br = netdev_priv(brdev); br 1057 net/bridge/br_netlink.c err = br_set_forward_delay(br, nla_get_u32(data[IFLA_BR_FORWARD_DELAY])); br 1063 net/bridge/br_netlink.c err = br_set_hello_time(br, nla_get_u32(data[IFLA_BR_HELLO_TIME])); br 1069 net/bridge/br_netlink.c err = br_set_max_age(br, nla_get_u32(data[IFLA_BR_MAX_AGE])); br 1075 net/bridge/br_netlink.c err = br_set_ageing_time(br, nla_get_u32(data[IFLA_BR_AGEING_TIME])); br 1083 net/bridge/br_netlink.c br_stp_set_enabled(br, stp_enabled); br 1089 net/bridge/br_netlink.c br_stp_set_bridge_priority(br, priority); br 1095 net/bridge/br_netlink.c err = __br_vlan_filter_toggle(br, vlan_filter); br 1104 net/bridge/br_netlink.c err = __br_vlan_set_proto(br, vlan_proto); br 1112 net/bridge/br_netlink.c err = __br_vlan_set_default_pvid(br, defpvid, extack); br 1120 net/bridge/br_netlink.c err = br_vlan_set_stats(br, vlan_stats); br 1128 net/bridge/br_netlink.c err = br_vlan_set_stats_per_port(br, per_port); br 1139 net/bridge/br_netlink.c br->group_fwd_mask = fwd_mask; br 1154 net/bridge/br_netlink.c spin_lock_bh(&br->lock); br 1155 net/bridge/br_netlink.c memcpy(br->group_addr, new_addr, sizeof(br->group_addr)); br 1156 net/bridge/br_netlink.c spin_unlock_bh(&br->lock); br 1157 net/bridge/br_netlink.c br_opt_toggle(br, BROPT_GROUP_ADDR_SET, true); br 1158 net/bridge/br_netlink.c br_recalculate_fwd_mask(br); br 1162 net/bridge/br_netlink.c br_fdb_flush(br); br 1168 net/bridge/br_netlink.c err = br_multicast_set_router(br, multicast_router); br 1176 net/bridge/br_netlink.c br_multicast_toggle(br, mcast_snooping); br 1183 net/bridge/br_netlink.c br_opt_toggle(br, BROPT_MULTICAST_QUERY_USE_IFADDR, !!val); br 1189 net/bridge/br_netlink.c err = br_multicast_set_querier(br, mcast_querier); br 1195 net/bridge/br_netlink.c br_warn(br, "the hash_elasticity option has been deprecated and is always %u\n", br 1199 net/bridge/br_netlink.c br->hash_max = nla_get_u32(data[IFLA_BR_MCAST_HASH_MAX]); br 1204 net/bridge/br_netlink.c br->multicast_last_member_count = val; br 1210 net/bridge/br_netlink.c br->multicast_startup_query_count = val; br 1216 net/bridge/br_netlink.c br->multicast_last_member_interval = clock_t_to_jiffies(val); br 1222 net/bridge/br_netlink.c br->multicast_membership_interval = clock_t_to_jiffies(val); br 1228 net/bridge/br_netlink.c br->multicast_querier_interval = clock_t_to_jiffies(val); br 1234 net/bridge/br_netlink.c br->multicast_query_interval = clock_t_to_jiffies(val); br 1240 net/bridge/br_netlink.c br->multicast_query_response_interval = clock_t_to_jiffies(val); br 1246 net/bridge/br_netlink.c br->multicast_startup_query_interval = clock_t_to_jiffies(val); br 1253 net/bridge/br_netlink.c br_opt_toggle(br, BROPT_MULTICAST_STATS_ENABLED, !!mcast_stats); br 1260 net/bridge/br_netlink.c err = br_multicast_set_igmp_version(br, igmp_version); br 1270 net/bridge/br_netlink.c err = br_multicast_set_mld_version(br, mld_version); br 1280 net/bridge/br_netlink.c br_opt_toggle(br, BROPT_NF_CALL_IPTABLES, !!val); br 1286 net/bridge/br_netlink.c br_opt_toggle(br, BROPT_NF_CALL_IP6TABLES, !!val); br 1292 net/bridge/br_netlink.c br_opt_toggle(br, BROPT_NF_CALL_ARPTABLES, !!val); br 1300 net/bridge/br_netlink.c err = br_boolopt_multi_toggle(br, bm, extack); br 1312 net/bridge/br_netlink.c struct net_bridge *br = netdev_priv(dev); br 1320 net/bridge/br_netlink.c spin_lock_bh(&br->lock); br 1321 net/bridge/br_netlink.c br_stp_change_bridge_id(br, nla_data(tb[IFLA_ADDRESS])); br 1322 net/bridge/br_netlink.c spin_unlock_bh(&br->lock); br 1389 net/bridge/br_netlink.c struct net_bridge *br = netdev_priv(brdev); br 1390 net/bridge/br_netlink.c u32 forward_delay = jiffies_to_clock_t(br->forward_delay); br 1391 net/bridge/br_netlink.c u32 hello_time = jiffies_to_clock_t(br->hello_time); br 1392 net/bridge/br_netlink.c u32 age_time = jiffies_to_clock_t(br->max_age); br 1393 net/bridge/br_netlink.c u32 ageing_time = jiffies_to_clock_t(br->ageing_time); br 1394 net/bridge/br_netlink.c u32 stp_enabled = br->stp_enabled; br 1395 net/bridge/br_netlink.c u16 priority = (br->bridge_id.prio[0] << 8) | br->bridge_id.prio[1]; br 1396 net/bridge/br_netlink.c u8 vlan_enabled = br_vlan_enabled(br->dev); br 1400 net/bridge/br_netlink.c clockval = br_timer_value(&br->hello_timer); br 1403 net/bridge/br_netlink.c clockval = br_timer_value(&br->tcn_timer); br 1406 net/bridge/br_netlink.c clockval = br_timer_value(&br->topology_change_timer); br 1410 net/bridge/br_netlink.c clockval = br_timer_value(&br->gc_work.timer); br 1414 net/bridge/br_netlink.c br_boolopt_multi_get(br, &bm); br 1422 net/bridge/br_netlink.c nla_put_u16(skb, IFLA_BR_GROUP_FWD_MASK, br->group_fwd_mask) || br 1424 net/bridge/br_netlink.c &br->bridge_id) || br 1426 net/bridge/br_netlink.c &br->designated_root) || br 1427 net/bridge/br_netlink.c nla_put_u16(skb, IFLA_BR_ROOT_PORT, br->root_port) || br 1428 net/bridge/br_netlink.c nla_put_u32(skb, IFLA_BR_ROOT_PATH_COST, br->root_path_cost) || br 1429 net/bridge/br_netlink.c nla_put_u8(skb, IFLA_BR_TOPOLOGY_CHANGE, br->topology_change) || br 1431 net/bridge/br_netlink.c br->topology_change_detected) || br 1432 net/bridge/br_netlink.c nla_put(skb, IFLA_BR_GROUP_ADDR, ETH_ALEN, br->group_addr) || br 1437 net/bridge/br_netlink.c if (nla_put_be16(skb, IFLA_BR_VLAN_PROTOCOL, br->vlan_proto) || br 1438 net/bridge/br_netlink.c nla_put_u16(skb, IFLA_BR_VLAN_DEFAULT_PVID, br->default_pvid) || br 1440 net/bridge/br_netlink.c br_opt_get(br, BROPT_VLAN_STATS_ENABLED)) || br 1442 net/bridge/br_netlink.c br_opt_get(br, BROPT_VLAN_STATS_PER_PORT))) br 1446 net/bridge/br_netlink.c if (nla_put_u8(skb, IFLA_BR_MCAST_ROUTER, br->multicast_router) || br 1448 net/bridge/br_netlink.c br_opt_get(br, BROPT_MULTICAST_ENABLED)) || br 1450 net/bridge/br_netlink.c br_opt_get(br, BROPT_MULTICAST_QUERY_USE_IFADDR)) || br 1452 net/bridge/br_netlink.c br_opt_get(br, BROPT_MULTICAST_QUERIER)) || br 1454 net/bridge/br_netlink.c br_opt_get(br, BROPT_MULTICAST_STATS_ENABLED)) || br 1456 net/bridge/br_netlink.c nla_put_u32(skb, IFLA_BR_MCAST_HASH_MAX, br->hash_max) || br 1458 net/bridge/br_netlink.c br->multicast_last_member_count) || br 1460 net/bridge/br_netlink.c br->multicast_startup_query_count) || br 1462 net/bridge/br_netlink.c br->multicast_igmp_version)) br 1466 net/bridge/br_netlink.c br->multicast_mld_version)) br 1469 net/bridge/br_netlink.c clockval = jiffies_to_clock_t(br->multicast_last_member_interval); br 1473 net/bridge/br_netlink.c clockval = jiffies_to_clock_t(br->multicast_membership_interval); br 1477 net/bridge/br_netlink.c clockval = jiffies_to_clock_t(br->multicast_querier_interval); br 1481 net/bridge/br_netlink.c clockval = jiffies_to_clock_t(br->multicast_query_interval); br 1485 net/bridge/br_netlink.c clockval = jiffies_to_clock_t(br->multicast_query_response_interval); br 1489 net/bridge/br_netlink.c clockval = jiffies_to_clock_t(br->multicast_startup_query_interval); br 1496 net/bridge/br_netlink.c br_opt_get(br, BROPT_NF_CALL_IPTABLES) ? 1 : 0) || br 1498 net/bridge/br_netlink.c br_opt_get(br, BROPT_NF_CALL_IP6TABLES) ? 1 : 0) || br 1500 net/bridge/br_netlink.c br_opt_get(br, BROPT_NF_CALL_ARPTABLES) ? 1 : 0)) br 1512 net/bridge/br_netlink.c struct net_bridge *br; br 1517 net/bridge/br_netlink.c br = netdev_priv(dev); br 1518 net/bridge/br_netlink.c vg = br_vlan_group(br); br 1524 net/bridge/br_netlink.c br = p->br; br 1550 net/bridge/br_netlink.c struct net_bridge *br; br 1556 net/bridge/br_netlink.c br = netdev_priv(dev); br 1557 net/bridge/br_netlink.c vg = br_vlan_group(br); br 1563 net/bridge/br_netlink.c br = p->br; br 1607 net/bridge/br_netlink.c br_multicast_get_stats(br, p, nla_data(nla)); br 253 net/bridge/br_netlink_tunnel.c int br_process_vlan_tunnel_info(struct net_bridge *br, br 72 net/bridge/br_nf_core.c void br_netfilter_rtable_init(struct net_bridge *br) br 74 net/bridge/br_nf_core.c struct rtable *rt = &br->fake_rtable; br 77 net/bridge/br_nf_core.c rt->dst.dev = br->dev; br 138 net/bridge/br_private.h struct net_bridge *br; br 217 net/bridge/br_private.h struct net_bridge *br; br 227 net/bridge/br_private.h struct net_bridge *br; br 452 net/bridge/br_private.h #define br_printk(level, br, format, args...) \ br 453 net/bridge/br_private.h printk(level "%s: " format, (br)->dev->name, ##args) br 464 net/bridge/br_private.h #define br_debug(br, format, args...) \ br 465 net/bridge/br_private.h pr_debug("%s: " format, (br)->dev->name, ##args) br 468 net/bridge/br_private.h static inline int br_is_root_bridge(const struct net_bridge *br) br 470 net/bridge/br_private.h return !memcmp(&br->bridge_id, &br->designated_root, 8); br 498 net/bridge/br_private.h static inline int br_opt_get(const struct net_bridge *br, br 501 net/bridge/br_private.h return test_bit(opt, &br->options); br 504 net/bridge/br_private.h int br_boolopt_toggle(struct net_bridge *br, enum br_boolopt_id opt, bool on, br 506 net/bridge/br_private.h int br_boolopt_get(const struct net_bridge *br, enum br_boolopt_id opt); br 507 net/bridge/br_private.h int br_boolopt_multi_toggle(struct net_bridge *br, br 510 net/bridge/br_private.h void br_boolopt_multi_get(const struct net_bridge *br, br 512 net/bridge/br_private.h void br_opt_toggle(struct net_bridge *br, enum net_bridge_opts opt, bool on); br 549 net/bridge/br_private.h int br_fdb_hash_init(struct net_bridge *br); br 550 net/bridge/br_private.h void br_fdb_hash_fini(struct net_bridge *br); br 551 net/bridge/br_private.h void br_fdb_flush(struct net_bridge *br); br 552 net/bridge/br_private.h void br_fdb_find_delete_local(struct net_bridge *br, br 556 net/bridge/br_private.h void br_fdb_change_mac_address(struct net_bridge *br, const u8 *newaddr); br 558 net/bridge/br_private.h void br_fdb_delete_by_port(struct net_bridge *br, br 560 net/bridge/br_private.h struct net_bridge_fdb_entry *br_fdb_find_rcu(struct net_bridge *br, br 564 net/bridge/br_private.h int br_fdb_fillbuf(struct net_bridge *br, void *buf, unsigned long count, br 566 net/bridge/br_private.h int br_fdb_insert(struct net_bridge *br, struct net_bridge_port *source, br 568 net/bridge/br_private.h void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source, br 581 net/bridge/br_private.h int br_fdb_sync_static(struct net_bridge *br, struct net_bridge_port *p); br 582 net/bridge/br_private.h void br_fdb_unsync_static(struct net_bridge *br, struct net_bridge_port *p); br 583 net/bridge/br_private.h int br_fdb_external_learn_add(struct net_bridge *br, struct net_bridge_port *p, br 586 net/bridge/br_private.h int br_fdb_external_learn_del(struct net_bridge *br, struct net_bridge_port *p, br 589 net/bridge/br_private.h void br_fdb_offloaded_set(struct net_bridge *br, struct net_bridge_port *p, br 602 net/bridge/br_private.h void br_flood(struct net_bridge *br, struct sk_buff *skb, br 617 net/bridge/br_private.h int br_add_if(struct net_bridge *br, struct net_device *dev, br 619 net/bridge/br_private.h int br_del_if(struct net_bridge *br, struct net_device *dev); br 620 net/bridge/br_private.h void br_mtu_auto_adjust(struct net_bridge *br); br 621 net/bridge/br_private.h netdev_features_t br_features_recompute(struct net_bridge *br, br 624 net/bridge/br_private.h void br_manage_promisc(struct net_bridge *br); br 659 net/bridge/br_private.h int br_multicast_rcv(struct net_bridge *br, struct net_bridge_port *port, br 661 net/bridge/br_private.h struct net_bridge_mdb_entry *br_mdb_get(struct net_bridge *br, br 667 net/bridge/br_private.h void br_multicast_init(struct net_bridge *br); br 668 net/bridge/br_private.h void br_multicast_open(struct net_bridge *br); br 669 net/bridge/br_private.h void br_multicast_stop(struct net_bridge *br); br 670 net/bridge/br_private.h void br_multicast_dev_del(struct net_bridge *br); br 673 net/bridge/br_private.h int br_multicast_set_router(struct net_bridge *br, unsigned long val); br 675 net/bridge/br_private.h int br_multicast_toggle(struct net_bridge *br, unsigned long val); br 676 net/bridge/br_private.h int br_multicast_set_querier(struct net_bridge *br, unsigned long val); br 677 net/bridge/br_private.h int br_multicast_set_hash_max(struct net_bridge *br, unsigned long val); br 678 net/bridge/br_private.h int br_multicast_set_igmp_version(struct net_bridge *br, unsigned long val); br 680 net/bridge/br_private.h int br_multicast_set_mld_version(struct net_bridge *br, unsigned long val); br 683 net/bridge/br_private.h br_mdb_ip_get(struct net_bridge *br, struct br_ip *dst); br 685 net/bridge/br_private.h br_multicast_new_group(struct net_bridge *br, struct br_ip *group); br 690 net/bridge/br_private.h int br_mdb_hash_init(struct net_bridge *br); br 691 net/bridge/br_private.h void br_mdb_hash_fini(struct net_bridge *br); br 696 net/bridge/br_private.h void br_multicast_count(struct net_bridge *br, const struct net_bridge_port *p, br 698 net/bridge/br_private.h int br_multicast_init_stats(struct net_bridge *br); br 699 net/bridge/br_private.h void br_multicast_uninit_stats(struct net_bridge *br); br 700 net/bridge/br_private.h void br_multicast_get_stats(const struct net_bridge *br, br 708 net/bridge/br_private.h #define mlock_dereference(X, br) \ br 709 net/bridge/br_private.h rcu_dereference_protected(X, lockdep_is_held(&br->multicast_lock)) br 711 net/bridge/br_private.h static inline bool br_multicast_is_router(struct net_bridge *br) br 713 net/bridge/br_private.h return br->multicast_router == 2 || br 714 net/bridge/br_private.h (br->multicast_router == 1 && br 715 net/bridge/br_private.h timer_pending(&br->multicast_router_timer)); br 719 net/bridge/br_private.h __br_multicast_querier_exists(struct net_bridge *br, br 725 net/bridge/br_private.h if (br_opt_get(br, BROPT_MULTICAST_QUERIER)) { br 726 net/bridge/br_private.h if (is_ipv6 && !br_opt_get(br, BROPT_HAS_IPV6_ADDR)) br 738 net/bridge/br_private.h static inline bool br_multicast_querier_exists(struct net_bridge *br, br 743 net/bridge/br_private.h return __br_multicast_querier_exists(br, br 744 net/bridge/br_private.h &br->ip4_other_query, false); br 747 net/bridge/br_private.h return __br_multicast_querier_exists(br, br 748 net/bridge/br_private.h &br->ip6_other_query, true); br 760 net/bridge/br_private.h static inline int br_multicast_rcv(struct net_bridge *br, br 768 net/bridge/br_private.h static inline struct net_bridge_mdb_entry *br_mdb_get(struct net_bridge *br, br 791 net/bridge/br_private.h static inline void br_multicast_init(struct net_bridge *br) br 795 net/bridge/br_private.h static inline void br_multicast_open(struct net_bridge *br) br 799 net/bridge/br_private.h static inline void br_multicast_stop(struct net_bridge *br) br 803 net/bridge/br_private.h static inline void br_multicast_dev_del(struct net_bridge *br) br 813 net/bridge/br_private.h static inline bool br_multicast_is_router(struct net_bridge *br) br 818 net/bridge/br_private.h static inline bool br_multicast_querier_exists(struct net_bridge *br, br 832 net/bridge/br_private.h static inline int br_mdb_hash_init(struct net_bridge *br) br 837 net/bridge/br_private.h static inline void br_mdb_hash_fini(struct net_bridge *br) br 841 net/bridge/br_private.h static inline void br_multicast_count(struct net_bridge *br, br 848 net/bridge/br_private.h static inline int br_multicast_init_stats(struct net_bridge *br) br 853 net/bridge/br_private.h static inline void br_multicast_uninit_stats(struct net_bridge *br) br 865 net/bridge/br_private.h bool br_allowed_ingress(const struct net_bridge *br, br 871 net/bridge/br_private.h struct sk_buff *br_handle_vlan(struct net_bridge *br, br 875 net/bridge/br_private.h int br_vlan_add(struct net_bridge *br, u16 vid, u16 flags, br 877 net/bridge/br_private.h int br_vlan_delete(struct net_bridge *br, u16 vid); br 878 net/bridge/br_private.h void br_vlan_flush(struct net_bridge *br); br 880 net/bridge/br_private.h void br_recalculate_fwd_mask(struct net_bridge *br); br 881 net/bridge/br_private.h int __br_vlan_filter_toggle(struct net_bridge *br, unsigned long val); br 882 net/bridge/br_private.h int br_vlan_filter_toggle(struct net_bridge *br, unsigned long val); br 883 net/bridge/br_private.h int __br_vlan_set_proto(struct net_bridge *br, __be16 proto); br 884 net/bridge/br_private.h int br_vlan_set_proto(struct net_bridge *br, unsigned long val); br 885 net/bridge/br_private.h int br_vlan_set_stats(struct net_bridge *br, unsigned long val); br 886 net/bridge/br_private.h int br_vlan_set_stats_per_port(struct net_bridge *br, unsigned long val); br 887 net/bridge/br_private.h int br_vlan_init(struct net_bridge *br); br 888 net/bridge/br_private.h int br_vlan_set_default_pvid(struct net_bridge *br, unsigned long val); br 889 net/bridge/br_private.h int __br_vlan_set_default_pvid(struct net_bridge *br, u16 pvid, br 904 net/bridge/br_private.h const struct net_bridge *br) br 906 net/bridge/br_private.h return rtnl_dereference(br->vlgrp); br 916 net/bridge/br_private.h const struct net_bridge *br) br 918 net/bridge/br_private.h return rcu_dereference(br->vlgrp); br 954 net/bridge/br_private.h static inline bool br_allowed_ingress(const struct net_bridge *br, br 974 net/bridge/br_private.h static inline struct sk_buff *br_handle_vlan(struct net_bridge *br, br 982 net/bridge/br_private.h static inline int br_vlan_add(struct net_bridge *br, u16 vid, u16 flags, br 989 net/bridge/br_private.h static inline int br_vlan_delete(struct net_bridge *br, u16 vid) br 994 net/bridge/br_private.h static inline void br_vlan_flush(struct net_bridge *br) br 998 net/bridge/br_private.h static inline void br_recalculate_fwd_mask(struct net_bridge *br) br 1002 net/bridge/br_private.h static inline int br_vlan_init(struct net_bridge *br) br 1045 net/bridge/br_private.h static inline int __br_vlan_filter_toggle(struct net_bridge *br, br 1058 net/bridge/br_private.h const struct net_bridge *br) br 1070 net/bridge/br_private.h const struct net_bridge *br) br 1116 net/bridge/br_private.h struct net_bridge_port *br_get_port(struct net_bridge *br, u16 port_no); br 1120 net/bridge/br_private.h void __br_set_forward_delay(struct net_bridge *br, unsigned long t); br 1121 net/bridge/br_private.h int br_set_forward_delay(struct net_bridge *br, unsigned long x); br 1122 net/bridge/br_private.h int br_set_hello_time(struct net_bridge *br, unsigned long x); br 1123 net/bridge/br_private.h int br_set_max_age(struct net_bridge *br, unsigned long x); br 1125 net/bridge/br_private.h int br_set_ageing_time(struct net_bridge *br, clock_t ageing_time); br 1129 net/bridge/br_private.h void br_stp_enable_bridge(struct net_bridge *br); br 1130 net/bridge/br_private.h void br_stp_disable_bridge(struct net_bridge *br); br 1131 net/bridge/br_private.h void br_stp_set_enabled(struct net_bridge *br, unsigned long val); br 1134 net/bridge/br_private.h bool br_stp_recalculate_bridge_id(struct net_bridge *br); br 1135 net/bridge/br_private.h void br_stp_change_bridge_id(struct net_bridge *br, const unsigned char *a); br 1136 net/bridge/br_private.h void br_stp_set_bridge_priority(struct net_bridge *br, u16 newprio); br 1147 net/bridge/br_private.h void br_stp_timer_init(struct net_bridge *br); br 1160 net/bridge/br_private.h void br_ifinfo_notify(int event, const struct net_bridge *br, br 1253 net/bridge/br_private.h void br_recalculate_neigh_suppress_enabled(struct net_bridge *br); br 1254 net/bridge/br_private.h void br_do_proxy_suppress_arp(struct sk_buff *skb, struct net_bridge *br, br 1256 net/bridge/br_private.h void br_do_suppress_nd(struct sk_buff *skb, struct net_bridge *br, br 44 net/bridge/br_private_stp.h return !memcmp(&p->designated_bridge, &p->br->bridge_id, 8) && br 50 net/bridge/br_private_stp.h void br_become_root_bridge(struct net_bridge *br); br 58 net/bridge/br_private_stp.h void br_transmit_tcn(struct net_bridge *br); br 59 net/bridge/br_private_stp.h void br_topology_change_detection(struct net_bridge *br); br 60 net/bridge/br_private_stp.h void __br_set_topology_change(struct net_bridge *br, unsigned char val); br 21 net/bridge/br_private_tunnel.h int br_process_vlan_tunnel_info(struct net_bridge *br, br 42 net/bridge/br_stp.c br_warn(p->br, "error setting offload STP state on port %u(%s)\n", br 45 net/bridge/br_stp.c br_info(p->br, "port %u(%s) entered %s state\n", br 51 net/bridge/br_stp.c struct net_bridge_port *br_get_port(struct net_bridge *br, u16 port_no) br 55 net/bridge/br_stp.c list_for_each_entry_rcu(p, &br->port_list, list) { br 67 net/bridge/br_stp.c struct net_bridge *br; br 71 net/bridge/br_stp.c br = p->br; br 76 net/bridge/br_stp.c if (memcmp(&br->bridge_id, &p->designated_root, 8) <= 0) br 82 net/bridge/br_stp.c rp = br_get_port(br, root_port); br 114 net/bridge/br_stp.c static void br_root_port_block(const struct net_bridge *br, br 118 net/bridge/br_stp.c br_notice(br, "port %u(%s) tried to become root port (blocked)", br 124 net/bridge/br_stp.c if (br->forward_delay > 0) br 125 net/bridge/br_stp.c mod_timer(&p->forward_delay_timer, jiffies + br->forward_delay); br 129 net/bridge/br_stp.c static void br_root_selection(struct net_bridge *br) br 134 net/bridge/br_stp.c list_for_each_entry(p, &br->port_list, list) { br 139 net/bridge/br_stp.c br_root_port_block(br, p); br 144 net/bridge/br_stp.c br->root_port = root_port; br 147 net/bridge/br_stp.c br->designated_root = br->bridge_id; br 148 net/bridge/br_stp.c br->root_path_cost = 0; br 150 net/bridge/br_stp.c p = br_get_port(br, root_port); br 151 net/bridge/br_stp.c br->designated_root = p->designated_root; br 152 net/bridge/br_stp.c br->root_path_cost = p->designated_cost + p->path_cost; br 157 net/bridge/br_stp.c void br_become_root_bridge(struct net_bridge *br) br 159 net/bridge/br_stp.c br->max_age = br->bridge_max_age; br 160 net/bridge/br_stp.c br->hello_time = br->bridge_hello_time; br 161 net/bridge/br_stp.c br->forward_delay = br->bridge_forward_delay; br 162 net/bridge/br_stp.c br_topology_change_detection(br); br 163 net/bridge/br_stp.c del_timer(&br->tcn_timer); br 165 net/bridge/br_stp.c if (br->dev->flags & IFF_UP) { br 166 net/bridge/br_stp.c br_config_bpdu_generation(br); br 167 net/bridge/br_stp.c mod_timer(&br->hello_timer, jiffies + br->hello_time); br 175 net/bridge/br_stp.c struct net_bridge *br; br 182 net/bridge/br_stp.c br = p->br; br 184 net/bridge/br_stp.c bpdu.topology_change = br->topology_change; br 186 net/bridge/br_stp.c bpdu.root = br->designated_root; br 187 net/bridge/br_stp.c bpdu.root_path_cost = br->root_path_cost; br 188 net/bridge/br_stp.c bpdu.bridge_id = br->bridge_id; br 190 net/bridge/br_stp.c if (br_is_root_bridge(br)) br 194 net/bridge/br_stp.c = br_get_port(br, br->root_port); br 198 net/bridge/br_stp.c bpdu.max_age = br->max_age; br 199 net/bridge/br_stp.c bpdu.hello_time = br->hello_time; br 200 net/bridge/br_stp.c bpdu.forward_delay = br->forward_delay; br 202 net/bridge/br_stp.c if (bpdu.message_age < br->max_age) { br 206 net/bridge/br_stp.c if (p->br->stp_enabled == BR_KERNEL_STP) br 227 net/bridge/br_stp.c static void br_record_config_timeout_values(struct net_bridge *br, br 230 net/bridge/br_stp.c br->max_age = bpdu->max_age; br 231 net/bridge/br_stp.c br->hello_time = bpdu->hello_time; br 232 net/bridge/br_stp.c br->forward_delay = bpdu->forward_delay; br 233 net/bridge/br_stp.c __br_set_topology_change(br, bpdu->topology_change); br 237 net/bridge/br_stp.c void br_transmit_tcn(struct net_bridge *br) br 241 net/bridge/br_stp.c p = br_get_port(br, br->root_port); br 245 net/bridge/br_stp.c br_notice(br, "root port %u not found for topology notice\n", br 246 net/bridge/br_stp.c br->root_port); br 252 net/bridge/br_stp.c struct net_bridge *br; br 255 net/bridge/br_stp.c br = p->br; br 259 net/bridge/br_stp.c if (memcmp(&p->designated_root, &br->designated_root, 8)) br 262 net/bridge/br_stp.c if (br->root_path_cost < p->designated_cost) br 264 net/bridge/br_stp.c else if (br->root_path_cost > p->designated_cost) br 267 net/bridge/br_stp.c t = memcmp(&br->bridge_id, &p->designated_bridge, 8); br 280 net/bridge/br_stp.c static void br_designated_port_selection(struct net_bridge *br) br 284 net/bridge/br_stp.c list_for_each_entry(p, &br->port_list, list) { br 315 net/bridge/br_stp.c if (memcmp(&bpdu->bridge_id, &p->br->bridge_id, 8)) br 325 net/bridge/br_stp.c static void br_topology_change_acknowledged(struct net_bridge *br) br 327 net/bridge/br_stp.c br->topology_change_detected = 0; br 328 net/bridge/br_stp.c del_timer(&br->tcn_timer); br 332 net/bridge/br_stp.c void br_topology_change_detection(struct net_bridge *br) br 334 net/bridge/br_stp.c int isroot = br_is_root_bridge(br); br 336 net/bridge/br_stp.c if (br->stp_enabled != BR_KERNEL_STP) br 339 net/bridge/br_stp.c br_info(br, "topology change detected, %s\n", br 343 net/bridge/br_stp.c __br_set_topology_change(br, 1); br 344 net/bridge/br_stp.c mod_timer(&br->topology_change_timer, jiffies br 345 net/bridge/br_stp.c + br->bridge_forward_delay + br->bridge_max_age); br 346 net/bridge/br_stp.c } else if (!br->topology_change_detected) { br 347 net/bridge/br_stp.c br_transmit_tcn(br); br 348 net/bridge/br_stp.c mod_timer(&br->tcn_timer, jiffies + br->bridge_hello_time); br 351 net/bridge/br_stp.c br->topology_change_detected = 1; br 355 net/bridge/br_stp.c void br_config_bpdu_generation(struct net_bridge *br) br 359 net/bridge/br_stp.c list_for_each_entry(p, &br->port_list, list) { br 373 net/bridge/br_stp.c void br_configuration_update(struct net_bridge *br) br 375 net/bridge/br_stp.c br_root_selection(br); br 376 net/bridge/br_stp.c br_designated_port_selection(br); br 382 net/bridge/br_stp.c struct net_bridge *br; br 384 net/bridge/br_stp.c br = p->br; br 385 net/bridge/br_stp.c p->designated_root = br->designated_root; br 386 net/bridge/br_stp.c p->designated_cost = br->root_path_cost; br 387 net/bridge/br_stp.c p->designated_bridge = br->bridge_id; br 399 net/bridge/br_stp.c br_topology_change_detection(p->br); br 411 net/bridge/br_stp.c struct net_bridge *br = p->br; br 416 net/bridge/br_stp.c if (br->stp_enabled == BR_NO_STP || br->forward_delay == 0) { br 418 net/bridge/br_stp.c br_topology_change_detection(br); br 420 net/bridge/br_stp.c } else if (br->stp_enabled == BR_KERNEL_STP) br 427 net/bridge/br_stp.c if (br->forward_delay != 0) br 428 net/bridge/br_stp.c mod_timer(&p->forward_delay_timer, jiffies + br->forward_delay); br 432 net/bridge/br_stp.c void br_port_state_selection(struct net_bridge *br) br 437 net/bridge/br_stp.c list_for_each_entry(p, &br->port_list, list) { br 442 net/bridge/br_stp.c if (br->stp_enabled != BR_USER_STP) { br 443 net/bridge/br_stp.c if (p->port_no == br->root_port) { br 468 net/bridge/br_stp.c netif_carrier_off(br->dev); br 470 net/bridge/br_stp.c netif_carrier_on(br->dev); br 484 net/bridge/br_stp.c struct net_bridge *br; br 487 net/bridge/br_stp.c br = p->br; br 488 net/bridge/br_stp.c was_root = br_is_root_bridge(br); br 492 net/bridge/br_stp.c br_configuration_update(br); br 493 net/bridge/br_stp.c br_port_state_selection(br); br 495 net/bridge/br_stp.c if (!br_is_root_bridge(br) && was_root) { br 496 net/bridge/br_stp.c del_timer(&br->hello_timer); br 497 net/bridge/br_stp.c if (br->topology_change_detected) { br 498 net/bridge/br_stp.c del_timer(&br->topology_change_timer); br 499 net/bridge/br_stp.c br_transmit_tcn(br); br 501 net/bridge/br_stp.c mod_timer(&br->tcn_timer, br 502 net/bridge/br_stp.c jiffies + br->bridge_hello_time); br 506 net/bridge/br_stp.c if (p->port_no == br->root_port) { br 507 net/bridge/br_stp.c br_record_config_timeout_values(br, bpdu); br 508 net/bridge/br_stp.c br_config_bpdu_generation(br); br 510 net/bridge/br_stp.c br_topology_change_acknowledged(br); br 521 net/bridge/br_stp.c br_info(p->br, "port %u(%s) received tcn bpdu\n", br 524 net/bridge/br_stp.c br_topology_change_detection(p->br); br 530 net/bridge/br_stp.c int br_set_hello_time(struct net_bridge *br, unsigned long val) br 537 net/bridge/br_stp.c spin_lock_bh(&br->lock); br 538 net/bridge/br_stp.c br->bridge_hello_time = t; br 539 net/bridge/br_stp.c if (br_is_root_bridge(br)) br 540 net/bridge/br_stp.c br->hello_time = br->bridge_hello_time; br 541 net/bridge/br_stp.c spin_unlock_bh(&br->lock); br 545 net/bridge/br_stp.c int br_set_max_age(struct net_bridge *br, unsigned long val) br 552 net/bridge/br_stp.c spin_lock_bh(&br->lock); br 553 net/bridge/br_stp.c br->bridge_max_age = t; br 554 net/bridge/br_stp.c if (br_is_root_bridge(br)) br 555 net/bridge/br_stp.c br->max_age = br->bridge_max_age; br 556 net/bridge/br_stp.c spin_unlock_bh(&br->lock); br 587 net/bridge/br_stp.c int br_set_ageing_time(struct net_bridge *br, clock_t ageing_time) br 592 net/bridge/br_stp.c err = __set_ageing_time(br->dev, t); br 596 net/bridge/br_stp.c spin_lock_bh(&br->lock); br 597 net/bridge/br_stp.c br->bridge_ageing_time = t; br 598 net/bridge/br_stp.c br->ageing_time = t; br 599 net/bridge/br_stp.c spin_unlock_bh(&br->lock); br 601 net/bridge/br_stp.c mod_delayed_work(system_long_wq, &br->gc_work, 0); br 607 net/bridge/br_stp.c void __br_set_topology_change(struct net_bridge *br, unsigned char val) br 612 net/bridge/br_stp.c if (br->stp_enabled == BR_KERNEL_STP && br->topology_change != val) { br 618 net/bridge/br_stp.c t = 2 * br->forward_delay; br 619 net/bridge/br_stp.c br_debug(br, "decreasing ageing time to %lu\n", t); br 621 net/bridge/br_stp.c t = br->bridge_ageing_time; br 622 net/bridge/br_stp.c br_debug(br, "restoring ageing time to %lu\n", t); br 625 net/bridge/br_stp.c err = __set_ageing_time(br->dev, t); br 627 net/bridge/br_stp.c br_warn(br, "error offloading ageing time\n"); br 629 net/bridge/br_stp.c br->ageing_time = t; br 632 net/bridge/br_stp.c br->topology_change = val; br 635 net/bridge/br_stp.c void __br_set_forward_delay(struct net_bridge *br, unsigned long t) br 637 net/bridge/br_stp.c br->bridge_forward_delay = t; br 638 net/bridge/br_stp.c if (br_is_root_bridge(br)) br 639 net/bridge/br_stp.c br->forward_delay = br->bridge_forward_delay; br 642 net/bridge/br_stp.c int br_set_forward_delay(struct net_bridge *br, unsigned long val) br 647 net/bridge/br_stp.c spin_lock_bh(&br->lock); br 648 net/bridge/br_stp.c if (br->stp_enabled != BR_NO_STP && br 652 net/bridge/br_stp.c __br_set_forward_delay(br, t); br 656 net/bridge/br_stp.c spin_unlock_bh(&br->lock); br 55 net/bridge/br_stp_bpdu.c llc_mac_hdr_init(skb, p->dev->dev_addr, p->br->group_addr); br 83 net/bridge/br_stp_bpdu.c if (p->br->stp_enabled != BR_KERNEL_STP) br 128 net/bridge/br_stp_bpdu.c if (p->br->stp_enabled != BR_KERNEL_STP) br 147 net/bridge/br_stp_bpdu.c struct net_bridge *br; br 162 net/bridge/br_stp_bpdu.c br = p->br; br 163 net/bridge/br_stp_bpdu.c spin_lock(&br->lock); br 165 net/bridge/br_stp_bpdu.c if (br->stp_enabled != BR_KERNEL_STP) br 168 net/bridge/br_stp_bpdu.c if (!(br->dev->flags & IFF_UP)) br 174 net/bridge/br_stp_bpdu.c if (!ether_addr_equal(eth_hdr(skb)->h_dest, br->group_addr)) br 178 net/bridge/br_stp_bpdu.c br_notice(br, "BPDU received on blocked port %u(%s)\n", br 226 net/bridge/br_stp_bpdu.c br_notice(p->br, br 240 net/bridge/br_stp_bpdu.c spin_unlock(&br->lock); br 43 net/bridge/br_stp_if.c err = __set_ageing_time(p->dev, p->br->ageing_time); br 49 net/bridge/br_stp_if.c void br_stp_enable_bridge(struct net_bridge *br) br 53 net/bridge/br_stp_if.c spin_lock_bh(&br->lock); br 54 net/bridge/br_stp_if.c if (br->stp_enabled == BR_KERNEL_STP) br 55 net/bridge/br_stp_if.c mod_timer(&br->hello_timer, jiffies + br->hello_time); br 56 net/bridge/br_stp_if.c mod_delayed_work(system_long_wq, &br->gc_work, HZ / 10); br 58 net/bridge/br_stp_if.c br_config_bpdu_generation(br); br 60 net/bridge/br_stp_if.c list_for_each_entry(p, &br->port_list, list) { br 65 net/bridge/br_stp_if.c spin_unlock_bh(&br->lock); br 69 net/bridge/br_stp_if.c void br_stp_disable_bridge(struct net_bridge *br) br 73 net/bridge/br_stp_if.c spin_lock_bh(&br->lock); br 74 net/bridge/br_stp_if.c list_for_each_entry(p, &br->port_list, list) { br 80 net/bridge/br_stp_if.c __br_set_topology_change(br, 0); br 81 net/bridge/br_stp_if.c br->topology_change_detected = 0; br 82 net/bridge/br_stp_if.c spin_unlock_bh(&br->lock); br 84 net/bridge/br_stp_if.c del_timer_sync(&br->hello_timer); br 85 net/bridge/br_stp_if.c del_timer_sync(&br->topology_change_timer); br 86 net/bridge/br_stp_if.c del_timer_sync(&br->tcn_timer); br 87 net/bridge/br_stp_if.c cancel_delayed_work_sync(&br->gc_work); br 94 net/bridge/br_stp_if.c br_port_state_selection(p->br); br 101 net/bridge/br_stp_if.c struct net_bridge *br = p->br; br 104 net/bridge/br_stp_if.c wasroot = br_is_root_bridge(br); br 117 net/bridge/br_stp_if.c br_fdb_delete_by_port(br, p, 0, 0); br 120 net/bridge/br_stp_if.c br_configuration_update(br); br 122 net/bridge/br_stp_if.c br_port_state_selection(br); br 124 net/bridge/br_stp_if.c if (br_is_root_bridge(br) && !wasroot) br 125 net/bridge/br_stp_if.c br_become_root_bridge(br); br 128 net/bridge/br_stp_if.c static int br_stp_call_user(struct net_bridge *br, char *arg) br 130 net/bridge/br_stp_if.c char *argv[] = { BR_STP_PROG, br->dev->name, arg, NULL }; br 138 net/bridge/br_stp_if.c br_debug(br, BR_STP_PROG " received signal %d\n", br 141 net/bridge/br_stp_if.c br_debug(br, BR_STP_PROG " exited with code %d\n", br 148 net/bridge/br_stp_if.c static void br_stp_start(struct net_bridge *br) br 152 net/bridge/br_stp_if.c if (net_eq(dev_net(br->dev), &init_net)) br 153 net/bridge/br_stp_if.c err = br_stp_call_user(br, "start"); br 156 net/bridge/br_stp_if.c br_err(br, "failed to start userspace STP (%d)\n", err); br 158 net/bridge/br_stp_if.c spin_lock_bh(&br->lock); br 160 net/bridge/br_stp_if.c if (br->bridge_forward_delay < BR_MIN_FORWARD_DELAY) br 161 net/bridge/br_stp_if.c __br_set_forward_delay(br, BR_MIN_FORWARD_DELAY); br 162 net/bridge/br_stp_if.c else if (br->bridge_forward_delay > BR_MAX_FORWARD_DELAY) br 163 net/bridge/br_stp_if.c __br_set_forward_delay(br, BR_MAX_FORWARD_DELAY); br 166 net/bridge/br_stp_if.c br->stp_enabled = BR_USER_STP; br 167 net/bridge/br_stp_if.c br_debug(br, "userspace STP started\n"); br 169 net/bridge/br_stp_if.c br->stp_enabled = BR_KERNEL_STP; br 170 net/bridge/br_stp_if.c br_debug(br, "using kernel STP\n"); br 173 net/bridge/br_stp_if.c if (br->dev->flags & IFF_UP) br 174 net/bridge/br_stp_if.c mod_timer(&br->hello_timer, jiffies + br->hello_time); br 175 net/bridge/br_stp_if.c br_port_state_selection(br); br 178 net/bridge/br_stp_if.c spin_unlock_bh(&br->lock); br 181 net/bridge/br_stp_if.c static void br_stp_stop(struct net_bridge *br) br 185 net/bridge/br_stp_if.c if (br->stp_enabled == BR_USER_STP) { br 186 net/bridge/br_stp_if.c err = br_stp_call_user(br, "stop"); br 188 net/bridge/br_stp_if.c br_err(br, "failed to stop userspace STP (%d)\n", err); br 191 net/bridge/br_stp_if.c spin_lock_bh(&br->lock); br 192 net/bridge/br_stp_if.c br_port_state_selection(br); br 193 net/bridge/br_stp_if.c spin_unlock_bh(&br->lock); br 196 net/bridge/br_stp_if.c br->stp_enabled = BR_NO_STP; br 199 net/bridge/br_stp_if.c void br_stp_set_enabled(struct net_bridge *br, unsigned long val) br 204 net/bridge/br_stp_if.c if (br->stp_enabled == BR_NO_STP) br 205 net/bridge/br_stp_if.c br_stp_start(br); br 207 net/bridge/br_stp_if.c if (br->stp_enabled != BR_NO_STP) br 208 net/bridge/br_stp_if.c br_stp_stop(br); br 213 net/bridge/br_stp_if.c void br_stp_change_bridge_id(struct net_bridge *br, const unsigned char *addr) br 221 net/bridge/br_stp_if.c wasroot = br_is_root_bridge(br); br 223 net/bridge/br_stp_if.c br_fdb_change_mac_address(br, addr); br 225 net/bridge/br_stp_if.c memcpy(oldaddr, br->bridge_id.addr, ETH_ALEN); br 226 net/bridge/br_stp_if.c memcpy(br->bridge_id.addr, addr, ETH_ALEN); br 227 net/bridge/br_stp_if.c memcpy(br->dev->dev_addr, addr, ETH_ALEN); br 229 net/bridge/br_stp_if.c list_for_each_entry(p, &br->port_list, list) { br 237 net/bridge/br_stp_if.c br_configuration_update(br); br 238 net/bridge/br_stp_if.c br_port_state_selection(br); br 239 net/bridge/br_stp_if.c if (br_is_root_bridge(br) && !wasroot) br 240 net/bridge/br_stp_if.c br_become_root_bridge(br); br 247 net/bridge/br_stp_if.c bool br_stp_recalculate_bridge_id(struct net_bridge *br) br 255 net/bridge/br_stp_if.c if (br->dev->addr_assign_type == NET_ADDR_SET) br 258 net/bridge/br_stp_if.c list_for_each_entry(p, &br->port_list, list) { br 265 net/bridge/br_stp_if.c if (ether_addr_equal(br->bridge_id.addr, addr)) br 268 net/bridge/br_stp_if.c br_stp_change_bridge_id(br, addr); br 273 net/bridge/br_stp_if.c void br_stp_set_bridge_priority(struct net_bridge *br, u16 newprio) br 278 net/bridge/br_stp_if.c spin_lock_bh(&br->lock); br 279 net/bridge/br_stp_if.c wasroot = br_is_root_bridge(br); br 281 net/bridge/br_stp_if.c list_for_each_entry(p, &br->port_list, list) { br 290 net/bridge/br_stp_if.c br->bridge_id.prio[0] = (newprio >> 8) & 0xFF; br 291 net/bridge/br_stp_if.c br->bridge_id.prio[1] = newprio & 0xFF; br 292 net/bridge/br_stp_if.c br_configuration_update(br); br 293 net/bridge/br_stp_if.c br_port_state_selection(br); br 294 net/bridge/br_stp_if.c if (br_is_root_bridge(br) && !wasroot) br 295 net/bridge/br_stp_if.c br_become_root_bridge(br); br 296 net/bridge/br_stp_if.c spin_unlock_bh(&br->lock); br 313 net/bridge/br_stp_if.c if (!memcmp(&p->br->bridge_id, &p->designated_bridge, 8) && br 316 net/bridge/br_stp_if.c br_port_state_selection(p->br); br 331 net/bridge/br_stp_if.c br_configuration_update(p->br); br 332 net/bridge/br_stp_if.c br_port_state_selection(p->br); br 17 net/bridge/br_stp_timer.c static int br_is_designated_for_some_port(const struct net_bridge *br) br 21 net/bridge/br_stp_timer.c list_for_each_entry(p, &br->port_list, list) { br 23 net/bridge/br_stp_timer.c !memcmp(&p->designated_bridge, &br->bridge_id, 8)) br 32 net/bridge/br_stp_timer.c struct net_bridge *br = from_timer(br, t, hello_timer); br 34 net/bridge/br_stp_timer.c br_debug(br, "hello timer expired\n"); br 35 net/bridge/br_stp_timer.c spin_lock(&br->lock); br 36 net/bridge/br_stp_timer.c if (br->dev->flags & IFF_UP) { br 37 net/bridge/br_stp_timer.c br_config_bpdu_generation(br); br 39 net/bridge/br_stp_timer.c if (br->stp_enabled == BR_KERNEL_STP) br 40 net/bridge/br_stp_timer.c mod_timer(&br->hello_timer, br 41 net/bridge/br_stp_timer.c round_jiffies(jiffies + br->hello_time)); br 43 net/bridge/br_stp_timer.c spin_unlock(&br->lock); br 49 net/bridge/br_stp_timer.c struct net_bridge *br = p->br; br 56 net/bridge/br_stp_timer.c br_info(br, "port %u(%s) neighbor %.2x%.2x.%pM lost\n", br 65 net/bridge/br_stp_timer.c spin_lock(&br->lock); br 68 net/bridge/br_stp_timer.c was_root = br_is_root_bridge(br); br 71 net/bridge/br_stp_timer.c br_configuration_update(br); br 72 net/bridge/br_stp_timer.c br_port_state_selection(br); br 73 net/bridge/br_stp_timer.c if (br_is_root_bridge(br) && !was_root) br 74 net/bridge/br_stp_timer.c br_become_root_bridge(br); br 76 net/bridge/br_stp_timer.c spin_unlock(&br->lock); br 82 net/bridge/br_stp_timer.c struct net_bridge *br = p->br; br 84 net/bridge/br_stp_timer.c br_debug(br, "port %u(%s) forward delay timer\n", br 86 net/bridge/br_stp_timer.c spin_lock(&br->lock); br 90 net/bridge/br_stp_timer.c jiffies + br->forward_delay); br 93 net/bridge/br_stp_timer.c if (br_is_designated_for_some_port(br)) br 94 net/bridge/br_stp_timer.c br_topology_change_detection(br); br 95 net/bridge/br_stp_timer.c netif_carrier_on(br->dev); br 100 net/bridge/br_stp_timer.c spin_unlock(&br->lock); br 105 net/bridge/br_stp_timer.c struct net_bridge *br = from_timer(br, t, tcn_timer); br 107 net/bridge/br_stp_timer.c br_debug(br, "tcn timer expired\n"); br 108 net/bridge/br_stp_timer.c spin_lock(&br->lock); br 109 net/bridge/br_stp_timer.c if (!br_is_root_bridge(br) && (br->dev->flags & IFF_UP)) { br 110 net/bridge/br_stp_timer.c br_transmit_tcn(br); br 112 net/bridge/br_stp_timer.c mod_timer(&br->tcn_timer, jiffies + br->bridge_hello_time); br 114 net/bridge/br_stp_timer.c spin_unlock(&br->lock); br 119 net/bridge/br_stp_timer.c struct net_bridge *br = from_timer(br, t, topology_change_timer); br 121 net/bridge/br_stp_timer.c br_debug(br, "topo change timer expired\n"); br 122 net/bridge/br_stp_timer.c spin_lock(&br->lock); br 123 net/bridge/br_stp_timer.c br->topology_change_detected = 0; br 124 net/bridge/br_stp_timer.c __br_set_topology_change(br, 0); br 125 net/bridge/br_stp_timer.c spin_unlock(&br->lock); br 132 net/bridge/br_stp_timer.c br_debug(p->br, "port %u(%s) hold timer expired\n", br 135 net/bridge/br_stp_timer.c spin_lock(&p->br->lock); br 138 net/bridge/br_stp_timer.c spin_unlock(&p->br->lock); br 141 net/bridge/br_stp_timer.c void br_stp_timer_init(struct net_bridge *br) br 143 net/bridge/br_stp_timer.c timer_setup(&br->hello_timer, br_hello_timer_expired, 0); br 144 net/bridge/br_stp_timer.c timer_setup(&br->tcn_timer, br_tcn_timer_expired, 0); br 145 net/bridge/br_stp_timer.c timer_setup(&br->topology_change_timer, br 11 net/bridge/br_switchdev.c static int br_switchdev_mark_get(struct net_bridge *br, struct net_device *dev) br 16 net/bridge/br_switchdev.c list_for_each_entry(p, &br->port_list, list) { br 21 net/bridge/br_switchdev.c return ++br->offload_fwd_mark; br 38 net/bridge/br_switchdev.c p->offload_fwd_mark = br_switchdev_mark_get(p->br, p->dev); br 86 net/bridge/br_switchdev.c br_warn(p->br, "bridge flag offload is not supported %u(%s)\n", br 97 net/bridge/br_switchdev.c br_warn(p->br, "error setting offload flag on port %u(%s)\n", br 31 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 36 net/bridge/br_sysfs_br.c if (!ns_capable(dev_net(br->dev)->user_ns, CAP_NET_ADMIN)) br 46 net/bridge/br_sysfs_br.c err = (*set)(br, val); br 48 net/bridge/br_sysfs_br.c netdev_state_change(br->dev); br 58 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 59 net/bridge/br_sysfs_br.c return sprintf(buf, "%lu\n", jiffies_to_clock_t(br->forward_delay)); br 102 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 103 net/bridge/br_sysfs_br.c return sprintf(buf, "%lu\n", jiffies_to_clock_t(br->ageing_time)); br 106 net/bridge/br_sysfs_br.c static int set_ageing_time(struct net_bridge *br, unsigned long val) br 108 net/bridge/br_sysfs_br.c return br_set_ageing_time(br, val); br 122 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 123 net/bridge/br_sysfs_br.c return sprintf(buf, "%d\n", br->stp_enabled); br 127 net/bridge/br_sysfs_br.c static int set_stp_state(struct net_bridge *br, unsigned long val) br 129 net/bridge/br_sysfs_br.c br_stp_set_enabled(br, val); br 146 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 147 net/bridge/br_sysfs_br.c return sprintf(buf, "%#x\n", br->group_fwd_mask); br 150 net/bridge/br_sysfs_br.c static int set_group_fwd_mask(struct net_bridge *br, unsigned long val) br 155 net/bridge/br_sysfs_br.c br->group_fwd_mask = val; br 172 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 174 net/bridge/br_sysfs_br.c (br->bridge_id.prio[0] << 8) | br->bridge_id.prio[1]); br 177 net/bridge/br_sysfs_br.c static int set_priority(struct net_bridge *br, unsigned long val) br 179 net/bridge/br_sysfs_br.c br_stp_set_bridge_priority(br, (u16) val); br 229 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 230 net/bridge/br_sysfs_br.c return sprintf(buf, "%d\n", br->topology_change_detected); br 237 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 238 net/bridge/br_sysfs_br.c return sprintf(buf, "%ld\n", br_timer_value(&br->hello_timer)); br 245 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 246 net/bridge/br_sysfs_br.c return sprintf(buf, "%ld\n", br_timer_value(&br->tcn_timer)); br 254 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 255 net/bridge/br_sysfs_br.c return sprintf(buf, "%ld\n", br_timer_value(&br->topology_change_timer)); br 262 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 263 net/bridge/br_sysfs_br.c return sprintf(buf, "%ld\n", br_timer_value(&br->gc_work.timer)); br 270 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 271 net/bridge/br_sysfs_br.c return sprintf(buf, "%pM\n", br->group_addr); br 278 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 281 net/bridge/br_sysfs_br.c if (!ns_capable(dev_net(br->dev)->user_ns, CAP_NET_ADMIN)) br 298 net/bridge/br_sysfs_br.c spin_lock_bh(&br->lock); br 299 net/bridge/br_sysfs_br.c ether_addr_copy(br->group_addr, new_addr); br 300 net/bridge/br_sysfs_br.c spin_unlock_bh(&br->lock); br 302 net/bridge/br_sysfs_br.c br_opt_toggle(br, BROPT_GROUP_ADDR_SET, true); br 303 net/bridge/br_sysfs_br.c br_recalculate_fwd_mask(br); br 304 net/bridge/br_sysfs_br.c netdev_state_change(br->dev); br 313 net/bridge/br_sysfs_br.c static int set_flush(struct net_bridge *br, unsigned long val) br 315 net/bridge/br_sysfs_br.c br_fdb_flush(br); br 331 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 332 net/bridge/br_sysfs_br.c return sprintf(buf, "%d\n", br_boolopt_get(br, BR_BOOLOPT_NO_LL_LEARN)); br 335 net/bridge/br_sysfs_br.c static int set_no_linklocal_learn(struct net_bridge *br, unsigned long val) br 337 net/bridge/br_sysfs_br.c return br_boolopt_toggle(br, BR_BOOLOPT_NO_LL_LEARN, !!val, NULL); br 352 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 353 net/bridge/br_sysfs_br.c return sprintf(buf, "%d\n", br->multicast_router); br 368 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 369 net/bridge/br_sysfs_br.c return sprintf(buf, "%d\n", br_opt_get(br, BROPT_MULTICAST_ENABLED)); br 384 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 386 net/bridge/br_sysfs_br.c br_opt_get(br, BROPT_MULTICAST_QUERY_USE_IFADDR)); br 389 net/bridge/br_sysfs_br.c static int set_query_use_ifaddr(struct net_bridge *br, unsigned long val) br 391 net/bridge/br_sysfs_br.c br_opt_toggle(br, BROPT_MULTICAST_QUERY_USE_IFADDR, !!val); br 408 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 409 net/bridge/br_sysfs_br.c return sprintf(buf, "%d\n", br_opt_get(br, BROPT_MULTICAST_QUERIER)); br 426 net/bridge/br_sysfs_br.c static int set_elasticity(struct net_bridge *br, unsigned long val) br 428 net/bridge/br_sysfs_br.c br_warn(br, "the hash_elasticity option has been deprecated and is always %u\n", br 444 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 445 net/bridge/br_sysfs_br.c return sprintf(buf, "%u\n", br->hash_max); br 448 net/bridge/br_sysfs_br.c static int set_hash_max(struct net_bridge *br, unsigned long val) br 450 net/bridge/br_sysfs_br.c br->hash_max = val; br 465 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 467 net/bridge/br_sysfs_br.c return sprintf(buf, "%u\n", br->multicast_igmp_version); br 482 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 483 net/bridge/br_sysfs_br.c return sprintf(buf, "%u\n", br->multicast_last_member_count); br 486 net/bridge/br_sysfs_br.c static int set_last_member_count(struct net_bridge *br, unsigned long val) br 488 net/bridge/br_sysfs_br.c br->multicast_last_member_count = val; br 503 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 504 net/bridge/br_sysfs_br.c return sprintf(buf, "%u\n", br->multicast_startup_query_count); br 507 net/bridge/br_sysfs_br.c static int set_startup_query_count(struct net_bridge *br, unsigned long val) br 509 net/bridge/br_sysfs_br.c br->multicast_startup_query_count = val; br 524 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 526 net/bridge/br_sysfs_br.c jiffies_to_clock_t(br->multicast_last_member_interval)); br 529 net/bridge/br_sysfs_br.c static int set_last_member_interval(struct net_bridge *br, unsigned long val) br 531 net/bridge/br_sysfs_br.c br->multicast_last_member_interval = clock_t_to_jiffies(val); br 546 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 548 net/bridge/br_sysfs_br.c jiffies_to_clock_t(br->multicast_membership_interval)); br 551 net/bridge/br_sysfs_br.c static int set_membership_interval(struct net_bridge *br, unsigned long val) br 553 net/bridge/br_sysfs_br.c br->multicast_membership_interval = clock_t_to_jiffies(val); br 569 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 571 net/bridge/br_sysfs_br.c jiffies_to_clock_t(br->multicast_querier_interval)); br 574 net/bridge/br_sysfs_br.c static int set_querier_interval(struct net_bridge *br, unsigned long val) br 576 net/bridge/br_sysfs_br.c br->multicast_querier_interval = clock_t_to_jiffies(val); br 592 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 594 net/bridge/br_sysfs_br.c jiffies_to_clock_t(br->multicast_query_interval)); br 597 net/bridge/br_sysfs_br.c static int set_query_interval(struct net_bridge *br, unsigned long val) br 599 net/bridge/br_sysfs_br.c br->multicast_query_interval = clock_t_to_jiffies(val); br 614 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 617 net/bridge/br_sysfs_br.c jiffies_to_clock_t(br->multicast_query_response_interval)); br 620 net/bridge/br_sysfs_br.c static int set_query_response_interval(struct net_bridge *br, unsigned long val) br 622 net/bridge/br_sysfs_br.c br->multicast_query_response_interval = clock_t_to_jiffies(val); br 637 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 640 net/bridge/br_sysfs_br.c jiffies_to_clock_t(br->multicast_startup_query_interval)); br 643 net/bridge/br_sysfs_br.c static int set_startup_query_interval(struct net_bridge *br, unsigned long val) br 645 net/bridge/br_sysfs_br.c br->multicast_startup_query_interval = clock_t_to_jiffies(val); br 661 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 664 net/bridge/br_sysfs_br.c br_opt_get(br, BROPT_MULTICAST_STATS_ENABLED)); br 667 net/bridge/br_sysfs_br.c static int set_stats_enabled(struct net_bridge *br, unsigned long val) br 669 net/bridge/br_sysfs_br.c br_opt_toggle(br, BROPT_MULTICAST_STATS_ENABLED, !!val); br 687 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 689 net/bridge/br_sysfs_br.c return sprintf(buf, "%u\n", br->multicast_mld_version); br 705 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 706 net/bridge/br_sysfs_br.c return sprintf(buf, "%u\n", br_opt_get(br, BROPT_NF_CALL_IPTABLES)); br 709 net/bridge/br_sysfs_br.c static int set_nf_call_iptables(struct net_bridge *br, unsigned long val) br 711 net/bridge/br_sysfs_br.c br_opt_toggle(br, BROPT_NF_CALL_IPTABLES, !!val); br 726 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 727 net/bridge/br_sysfs_br.c return sprintf(buf, "%u\n", br_opt_get(br, BROPT_NF_CALL_IP6TABLES)); br 730 net/bridge/br_sysfs_br.c static int set_nf_call_ip6tables(struct net_bridge *br, unsigned long val) br 732 net/bridge/br_sysfs_br.c br_opt_toggle(br, BROPT_NF_CALL_IP6TABLES, !!val); br 747 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 748 net/bridge/br_sysfs_br.c return sprintf(buf, "%u\n", br_opt_get(br, BROPT_NF_CALL_ARPTABLES)); br 751 net/bridge/br_sysfs_br.c static int set_nf_call_arptables(struct net_bridge *br, unsigned long val) br 753 net/bridge/br_sysfs_br.c br_opt_toggle(br, BROPT_NF_CALL_ARPTABLES, !!val); br 770 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 771 net/bridge/br_sysfs_br.c return sprintf(buf, "%d\n", br_opt_get(br, BROPT_VLAN_ENABLED)); br 786 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 787 net/bridge/br_sysfs_br.c return sprintf(buf, "%#06x\n", ntohs(br->vlan_proto)); br 802 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 803 net/bridge/br_sysfs_br.c return sprintf(buf, "%d\n", br->default_pvid); br 818 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 819 net/bridge/br_sysfs_br.c return sprintf(buf, "%u\n", br_opt_get(br, BROPT_VLAN_STATS_ENABLED)); br 834 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(d); br 835 net/bridge/br_sysfs_br.c return sprintf(buf, "%u\n", br_opt_get(br, BROPT_VLAN_STATS_PER_PORT)); br 920 net/bridge/br_sysfs_br.c struct net_bridge *br = to_bridge(dev); br 927 net/bridge/br_sysfs_br.c n = br_fdb_fillbuf(br, buf, br 957 net/bridge/br_sysfs_br.c struct net_bridge *br = netdev_priv(dev); br 974 net/bridge/br_sysfs_br.c br->ifobj = kobject_create_and_add(SYSFS_BRIDGE_PORT_SUBDIR, brobj); br 975 net/bridge/br_sysfs_br.c if (!br->ifobj) { br 994 net/bridge/br_sysfs_br.c struct net_bridge *br = netdev_priv(dev); br 996 net/bridge/br_sysfs_br.c kobject_put(br->ifobj); br 168 net/bridge/br_sysfs_if.c br_fdb_delete_by_port(p->br, p, 0, 0); // Don't delete local entry br 327 net/bridge/br_sysfs_if.c spin_lock_bh(&p->br->lock); br 329 net/bridge/br_sysfs_if.c spin_unlock_bh(&p->br->lock); br 335 net/bridge/br_sysfs_if.c spin_lock_bh(&p->br->lock); br 337 net/bridge/br_sysfs_if.c spin_unlock_bh(&p->br->lock); br 362 net/bridge/br_sysfs_if.c struct net_bridge *br = p->br; br 366 net/bridge/br_sysfs_if.c err = sysfs_create_link(&p->kobj, &br->dev->dev.kobj, br 378 net/bridge/br_sysfs_if.c return sysfs_create_link(br->ifobj, &p->kobj, p->sysfs_name); br 384 net/bridge/br_sysfs_if.c struct net_bridge *br = p->br; br 393 net/bridge/br_sysfs_if.c err = sysfs_rename_link(br->ifobj, &p->kobj, br 396 net/bridge/br_sysfs_if.c netdev_notice(br->dev, "unable to rename link %s to %s", br 67 net/bridge/br_vlan.c vg = br_vlan_group(v->br); br 84 net/bridge/br_vlan.c static int __vlan_vid_add(struct net_device *dev, struct net_bridge *br, br 95 net/bridge/br_vlan.c return vlan_vid_add(dev, br->vlan_proto, v->vid); br 107 net/bridge/br_vlan.c vg = br_vlan_group(v->br); br 127 net/bridge/br_vlan.c static int __vlan_vid_del(struct net_device *dev, struct net_bridge *br, br 137 net/bridge/br_vlan.c vlan_vid_del(dev, br->vlan_proto, v->vid); br 145 net/bridge/br_vlan.c br_vlan_get_master(struct net_bridge *br, u16 vid, br 151 net/bridge/br_vlan.c vg = br_vlan_group(br); br 157 net/bridge/br_vlan.c if (br_vlan_add(br, vid, 0, &changed, extack)) br 188 net/bridge/br_vlan.c vg = br_vlan_group(masterv->br); br 228 net/bridge/br_vlan.c struct net_bridge *br; br 232 net/bridge/br_vlan.c br = v->br; br 233 net/bridge/br_vlan.c dev = br->dev; br 234 net/bridge/br_vlan.c vg = br_vlan_group(br); br 237 net/bridge/br_vlan.c br = p->br; br 247 net/bridge/br_vlan.c err = __vlan_vid_add(dev, br, v, flags, extack); br 255 net/bridge/br_vlan.c err = br_vlan_add(br, v->vid, br 262 net/bridge/br_vlan.c masterv = br_vlan_get_master(br, v->vid, extack); br 266 net/bridge/br_vlan.c if (br_opt_get(br, BROPT_VLAN_STATS_PER_PORT)) { br 284 net/bridge/br_vlan.c err = br_fdb_insert(br, p, dev->dev_addr, v->vid); br 286 net/bridge/br_vlan.c br_err(br, "failed insert local address into bridge forwarding table\n"); br 307 net/bridge/br_vlan.c br_fdb_find_delete_local(br, p, dev->dev_addr, v->vid); br 313 net/bridge/br_vlan.c __vlan_vid_del(dev, br, v); br 337 net/bridge/br_vlan.c vg = br_vlan_group(v->br); br 346 net/bridge/br_vlan.c err = __vlan_vid_del(p->dev, p->br, v); br 350 net/bridge/br_vlan.c err = br_switchdev_port_vlan_del(v->br->dev, v->vid); br 392 net/bridge/br_vlan.c struct sk_buff *br_handle_vlan(struct net_bridge *br, br 417 net/bridge/br_vlan.c if ((br->dev->flags & IFF_PROMISC) && skb->dev == br->dev) { br 424 net/bridge/br_vlan.c if (br_opt_get(br, BROPT_VLAN_STATS_ENABLED)) { br 445 net/bridge/br_vlan.c static bool __allowed_ingress(const struct net_bridge *br, br 459 net/bridge/br_vlan.c skb->protocol == br->vlan_proto)) { br 467 net/bridge/br_vlan.c if (skb->vlan_proto != br->vlan_proto) { br 503 net/bridge/br_vlan.c __vlan_hwaccel_put_tag(skb, br->vlan_proto, pvid); br 513 net/bridge/br_vlan.c if (!br_opt_get(br, BROPT_VLAN_STATS_ENABLED)) br 520 net/bridge/br_vlan.c if (br_opt_get(br, BROPT_VLAN_STATS_ENABLED)) { br 535 net/bridge/br_vlan.c bool br_allowed_ingress(const struct net_bridge *br, br 542 net/bridge/br_vlan.c if (!br_opt_get(br, BROPT_VLAN_ENABLED)) { br 547 net/bridge/br_vlan.c return __allowed_ingress(br, vg, skb, vid); br 573 net/bridge/br_vlan.c struct net_bridge *br = p->br; br 576 net/bridge/br_vlan.c if (!br_opt_get(br, BROPT_VLAN_ENABLED)) br 583 net/bridge/br_vlan.c if (!br_vlan_get_tag(skb, vid) && skb->vlan_proto != br->vlan_proto) br 600 net/bridge/br_vlan.c static int br_vlan_add_existing(struct net_bridge *br, br 608 net/bridge/br_vlan.c err = br_switchdev_port_vlan_add(br->dev, vlan->vid, flags, extack); br 619 net/bridge/br_vlan.c err = br_fdb_insert(br, NULL, br->dev->dev_addr, br 622 net/bridge/br_vlan.c br_err(br, "failed to insert local address into bridge forwarding table\n"); br 639 net/bridge/br_vlan.c br_switchdev_port_vlan_del(br->dev, vlan->vid); br 647 net/bridge/br_vlan.c int br_vlan_add(struct net_bridge *br, u16 vid, u16 flags, bool *changed, br 657 net/bridge/br_vlan.c vg = br_vlan_group(br); br 660 net/bridge/br_vlan.c return br_vlan_add_existing(br, vg, vlan, flags, changed, br 675 net/bridge/br_vlan.c vlan->br = br; br 692 net/bridge/br_vlan.c int br_vlan_delete(struct net_bridge *br, u16 vid) br 699 net/bridge/br_vlan.c vg = br_vlan_group(br); br 704 net/bridge/br_vlan.c br_fdb_find_delete_local(br, NULL, br->dev->dev_addr, vid); br 705 net/bridge/br_vlan.c br_fdb_delete_by_port(br, NULL, vid, 0); br 712 net/bridge/br_vlan.c void br_vlan_flush(struct net_bridge *br) br 718 net/bridge/br_vlan.c vg = br_vlan_group(br); br 720 net/bridge/br_vlan.c RCU_INIT_POINTER(br->vlgrp, NULL); br 734 net/bridge/br_vlan.c static void recalculate_group_addr(struct net_bridge *br) br 736 net/bridge/br_vlan.c if (br_opt_get(br, BROPT_GROUP_ADDR_SET)) br 739 net/bridge/br_vlan.c spin_lock_bh(&br->lock); br 740 net/bridge/br_vlan.c if (!br_opt_get(br, BROPT_VLAN_ENABLED) || br 741 net/bridge/br_vlan.c br->vlan_proto == htons(ETH_P_8021Q)) { br 743 net/bridge/br_vlan.c br->group_addr[5] = 0x00; br 746 net/bridge/br_vlan.c br->group_addr[5] = 0x08; br 748 net/bridge/br_vlan.c spin_unlock_bh(&br->lock); br 752 net/bridge/br_vlan.c void br_recalculate_fwd_mask(struct net_bridge *br) br 754 net/bridge/br_vlan.c if (!br_opt_get(br, BROPT_VLAN_ENABLED) || br 755 net/bridge/br_vlan.c br->vlan_proto == htons(ETH_P_8021Q)) br 756 net/bridge/br_vlan.c br->group_fwd_mask_required = BR_GROUPFWD_DEFAULT; br 758 net/bridge/br_vlan.c br->group_fwd_mask_required = BR_GROUPFWD_8021AD & br 759 net/bridge/br_vlan.c ~(1u << br->group_addr[5]); br 762 net/bridge/br_vlan.c int __br_vlan_filter_toggle(struct net_bridge *br, unsigned long val) br 765 net/bridge/br_vlan.c .orig_dev = br->dev, br 772 net/bridge/br_vlan.c if (br_opt_get(br, BROPT_VLAN_ENABLED) == !!val) br 775 net/bridge/br_vlan.c err = switchdev_port_attr_set(br->dev, &attr); br 779 net/bridge/br_vlan.c br_opt_toggle(br, BROPT_VLAN_ENABLED, !!val); br 780 net/bridge/br_vlan.c br_manage_promisc(br); br 781 net/bridge/br_vlan.c recalculate_group_addr(br); br 782 net/bridge/br_vlan.c br_recalculate_fwd_mask(br); br 787 net/bridge/br_vlan.c int br_vlan_filter_toggle(struct net_bridge *br, unsigned long val) br 789 net/bridge/br_vlan.c return __br_vlan_filter_toggle(br, val); br 794 net/bridge/br_vlan.c struct net_bridge *br = netdev_priv(dev); br 796 net/bridge/br_vlan.c return br_opt_get(br, BROPT_VLAN_ENABLED); br 802 net/bridge/br_vlan.c struct net_bridge *br = netdev_priv(dev); br 804 net/bridge/br_vlan.c *p_proto = ntohs(br->vlan_proto); br 810 net/bridge/br_vlan.c int __br_vlan_set_proto(struct net_bridge *br, __be16 proto) br 818 net/bridge/br_vlan.c if (br->vlan_proto == proto) br 822 net/bridge/br_vlan.c list_for_each_entry(p, &br->port_list, list) { br 831 net/bridge/br_vlan.c oldproto = br->vlan_proto; br 832 net/bridge/br_vlan.c br->vlan_proto = proto; br 834 net/bridge/br_vlan.c recalculate_group_addr(br); br 835 net/bridge/br_vlan.c br_recalculate_fwd_mask(br); br 838 net/bridge/br_vlan.c list_for_each_entry(p, &br->port_list, list) { br 850 net/bridge/br_vlan.c list_for_each_entry_continue_reverse(p, &br->port_list, list) { br 859 net/bridge/br_vlan.c int br_vlan_set_proto(struct net_bridge *br, unsigned long val) br 864 net/bridge/br_vlan.c return __br_vlan_set_proto(br, htons(val)); br 867 net/bridge/br_vlan.c int br_vlan_set_stats(struct net_bridge *br, unsigned long val) br 872 net/bridge/br_vlan.c br_opt_toggle(br, BROPT_VLAN_STATS_ENABLED, !!val); br 881 net/bridge/br_vlan.c int br_vlan_set_stats_per_port(struct net_bridge *br, unsigned long val) br 886 net/bridge/br_vlan.c list_for_each_entry(p, &br->port_list, list) { br 896 net/bridge/br_vlan.c br_opt_toggle(br, BROPT_VLAN_STATS_PER_PORT, !!val); br 920 net/bridge/br_vlan.c static void br_vlan_disable_default_pvid(struct net_bridge *br) br 923 net/bridge/br_vlan.c u16 pvid = br->default_pvid; br 928 net/bridge/br_vlan.c if (vlan_default_pvid(br_vlan_group(br), pvid)) br 929 net/bridge/br_vlan.c br_vlan_delete(br, pvid); br 931 net/bridge/br_vlan.c list_for_each_entry(p, &br->port_list, list) { br 936 net/bridge/br_vlan.c br->default_pvid = 0; br 939 net/bridge/br_vlan.c int __br_vlan_set_default_pvid(struct net_bridge *br, u16 pvid, br 951 net/bridge/br_vlan.c br_vlan_disable_default_pvid(br); br 959 net/bridge/br_vlan.c old_pvid = br->default_pvid; br 964 net/bridge/br_vlan.c vg = br_vlan_group(br); br 968 net/bridge/br_vlan.c err = br_vlan_add(br, pvid, br 975 net/bridge/br_vlan.c br_vlan_delete(br, old_pvid); br 979 net/bridge/br_vlan.c list_for_each_entry(p, &br->port_list, list) { br 999 net/bridge/br_vlan.c br->default_pvid = pvid; br 1006 net/bridge/br_vlan.c list_for_each_entry_continue_reverse(p, &br->port_list, list) { br 1020 net/bridge/br_vlan.c br_vlan_add(br, old_pvid, br 1025 net/bridge/br_vlan.c br_vlan_delete(br, pvid); br 1030 net/bridge/br_vlan.c int br_vlan_set_default_pvid(struct net_bridge *br, unsigned long val) br 1038 net/bridge/br_vlan.c if (pvid == br->default_pvid) br 1042 net/bridge/br_vlan.c if (br_opt_get(br, BROPT_VLAN_ENABLED)) { br 1047 net/bridge/br_vlan.c err = __br_vlan_set_default_pvid(br, pvid, NULL); br 1052 net/bridge/br_vlan.c int br_vlan_init(struct net_bridge *br) br 1067 net/bridge/br_vlan.c br->vlan_proto = htons(ETH_P_8021Q); br 1068 net/bridge/br_vlan.c br->default_pvid = 1; br 1069 net/bridge/br_vlan.c rcu_assign_pointer(br->vlgrp, vg); br 1085 net/bridge/br_vlan.c .orig_dev = p->br->dev, br 1088 net/bridge/br_vlan.c .u.vlan_filtering = br_opt_get(p->br, BROPT_VLAN_ENABLED), br 1109 net/bridge/br_vlan.c if (p->br->default_pvid) { br 1112 net/bridge/br_vlan.c ret = nbp_vlan_add(p, p->br->default_pvid, br 1186 net/bridge/br_vlan.c br_fdb_find_delete_local(port->br, port, port->dev->dev_addr, vid); br 1187 net/bridge/br_vlan.c br_fdb_delete_by_port(port->br, port, vid, 0); br 1354 net/bridge/br_vlan.c static void br_vlan_set_vlan_dev_state(const struct net_bridge *br, br 1362 net/bridge/br_vlan.c if (!netif_carrier_ok(br->dev)) { br 1367 net/bridge/br_vlan.c list_for_each_entry(p, &br->port_list, list) { br 1388 net/bridge/br_vlan.c vlan_dev = br_vlan_get_upper_bind_vlan_dev(p->br->dev, br 1392 net/bridge/br_vlan.c if (netif_carrier_ok(p->br->dev)) br 1395 net/bridge/br_vlan.c br_vlan_set_vlan_dev_state(p->br, vlan_dev); br 1405 net/bridge/br_vlan.c struct net_bridge *br = netdev_priv(dev); br 1411 net/bridge/br_vlan.c br_vlan_set_vlan_dev_state(br, upper_dev); br 1412 net/bridge/br_vlan.c br_opt_toggle(br, BROPT_VLAN_BRIDGE_BINDING, true); br 1414 net/bridge/br_vlan.c br_opt_toggle(br, BROPT_VLAN_BRIDGE_BINDING, br 1420 net/bridge/br_vlan.c struct net_bridge *br; br 1429 net/bridge/br_vlan.c br_vlan_set_vlan_dev_state(data->br, vlan_dev); br 1435 net/bridge/br_vlan.c struct net_bridge *br) br 1438 net/bridge/br_vlan.c .br = br br 1452 net/bridge/br_vlan.c if (!br_opt_get(p->br, BROPT_VLAN_BRIDGE_BINDING)) br 1455 net/bridge/br_vlan.c vlan_dev = br_vlan_get_upper_bind_vlan_dev(p->br->dev, vid); br 1457 net/bridge/br_vlan.c br_vlan_set_vlan_dev_state(p->br, vlan_dev); br 1464 net/bridge/br_vlan.c struct net_bridge *br = netdev_priv(dev); br 1470 net/bridge/br_vlan.c ret = br_vlan_add(br, br->default_pvid, br 1476 net/bridge/br_vlan.c br_vlan_delete(br, br->default_pvid); br 1485 net/bridge/br_vlan.c if (!br_opt_get(br, BROPT_VLAN_BRIDGE_BINDING)) br 1487 net/bridge/br_vlan.c br_vlan_link_state_change(dev, br); br 1497 net/bridge/br_vlan.c if (!br_opt_get(p->br, BROPT_VLAN_BRIDGE_BINDING)) br 176 net/bridge/br_vlan_tunnel.c __vlan_hwaccel_put_tag(skb, p->br->vlan_proto, vlan->vid); br 42 net/bridge/netfilter/ebt_dnat.c dev = br_port_get_rcu(xt_in(par))->br->dev; br 30 net/bridge/netfilter/ebt_redirect.c br_port_get_rcu(xt_in(par))->br->dev->dev_addr); br 89 net/bridge/netfilter/ebtable_broute.c ether_addr_equal(p->br->dev->dev_addr, dest)) br 144 net/bridge/netfilter/ebtables.c ebt_dev_check(e->logical_in, p->br->dev))) br 148 net/bridge/netfilter/ebtables.c ebt_dev_check(e->logical_out, p->br->dev))) br 35 net/dsa/dsa_priv.h struct net_device *br; br 135 net/dsa/dsa_priv.h int dsa_port_bridge_join(struct dsa_port *dp, struct net_device *br); br 136 net/dsa/dsa_priv.h void dsa_port_bridge_leave(struct dsa_port *dp, struct net_device *br); br 120 net/dsa/port.c int dsa_port_bridge_join(struct dsa_port *dp, struct net_device *br) br 125 net/dsa/port.c .br = br, br 137 net/dsa/port.c dp->bridge_dev = br; br 150 net/dsa/port.c void dsa_port_bridge_leave(struct dsa_port *dp, struct net_device *br) br 155 net/dsa/port.c .br = br, br 59 net/dsa/switch.c return ds->ops->port_bridge_join(ds, info->port, info->br); br 63 net/dsa/switch.c info->port, info->br); br 71 net/dsa/switch.c bool unset_vlan_filtering = br_vlan_enabled(info->br); br 75 net/dsa/switch.c ds->ops->port_bridge_leave(ds, info->port, info->br); br 79 net/dsa/switch.c info->br); br 92 net/dsa/switch.c if (dsa_to_port(ds, i)->bridge_dev == info->br) { br 3137 net/mac80211/mlme.c struct ieee80211_rate *br; br 3140 net/mac80211/mlme.c br = &sband->bitrates[j]; br 3142 net/mac80211/mlme.c brate = DIV_ROUND_UP(br->bitrate, (1 << shift) * 5); br 3076 net/mac80211/util.c struct ieee80211_rate *br; br 3085 net/mac80211/util.c br = &sband->bitrates[j]; br 3086 net/mac80211/util.c if ((rate_flags & br->flags) != rate_flags) br 3089 net/mac80211/util.c brate = DIV_ROUND_UP(br->bitrate, (1 << shift) * 5); br 499 net/netfilter/nfnetlink_log.c htonl(br_port_get_rcu(indev)->br->dev->ifindex))) br 536 net/netfilter/nfnetlink_log.c htonl(br_port_get_rcu(outdev)->br->dev->ifindex))) br 506 net/netfilter/nfnetlink_queue.c htonl(br_port_get_rcu(indev)->br->dev->ifindex))) br 540 net/netfilter/nfnetlink_queue.c htonl(br_port_get_rcu(outdev)->br->dev->ifindex))) br 72 net/nfc/digital_dep.c u8 br; br 83 net/nfc/digital_dep.c u8 br; br 509 net/nfc/digital_dep.c atr_req->br = 0; br 1156 security/apparmor/label.c struct aa_label *label, *ar = NULL, *br = NULL; br 1165 security/apparmor/label.c b = br = aa_get_newest_label(b); br 1171 security/apparmor/label.c aa_put_label(br); br 852 sound/soc/codecs/tscs42xx.c unsigned int br, bm; br 857 sound/soc/codecs/tscs42xx.c br = RV_DACSR_DBR_32; br 861 sound/soc/codecs/tscs42xx.c br = RV_DACSR_DBR_32; br 865 sound/soc/codecs/tscs42xx.c br = RV_DACSR_DBR_48; br 869 sound/soc/codecs/tscs42xx.c br = RV_DACSR_DBR_32; br 873 sound/soc/codecs/tscs42xx.c br = RV_DACSR_DBR_48; br 877 sound/soc/codecs/tscs42xx.c br = RV_DACSR_DBR_48; br 881 sound/soc/codecs/tscs42xx.c br = RV_DACSR_DBR_44_1; br 885 sound/soc/codecs/tscs42xx.c br = RV_DACSR_DBR_44_1; br 889 sound/soc/codecs/tscs42xx.c br = RV_DACSR_DBR_44_1; br 893 sound/soc/codecs/tscs42xx.c br = RV_DACSR_DBR_44_1; br 903 sound/soc/codecs/tscs42xx.c R_DACSR, RM_DACSR_DBR, br); br 917 sound/soc/codecs/tscs42xx.c R_ADCSR, RM_DACSR_DBR, br); br 3045 sound/soc/codecs/tscs454.c unsigned int br; br 3051 sound/soc/codecs/tscs454.c br = FV_I2SMBR_32; br 3055 sound/soc/codecs/tscs454.c br = FV_I2SMBR_32; br 3059 sound/soc/codecs/tscs454.c br = FV_I2SMBR_48; br 3063 sound/soc/codecs/tscs454.c br = FV_I2SMBR_32; br 3067 sound/soc/codecs/tscs454.c br = FV_I2SMBR_48; br 3071 sound/soc/codecs/tscs454.c br = FV_I2SMBR_48; br 3075 sound/soc/codecs/tscs454.c br = FV_I2SMBR_44PT1; br 3079 sound/soc/codecs/tscs454.c br = FV_I2SMBR_44PT1; br 3083 sound/soc/codecs/tscs454.c br = FV_I2SMBR_44PT1; br 3087 sound/soc/codecs/tscs454.c br = FV_I2SMBR_44PT1; br 3113 sound/soc/codecs/tscs454.c FM_I2SMRATE_I2SMBR | FM_I2SMRATE_I2SMBM, br|bm); br 725 tools/perf/builtin-script.c mispred_str(struct branch_entry *br) br 727 tools/perf/builtin-script.c if (!(br->flags.mispred || br->flags.predicted)) br 730 tools/perf/builtin-script.c return br->flags.predicted ? 'P' : 'M'; br 737 tools/perf/builtin-script.c struct branch_stack *br = sample->branch_stack; br 742 tools/perf/builtin-script.c if (!(br && br->nr)) br 745 tools/perf/builtin-script.c for (i = 0; i < br->nr; i++) { br 746 tools/perf/builtin-script.c from = br->entries[i].from; br 747 tools/perf/builtin-script.c to = br->entries[i].to; br 771 tools/perf/builtin-script.c mispred_str( br->entries + i), br 772 tools/perf/builtin-script.c br->entries[i].flags.in_tx? 'X' : '-', br 773 tools/perf/builtin-script.c br->entries[i].flags.abort? 'A' : '-', br 774 tools/perf/builtin-script.c br->entries[i].flags.cycles); br 784 tools/perf/builtin-script.c struct branch_stack *br = sample->branch_stack; br 789 tools/perf/builtin-script.c if (!(br && br->nr)) br 792 tools/perf/builtin-script.c for (i = 0; i < br->nr; i++) { br 796 tools/perf/builtin-script.c from = br->entries[i].from; br 797 tools/perf/builtin-script.c to = br->entries[i].to; br 816 tools/perf/builtin-script.c mispred_str( br->entries + i), br 817 tools/perf/builtin-script.c br->entries[i].flags.in_tx? 'X' : '-', br 818 tools/perf/builtin-script.c br->entries[i].flags.abort? 'A' : '-', br 819 tools/perf/builtin-script.c br->entries[i].flags.cycles); br 829 tools/perf/builtin-script.c struct branch_stack *br = sample->branch_stack; br 834 tools/perf/builtin-script.c if (!(br && br->nr)) br 837 tools/perf/builtin-script.c for (i = 0; i < br->nr; i++) { br 841 tools/perf/builtin-script.c from = br->entries[i].from; br 842 tools/perf/builtin-script.c to = br->entries[i].to; br 865 tools/perf/builtin-script.c mispred_str(br->entries + i), br 866 tools/perf/builtin-script.c br->entries[i].flags.in_tx ? 'X' : '-', br 867 tools/perf/builtin-script.c br->entries[i].flags.abort ? 'A' : '-', br 868 tools/perf/builtin-script.c br->entries[i].flags.cycles); br 1013 tools/perf/builtin-script.c struct branch_stack *br = sample->branch_stack; br 1022 tools/perf/builtin-script.c if (!(br && br->nr)) br 1024 tools/perf/builtin-script.c nr = br->nr; br 1034 tools/perf/builtin-script.c len = grab_bb(buffer, br->entries[nr-1].from, br 1035 tools/perf/builtin-script.c br->entries[nr-1].from, br 1038 tools/perf/builtin-script.c printed += ip__fprintf_sym(br->entries[nr - 1].from, thread, br 1040 tools/perf/builtin-script.c printed += ip__fprintf_jump(br->entries[nr - 1].from, &br->entries[nr - 1], br 1043 tools/perf/builtin-script.c printed += print_srccode(thread, x.cpumode, br->entries[nr - 1].from); br 1048 tools/perf/builtin-script.c if (br->entries[i].from || br->entries[i].to) br 1050 tools/perf/builtin-script.c br->entries[i].from, br 1051 tools/perf/builtin-script.c br->entries[i].to); br 1052 tools/perf/builtin-script.c start = br->entries[i + 1].to; br 1053 tools/perf/builtin-script.c end = br->entries[i].from; br 1058 tools/perf/builtin-script.c end = br->entries[--i].from; br 1071 tools/perf/builtin-script.c printed += ip__fprintf_jump(ip, &br->entries[i], &x, buffer + off, len - off, ++insn, fp, br 1095 tools/perf/builtin-script.c if (br->entries[0].from == sample->ip) br 1097 tools/perf/builtin-script.c if (br->entries[0].flags.abort) br 1108 tools/perf/builtin-script.c start = br->entries[0].to; br 1271 tools/perf/util/annotate.c static const char *annotate__address_color(struct block_range *br) br 1273 tools/perf/util/annotate.c double cov = block_range__coverage(br); br 1288 tools/perf/util/annotate.c static const char *annotate__asm_color(struct block_range *br) br 1290 tools/perf/util/annotate.c double cov = block_range__coverage(br); br 1301 tools/perf/util/annotate.c static void annotate__branch_printf(struct block_range *br, u64 addr) br 1305 tools/perf/util/annotate.c if (!br) br 1309 tools/perf/util/annotate.c if (br->is_target && br->start == addr) { br 1310 tools/perf/util/annotate.c struct block_range *branch = br; br 1319 tools/perf/util/annotate.c p = 100 *(double)br->entry / branch->coverage; br 1335 tools/perf/util/annotate.c if (br->is_branch && br->end == addr) { br 1336 tools/perf/util/annotate.c double p = 100*(double)br->taken / br->coverage; br 1348 tools/perf/util/annotate.c printf(" -%.2f%% (p:%.2f%%)", p, 100*(double)br->pred / br->taken); br 1357 tools/perf/util/annotate.c struct block_range *br; br 1359 tools/perf/util/annotate.c br = block_range__find(addr); br 1360 tools/perf/util/annotate.c color_fprintf(stdout, annotate__address_color(br), " %*" PRIx64 ":", addr_fmt_width, addr); br 1361 tools/perf/util/annotate.c color_fprintf(stdout, annotate__asm_color(br), "%s", dl->al.line); br 1362 tools/perf/util/annotate.c annotate__branch_printf(br, addr); br 315 tools/perf/util/block-range.c double block_range__coverage(struct block_range *br) br 319 tools/perf/util/block-range.c if (!br) { br 326 tools/perf/util/block-range.c sym = br->sym; br 330 tools/perf/util/block-range.c return (double)br->coverage / symbol__annotation(sym)->max_coverage; br 38 tools/perf/util/block-range.h static inline struct block_range *block_range__next(struct block_range *br) br 40 tools/perf/util/block-range.h struct rb_node *n = rb_next(&br->node); br 74 tools/perf/util/block-range.h extern double block_range__coverage(struct block_range *br); br 1778 tools/perf/util/intel-pt.c } br; br 1783 tools/perf/util/intel-pt.c intel_pt_add_lbrs(&br.br_stack, items); br 1784 tools/perf/util/intel-pt.c sample.branch_stack = &br.br_stack; br 1789 tools/perf/util/intel-pt.c br.br_stack.nr = 0; br 1790 tools/perf/util/intel-pt.c sample.branch_stack = &br.br_stack; br 48 tools/perf/util/parse-branch-options.c const struct branch_mode *br; br 65 tools/perf/util/parse-branch-options.c for (br = branch_modes; br->name; br++) { br 66 tools/perf/util/parse-branch-options.c if (!strcasecmp(s, br->name)) br 69 tools/perf/util/parse-branch-options.c if (!br->name) { br 76 tools/perf/util/parse-branch-options.c *mode |= br->mode; br 466 tools/perf/util/scripting-engines/trace-event-python.c struct branch_stack *br = sample->branch_stack; br 474 tools/perf/util/scripting-engines/trace-event-python.c if (!(br && br->nr)) br 477 tools/perf/util/scripting-engines/trace-event-python.c for (i = 0; i < br->nr; i++) { br 487 tools/perf/util/scripting-engines/trace-event-python.c PyLong_FromUnsignedLongLong(br->entries[i].from)); br 489 tools/perf/util/scripting-engines/trace-event-python.c PyLong_FromUnsignedLongLong(br->entries[i].to)); br 491 tools/perf/util/scripting-engines/trace-event-python.c PyBool_FromLong(br->entries[i].flags.mispred)); br 493 tools/perf/util/scripting-engines/trace-event-python.c PyBool_FromLong(br->entries[i].flags.predicted)); br 495 tools/perf/util/scripting-engines/trace-event-python.c PyBool_FromLong(br->entries[i].flags.in_tx)); br 497 tools/perf/util/scripting-engines/trace-event-python.c PyBool_FromLong(br->entries[i].flags.abort)); br 499 tools/perf/util/scripting-engines/trace-event-python.c PyLong_FromUnsignedLongLong(br->entries[i].flags.cycles)); br 502 tools/perf/util/scripting-engines/trace-event-python.c br->entries[i].from, &al); br 508 tools/perf/util/scripting-engines/trace-event-python.c br->entries[i].to, &al); br 563 tools/perf/util/scripting-engines/trace-event-python.c struct branch_stack *br = sample->branch_stack; br 573 tools/perf/util/scripting-engines/trace-event-python.c if (!(br && br->nr)) br 576 tools/perf/util/scripting-engines/trace-event-python.c for (i = 0; i < br->nr; i++) { br 584 tools/perf/util/scripting-engines/trace-event-python.c br->entries[i].from, &al); br 590 tools/perf/util/scripting-engines/trace-event-python.c br->entries[i].to, &al); br 595 tools/perf/util/scripting-engines/trace-event-python.c get_br_mspred(&br->entries[i].flags, bf, sizeof(bf)); br 599 tools/perf/util/scripting-engines/trace-event-python.c if (br->entries[i].flags.in_tx) { br 607 tools/perf/util/scripting-engines/trace-event-python.c if (br->entries[i].flags.abort) {