Hello community, here is the log from the commit of package dynamips for openSUSE:Factory checked in at 2014-03-04 13:21:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/dynamips (Old) and /work/SRC/openSUSE:Factory/.dynamips.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "dynamips" Changes: -------- --- /work/SRC/openSUSE:Factory/dynamips/dynamips.changes 2014-02-20 06:21:37.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.dynamips.new/dynamips.changes 2014-03-04 13:21:11.000000000 +0100 @@ -1,0 +2,7 @@ +Mon Mar 3 17:15:00 UTC 2014 - andrea@opensuse.org + +- Fixed multicast related bugs adding the following two patches: + * dynamips-0.2.11_fix_M_bit.patch + * dynamips-0.2.11_fix_mcast_queue.patch + +------------------------------------------------------------------- New: ---- dynamips-0.2.11_fix_M_bit.patch dynamips-0.2.11_fix_mcast_queue.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dynamips.spec ++++++ --- /var/tmp/diff_new_pack.s5lJ1e/_old 2014-03-04 13:21:12.000000000 +0100 +++ /var/tmp/diff_new_pack.s5lJ1e/_new 2014-03-04 13:21:12.000000000 +0100 @@ -37,6 +37,8 @@ %endif %endif Source: http://sourceforge.net/projects/gns-3/files/Dynamips/%{version}/%{name}-%{version}-source.zip +Patch0: %{name}-%{version}_fix_M_bit.patch +Patch1: %{name}-%{version}_fix_mcast_queue.patch Summary: Cisco router Emulator License: GPL-2.0+ Group: System/Emulators/Other @@ -52,6 +54,8 @@ %prep %setup -q -n %{name}-%{version}-source +%patch0 -p1 +%patch1 -p1 %build %ifarch x86_64 ++++++ dynamips-0.2.11_fix_M_bit.patch ++++++ --- dynamips-0.2.11-source.orig/common/dev_gt.c 2014-02-10 17:50:38.000000000 +0100 +++ dynamips-0.2.11-source.patched/common/dev_gt.c 2014-02-25 07:58:17.000190403 +0100 @@ -328,7 +328,7 @@ #define GT_RXDESC_ES 0x00008000 /* Error Summary */ #define GT_RXDESC_IGMP 0x00004000 /* IGMP packet detected */ #define GT_RXDESC_HE 0x00002000 /* Hash Table Expired */ -#define GT_RXDESC_M 0x00001000 /* Missed Frame */ +#define GT_RXDESC_M 0x00001000 /* Dst MAC Miss in Hash Table */ #define GT_RXDESC_FT 0x00000800 /* Frame Type (802.3/Ethernet) */ #define GT_RXDESC_SF 0x00000100 /* Short Frame Error */ #define GT_RXDESC_MFL 0x00000080 /* Maximum Frame Length Error */ @@ -2354,11 +2354,21 @@ * * Return values: * - 0: Discard packet ; - * - 1: Receive packet ; - * - 2: Receive packet and set "M" bit in RX descriptor. + * - 1: Receive packet but set "M" bit in RX descriptor ; + * - 2: Receive packet. * * The documentation is not clear about the M bit in RX descriptor. * It is described as "Miss" or "Match" depending on the section. + * However, it turns out that IOS treats the bit as "Miss" bit. + * If the bit is set, the destination MAC address has not been found + * in the hash table, and the frame may be subject to software MAC + * address filter associated by IOS with the interface. If the bit + * is clear, the destination MAC address has been found in the hash + * table and the frame will be accepted by IOS unconditionally. + * The M bit is required to correctly handle unicast frames destined + * to other MAC addresses when the interface works in promiscuous mode. + * IOS puts an interface into promiscuous mode when multicast routing + * or bridging has been configured on it. */ static inline int gt_eth_handle_rx_daddr(struct gt_data *d, struct eth_port *port, @@ -2474,7 +2484,7 @@ if (hash_res == GT_HTLOOKUP_HOP_EXCEEDED) rxd0.cmd_stat |= GT_RXDESC_HE; - if (addr_action == 2) + if (addr_action == 1) rxd0.cmd_stat |= GT_RXDESC_M; if (ntohs(hdr->type) <= N_ETH_MTU) /* 802.3 frame */ ++++++ dynamips-0.2.11_fix_mcast_queue.patch ++++++ --- dynamips-0.2.11-source.orig/common/dev_gt.c 2014-03-02 15:22:17.881753020 +0100 +++ dynamips-0.2.11-source.patched/common/dev_gt.c 2014-03-02 15:15:55.467367795 +0100 @@ -2093,8 +2093,8 @@ int queue) { u_char pkt[GT_MAX_PKT_SIZE],*pkt_ptr; - struct sdma_desc txd0,ctxd,*ptxd; - m_uint32_t tx_start,tx_current; + struct sdma_desc ctxd; + m_uint32_t tx_current; m_uint32_t len,tot_len; int abort = FALSE; @@ -2106,17 +2106,29 @@ return(FALSE); /* Copy the current txring descriptor */ - tx_start = tx_current = port->tx_current[queue]; + tx_current = port->tx_current[queue]; - if (!tx_start) + if (!tx_current) return(FALSE); - ptxd = &txd0; - gt_sdma_desc_read(d,tx_start,ptxd); + gt_sdma_desc_read(d,tx_current,&ctxd); /* If we don't own the first descriptor, we cannot transmit */ - if (!(txd0.cmd_stat & GT_TXDESC_OWN)) + if (!(ctxd.cmd_stat & GT_TXDESC_OWN)) { + if (queue == 0) { + port->icr |= GT_ICR_TXENDL; + port->sdcmr |= GT_SDCMR_STDL; + port->sdcmr &= ~GT_SDCMR_TXDL; + + } else { + port->icr |= GT_ICR_TXENDH; + port->sdcmr |= GT_SDCMR_STDH; + port->sdcmr &= ~GT_SDCMR_TXDH; + } + + gt_eth_update_int_status(d,port); return(FALSE); + } /* Empty packet for now */ pkt_ptr = pkt; @@ -2125,43 +2137,41 @@ for(;;) { #if DEBUG_ETH_TX GT_LOG(d,"gt_eth_handle_txqueue: loop: " - "cmd_stat=0x%x, buf_size=0x%x, next_ptr=0x%x, buf_ptr=0x%x\n", - ptxd->cmd_stat,ptxd->buf_size,ptxd->next_ptr,ptxd->buf_ptr); + "tx_current=0x%08x, cmd_stat=0x%08x, buf_size=0x%08x, next_ptr=0x%08x, buf_ptr=0x%08x\n", + tx_current, ctxd.cmd_stat, ctxd.buf_size, ctxd.next_ptr, ctxd.buf_ptr); #endif - if (!(ptxd->cmd_stat & GT_TXDESC_OWN)) { + if (!(ctxd.cmd_stat & GT_TXDESC_OWN)) { GT_LOG(d,"gt_eth_handle_txqueue: descriptor not owned!\n"); abort = TRUE; break; } /* Copy packet data to the buffer */ - len = (ptxd->buf_size & GT_TXDESC_BC_MASK) >> GT_TXDESC_BC_SHIFT; + len = (ctxd.buf_size & GT_TXDESC_BC_MASK) >> GT_TXDESC_BC_SHIFT; - physmem_copy_from_vm(d->vm,pkt_ptr,ptxd->buf_ptr,len); + physmem_copy_from_vm(d->vm,pkt_ptr,ctxd.buf_ptr,len); pkt_ptr += len; tot_len += len; - /* Clear the OWN bit if this is not the first descriptor */ - if (!(ptxd->cmd_stat & GT_TXDESC_F)) { - ptxd->cmd_stat &= ~GT_TXDESC_OWN; - physmem_copy_u32_to_vm(d->vm,tx_current,ptxd->cmd_stat); + /* Clear the OWN bit if this is not the last descriptor */ + if (!(ctxd.cmd_stat & GT_TXDESC_L)) { + ctxd.cmd_stat &= ~GT_TXDESC_OWN; + physmem_copy_u32_to_vm(d->vm,tx_current+4,ctxd.cmd_stat); } - tx_current = ptxd->next_ptr; - /* Last descriptor or no more desc available ? */ - if (ptxd->cmd_stat & GT_TXDESC_L) + if (ctxd.cmd_stat & GT_TXDESC_L) break; - if (!tx_current) { + if (!(ctxd.next_ptr)) { abort = TRUE; break; } /* Fetch the next descriptor */ + tx_current = ctxd.next_ptr; gt_sdma_desc_read(d,tx_current,&ctxd); - ptxd = &ctxd; } if ((tot_len != 0) && !abort) { @@ -2180,11 +2190,11 @@ port->tx_frames++; } - /* Clear the OWN flag of the first descriptor */ - txd0.cmd_stat &= ~GT_TXDESC_OWN; - physmem_copy_u32_to_vm(d->vm,tx_start+4,txd0.cmd_stat); + /* Clear the OWN flag of the last descriptor */ + ctxd.cmd_stat &= ~GT_TXDESC_OWN; + physmem_copy_u32_to_vm(d->vm,tx_current+4,ctxd.cmd_stat); - port->tx_current[queue] = tx_current; + port->tx_current[queue] = tx_current = ctxd.next_ptr; /* Notify host about transmitted packet */ if (queue == 0) -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org