Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: xen and networking problems



On Thu, Nov 05, 2009 at 08:02:22AM -0700, Brook Milligan wrote:
> Here is some additional information.  It seems that the presence or
> absence of PAE support may be related to the lack of a functioning fxp
> interface.  I have now tested the machine with a series of xen/kernel
> combinations.  These were all built from cvs checkout of source as of
> 2009-08-01 for src and pkgsrc-2009Q3 for pkgsrc.
> 
> xen           kernel          fxp
> none          MONOLITHIC      functional
> 3.1.4         XEN3_DOM0       functional
> 3.1.4/PAE     XEN3PAE_DOM0    nonfunctional
> 3.3.2         XEN3PAE_DOM0    nonfunctional
> 
> As far as I can tell, xen v3.3.2 will only boot PAE kernels.
> 
> By a nonfunctional fxp interface, I mean that upon entry into the
> fxp_rxintr function the value of rfa->rfa_status is always zero, which
> is interpreted by the driver to mean that no packets are available.
> 
> What about the PAE support in xen, the kernel, or both could lead to
> this problem?

How much RAM does you machine have ? If this systeme supports it it would also
be usefull to test amd64.

It looks like this driver doesn't deal well with 64bit physical addresses.
Would the attached patch help ?

-- 
Manuel Bouyer, LIP6, Universite Paris VI.           
Manuel.Bouyer%lip6.fr@localhost
     NetBSD: 26 ans d'experience feront toujours la difference
--
Index: i82557.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/i82557.c,v
retrieving revision 1.130
diff -u -p -u -r1.130 i82557.c
--- i82557.c    15 Sep 2009 19:20:30 -0000      1.130
+++ i82557.c    5 Nov 2009 15:56:42 -0000
@@ -912,7 +912,7 @@ fxp_start(struct ifnet *ifp)
                        tbdp++;
                for (seg = 0; seg < nsegs; seg++) {
                        tbdp[seg].tb_addr =
-                           htole32(dmamap->dm_segs[seg].ds_addr);
+                           htole32((uint32_t)dmamap->dm_segs[seg].ds_addr);
                        tbdp[seg].tb_size =
                            htole32(dmamap->dm_segs[seg].ds_len);
                }
@@ -1150,7 +1150,7 @@ fxp_intr(void *arg)
                        rxmap = M_GETCTX(sc->sc_rxq.ifq_head, bus_dmamap_t);
                        fxp_scb_wait(sc);
                        CSR_WRITE_4(sc, FXP_CSR_SCB_GENERAL,
-                           rxmap->dm_segs[0].ds_addr +
+                           (uint32_t)rxmap->dm_segs[0].ds_addr +
                            RFA_ALIGNMENT_FUDGE);
                        fxp_scb_cmd(sc, FXP_SCB_COMMAND_RU_START);
                }
@@ -2003,7 +2003,7 @@ fxp_init(struct ifnet *ifp)
        rxmap = M_GETCTX(sc->sc_rxq.ifq_head, bus_dmamap_t);
        fxp_scb_wait(sc);
        CSR_WRITE_4(sc, FXP_CSR_SCB_GENERAL,
-           rxmap->dm_segs[0].ds_addr + RFA_ALIGNMENT_FUDGE);
+           (uint32_t)rxmap->dm_segs[0].ds_addr + RFA_ALIGNMENT_FUDGE);
        fxp_scb_cmd(sc, FXP_SCB_COMMAND_RU_START);
 #endif
 
Index: i82557var.h
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/i82557var.h,v
retrieving revision 1.47
diff -u -p -u -r1.47 i82557var.h
--- i82557var.h 12 May 2009 14:25:17 -0000      1.47
+++ i82557var.h 5 Nov 2009 15:56:42 -0000
@@ -179,7 +179,7 @@ struct fxp_softc {
         * fxp_rxdesc DMA map on a per-mbuf basis.
         */
        bus_dmamap_t sc_dmamap;
-#define        sc_cddma        sc_dmamap->dm_segs[0].ds_addr
+#define        sc_cddma        (uint32_t)sc_dmamap->dm_segs[0].ds_addr
 
        /*
         * Software state for transmit descriptors.
@@ -335,7 +335,7 @@ do {                                                        
                \
                                                                        \
        if ((__p_m = (sc)->sc_rxq.ifq_tail) != NULL) {                  \
                __p_rfa = FXP_MTORFA(__p_m);                            \
-               __v = htole32(__rxmap->dm_segs[0].ds_addr +             \
+               __v = htole32((uint32_t)__rxmap->dm_segs[0].ds_addr +   \
                    RFA_ALIGNMENT_FUDGE);                               \
                FXP_RFASYNC((sc), __p_m,                                \
                    BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);        \


Home | Main Index | Thread Index | Old Index