Home
last modified time | relevance | path

Searched refs:mac (Results 1 – 25 of 61) sorted by relevance

123

/qemu/hw/net/
H A De1000x_common.h31 if (mac[index] != UINT32_MAX) { in e1000x_inc_reg_if_not_full()
32 mac[index]++; in e1000x_inc_reg_if_not_full()
39 uint64_t sum = mac[index] | (uint64_t)mac[index + 1] << 32; in e1000x_grow_8reg_if_not_full()
46 mac[index] = sum; in e1000x_grow_8reg_if_not_full()
47 mac[index + 1] = sum >> 32; in e1000x_grow_8reg_if_not_full()
51 e1000x_vlan_enabled(uint32_t *mac) in e1000x_vlan_enabled() argument
63 e1000x_vlan_rx_filter_enabled(uint32_t *mac) in e1000x_vlan_rx_filter_enabled() argument
69 e1000x_fcs_len(uint32_t *mac) in e1000x_fcs_len() argument
80 mac[STATUS] &= ~E1000_STATUS_LU; in e1000x_update_regs_on_link_down()
89 mac[STATUS] |= E1000_STATUS_LU; in e1000x_update_regs_on_link_up()
[all …]
H A De1000x_common.c63 if (e1000x_vlan_rx_filter_enabled(mac)) { in e1000x_rx_vlan_filter()
98 for (rp = mac + RA; rp < mac + RA + 32; rp += 2) { in e1000x_rx_group_filter()
126 bool e1000x_hw_rx_enabled(uint32_t *mac) in e1000x_hw_rx_enabled() argument
128 if (!(mac[STATUS] & E1000_STATUS_LU)) { in e1000x_hw_rx_enabled()
133 if (!(mac[RCTL] & E1000_RCTL_EN)) { in e1000x_hw_rx_enabled()
254 e1000x_inc_reg_if_not_full(mac, TPR); in e1000x_update_rx_total_stats()
319 uint32_t timinca = mac[TIMINCA]; in e1000x_timestamp()
324 mac[lo] = timestamp & 0xffffffff; in e1000x_timestamp()
325 mac[hi] = timestamp >> 32; in e1000x_timestamp()
331 uint32_t old_val = mac[TIMINCA]; in e1000x_set_timinca()
[all …]
H A De1000e_core.c160 if (timer->core->mac[IMS] & timer->core->mac[ICR]) { in e1000e_intrmgr_on_throttling_timer()
799 return core->mac[r->dh] == core->mac[r->dt] || in e1000e_ring_empty()
834 if (core->mac[r->dh] <= core->mac[r->dt]) { in e1000e_ring_free_descr_num()
835 return core->mac[r->dt] - core->mac[r->dh]; in e1000e_ring_free_descr_num()
838 if (core->mac[r->dh] > core->mac[r->dt]) { in e1000e_ring_free_descr_num()
840 core->mac[r->dt] - core->mac[r->dh]; in e1000e_ring_free_descr_num()
1824 core->mac[CTRL_DUP] = core->mac[CTRL]; in e1000e_set_ctrl()
2129 core->mac[ICS] = core->mac[ICR]; in e1000e_raise_interrupts()
2167 core->mac[ICS] = core->mac[ICR]; in e1000e_lower_interrupts()
2172 if (!(core->mac[IMS] & core->mac[ICR]) && in e1000e_lower_interrupts()
[all …]
H A Digb_core.c137 trace_e1000e_irq_icr_clear_eiac(core->mac[EICR], core->mac[EIAC]); in igb_msix_notify()
705 return core->mac[r->dh] == core->mac[r->dt] || in igb_ring_empty()
738 core->mac[r->dh], core->mac[r->dt]); in igb_ring_free_descr_num()
740 if (core->mac[r->dh] <= core->mac[r->dt]) { in igb_ring_free_descr_num()
741 return core->mac[r->dt] - core->mac[r->dh]; in igb_ring_free_descr_num()
744 if (core->mac[r->dh] > core->mac[r->dt]) { in igb_ring_free_descr_num()
746 core->mac[r->dt] - core->mac[r->dh]; in igb_ring_free_descr_num()
2173 core->mac[CTRL_DUP] = core->mac[CTRL]; in igb_set_ctrl()
2290 uint32_t old_causes = core->mac[ICR] & core->mac[IMS]; in igb_raise_interrupts()
2291 uint32_t old_ecauses = core->mac[EICR] & core->mac[EIMS]; in igb_raise_interrupts()
[all …]
H A De1000e.c360 e1000e_gen_dsn(uint8_t *mac) in e1000e_gen_dsn() argument
362 return (uint64_t)(mac[5]) | in e1000e_gen_dsn()
363 (uint64_t)(mac[4]) << 8 | in e1000e_gen_dsn()
364 (uint64_t)(mac[3]) << 16 | in e1000e_gen_dsn()
367 (uint64_t)(mac[2]) << 40 | in e1000e_gen_dsn()
368 (uint64_t)(mac[1]) << 48 | in e1000e_gen_dsn()
369 (uint64_t)(mac[0]) << 56; in e1000e_gen_dsn()
525 s->core.mac[VET] = ETH_P_VLAN; in e1000e_qdev_reset_hold()
625 VMSTATE_UINT32_ARRAY(core.mac, E1000EState, E1000E_MAC_SIZE),
H A Dnpcm7xx_emc.c448 struct MACAddr mac; in emc_receive_filter1() local
454 mac.a[0] = value >> 24; in emc_receive_filter1()
455 mac.a[1] = value >> 16; in emc_receive_filter1()
456 mac.a[2] = value >> 8; in emc_receive_filter1()
457 mac.a[3] = value >> 0; in emc_receive_filter1()
459 mac.a[4] = value >> 24; in emc_receive_filter1()
460 mac.a[5] = value >> 16; in emc_receive_filter1()
465 memcmp(buf, mac.a, ETH_ALEN) == 0); in emc_receive_filter1()
H A Dsungem.c214 MemoryRegion mac; member
487 static int sungem_check_rx_mac(SunGEMState *s, const uint8_t *mac, uint32_t crc) in sungem_check_rx_mac() argument
498 mac0 = (mac[4] << 8) | mac[5]; in sungem_check_rx_mac()
499 mac1 = (mac[2] << 8) | mac[3]; in sungem_check_rx_mac()
500 mac2 = (mac[0] << 8) | mac[1]; in sungem_check_rx_mac()
512 if (mac[0] & 1) { in sungem_check_rx_mac()
1385 memory_region_init_io(&s->mac, OBJECT(s), &sungem_mmio_mac_ops, s, in sungem_realize()
1387 memory_region_add_subregion(&s->sungem, 0x6000, &s->mac); in sungem_realize()
H A Dvirtio-net.c94 .end = endof(struct virtio_net_config, mac)},
109 .min_size = endof(struct virtio_net_config, mac),
152 memcpy(netcfg.mac, n->mac, ETH_ALEN); in virtio_net_get_config()
182 memcpy(netcfg.mac, n->mac, ETH_ALEN); in virtio_net_get_config()
201 memcmp(netcfg.mac, n->mac, ETH_ALEN)) { in virtio_net_set_config()
202 memcpy(n->mac, netcfg.mac, ETH_ALEN); in virtio_net_set_config()
520 info->main_mac = qemu_mac_strdup_printf(n->mac); in virtio_net_query_rxfilter()
626 memcpy(&n->mac[0], &n->nic->conf->macaddr, sizeof(n->mac)); in virtio_net_reset()
1144 s = iov_to_buf(iov, iov_cnt, 0, &n->mac, sizeof(n->mac)); in virtio_net_handle_mac()
1145 assert(s == sizeof(n->mac)); in virtio_net_handle_mac()
[all …]
H A Dcadence_gem.c759 static unsigned get_bit(const uint8_t *mac, unsigned bit) in get_bit() argument
763 byte = mac[bit / 8]; in get_bit()
773 static unsigned calc_mac_hash(const uint8_t *mac) in calc_mac_hash() argument
781 hash_index |= (get_bit(mac, mac_bit) ^ in calc_mac_hash()
782 get_bit(mac, mac_bit + 6) ^ in calc_mac_hash()
783 get_bit(mac, mac_bit + 12) ^ in calc_mac_hash()
784 get_bit(mac, mac_bit + 18) ^ in calc_mac_hash()
785 get_bit(mac, mac_bit + 24) ^ in calc_mac_hash()
786 get_bit(mac, mac_bit + 30) ^ in calc_mac_hash()
787 get_bit(mac, mac_bit + 36) ^ in calc_mac_hash()
[all …]
H A Dxen_nic.c606 MACAddr mac; in type_init() local
621 if (net_parse_macaddr(mac.a, macstr) < 0) { in type_init()
630 memcpy(&net->conf.macaddr, &mac, sizeof(mac)); in type_init()
H A Digb_core.h67 uint32_t mac[E1000E_MAC_SIZE]; member
H A De1000e_core.h62 uint32_t mac[E1000E_MAC_SIZE]; member
/qemu/pc-bios/s390-ccw/
H A Dnetmain.c57 static uint8_t mac[6]; variable
123 static void seed_rng(uint8_t mac[]) in seed_rng() argument
128 seed ^= (mac[2] << 24) | (mac[3] << 16) | (mac[4] << 8) | mac[5]; in seed_rng()
164 rc = virtio_net_init(mac); in net_init()
172 mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); in net_init()
174 set_mac_address(mac); /* init ethernet layer */ in net_init()
175 seed_rng(mac); in net_init()
334 num_ent = pxelinux_load_parse_cfg(fn_ip, mac, get_uuid(), in net_try_pxelinux_cfg()
/qemu/tests/tcg/sh4/
H A Dtest-macw.c7 int64_t mac_w(int64_t mac, const int16_t *a, const int16_t *b) in mac_w() argument
9 register uint32_t macl __asm__("macl") = mac; in mac_w()
10 register uint32_t mach __asm__("mach") = mac >> 32; in mac_w()
19 int64_t mac; member
34 res = mac_w(t->mac, &t->a, &t->b); in test()
38 t->mac, t->a, t->b, t->res[sat], res); in test()
H A Dtest-macl.c10 int64_t mac_l(int64_t mac, const int32_t *a, const int32_t *b) in mac_l() argument
12 register uint32_t macl __asm__("macl") = mac; in mac_l()
13 register uint32_t mach __asm__("mach") = mac >> 32; in mac_l()
22 int64_t mac; member
37 res = mac_l(t->mac, &t->a, &t->b); in test()
41 t->mac, t->a, t->b, t->res[sat], res); in test()
/qemu/net/
H A Dannounce.c126 static const char *qemu_ether_ntoa(const MACAddr *mac) in qemu_ether_ntoa() argument
131 mac->a[0], mac->a[1], mac->a[2], mac->a[3], mac->a[4], mac->a[5]); in qemu_ether_ntoa()
/qemu/target/openrisc/
H A Dsys_helper.c147 env->mac = deposit64(env->mac, 0, 32, rb); in HELPER()
150 env->mac = deposit64(env->mac, 32, 32, rb); in HELPER()
331 return (uint32_t)env->mac; in HELPER()
334 return env->mac >> 32; in HELPER()
/qemu/hw/m68k/
H A Dq800.c275 MACAddr mac; in q800_machine_init() local
391 memcpy(mac.a, nd->macaddr.a, sizeof(mac.a)); in q800_machine_init()
393 qemu_macaddr_default_if_unset(&mac); in q800_machine_init()
395 mac.a[0] = 0x08; in q800_machine_init()
396 mac.a[1] = 0x00; in q800_machine_init()
397 mac.a[2] = 0x07; in q800_machine_init()
398 qdev_prop_set_macaddr(dev, "mac", mac.a); in q800_machine_init()
420 prom[i] = revbit8(mac.a[i]); in q800_machine_init()
/qemu/target/sh4/
H A Dop_helper.c166 int64_t mac = env->mac; in helper_macl() local
170 res = mac + mul; in helper_macl()
171 } else if (sadd64_overflow(mac, mul, &res)) { in helper_macl()
172 res = mac < 0 ? min : max; in helper_macl()
177 env->mac = res; in helper_macl()
201 env->mac += mul; in helper_macw()
/qemu/hw/arm/
H A Dstellaris.c1047 MACAddr mac; in stellaris_init() local
1081 memcpy(mac.a, nd->macaddr.a, sizeof(mac.a)); in stellaris_init()
1083 qemu_macaddr_default_if_unset(&mac); in stellaris_init()
1087 mac.a[0] | (mac.a[1] << 8) | (mac.a[2] << 16)); in stellaris_init()
1089 mac.a[3] | (mac.a[4] << 8) | (mac.a[5] << 16)); in stellaris_init()
1313 qdev_prop_set_macaddr(enet, "mac", mac.a); in stellaris_init()
/qemu/hw/core/
H A Dqdev-properties-system.c307 MACAddr *mac = object_field_prop_ptr(obj, prop); in get_mac() local
312 mac->a[0], mac->a[1], mac->a[2], in get_mac()
313 mac->a[3], mac->a[4], mac->a[5]); in get_mac()
322 MACAddr *mac = object_field_prop_ptr(obj, prop); in set_mac() local
352 mac->a[i] = val; in set_mac()
/qemu/hw/nubus/
H A Dmeson.build6 nubus_ss.add(when: 'CONFIG_Q800', if_true: files('mac-nubus-bridge.c'))
/qemu/docs/
H A Dcolo-proxy.txt166 -device e1000,id=e0,netdev=hn0,mac=52:a4:00:12:78:66
181 -device e1000,netdev=hn0,mac=52:a4:00:12:78:66
192 -device e1000,id=e0,netdev=hn0,mac=52:a4:00:12:78:66
206 -device e1000,netdev=hn0,mac=52:a4:00:12:78:66
/qemu/target/hexagon/imported/
H A Dmpy.idef92 /* multiply/mac 32x32->64 instructions */
104 /* multiply/mac 32x32->32 (upper) instructions */
199 /* vector mac 2x[16x16 -> 32] */
282 /* vector mac 4x[16x16] + 64 ->64 */
345 "vector dual mac bytes",
374 "vector dual mac bytes",
409 "vector mac bytes",
418 "vector mac bytes",
443 "vector quad mac bytes",
486 /* complex multiply/mac with */
[all …]
/qemu/hw/net/rocker/
H A Drocker_of_dpa.c216 char buf[512], *b = buf, *mac; in of_dpa_flow_key_dump() local
243 mac = qemu_mac_strdup_printf(key->eth.src.a); in of_dpa_flow_key_dump()
244 b += sprintf(b, " src %s", mac); in of_dpa_flow_key_dump()
245 g_free(mac); in of_dpa_flow_key_dump()
248 b += sprintf(b, "/%s", mac); in of_dpa_flow_key_dump()
249 g_free(mac); in of_dpa_flow_key_dump()
255 mac = qemu_mac_strdup_printf(key->eth.dst.a); in of_dpa_flow_key_dump()
256 b += sprintf(b, " dst %s", mac); in of_dpa_flow_key_dump()
257 g_free(mac); in of_dpa_flow_key_dump()
260 b += sprintf(b, "/%s", mac); in of_dpa_flow_key_dump()
[all …]

123