3947 ldv, endldg, (*ldgp)->ldg, (*ldgp)->ldvp));
3948
3949 (*ldgp)->nldvs++;
3950 if ((*ldgp)->ldg == (endldg - 1)) {
3951 if ((*ldgp)->ldvp == NULL) {
3952 (*ldgp)->ldvp = *ldvp;
3953 *ngrps += 1;
3954 NXGE_DEBUG_MSG((NULL, INT_CTL,
3955 "==> nxge_ldgv_setup: ngrps %d", *ngrps));
3956 }
3957 NXGE_DEBUG_MSG((NULL, INT_CTL,
3958 "==> nxge_ldgv_setup: ldvp $%p ngrps %d",
3959 *ldvp, *ngrps));
3960 ++*ldvp;
3961 } else {
3962 (*ldgp)->ldvp = *ldvp;
3963 *ngrps += 1;
3964 NXGE_DEBUG_MSG((NULL, INT_CTL, "==> nxge_ldgv_setup(done): "
3965 "ldv %d endldg %d ldg %d, ldvp $%p",
3966 ldv, endldg, (*ldgp)->ldg, (*ldgp)->ldvp));
3967 (*ldvp) = ++*ldvp;
3968 (*ldgp) = ++*ldgp;
3969 NXGE_DEBUG_MSG((NULL, INT_CTL,
3970 "==> nxge_ldgv_setup: new ngrps %d", *ngrps));
3971 }
3972
3973 NXGE_DEBUG_MSG((NULL, INT_CTL, "==> nxge_ldgv_setup: "
3974 "ldv %d ldvp $%p endldg %d ngrps %d",
3975 ldv, ldvp, endldg, *ngrps));
3976
3977 NXGE_DEBUG_MSG((NULL, INT_CTL, "<== nxge_ldgv_setup"));
3978 }
3979
3980 /*
3981 * Note: This function assumes the following distribution of mac
3982 * addresses among 4 ports in neptune:
3983 *
3984 * -------------
3985 * 0| |0 - local-mac-address for fn 0
3986 * -------------
3987 * 1| |1 - local-mac-address for fn 1
3988 * -------------
|
3947 ldv, endldg, (*ldgp)->ldg, (*ldgp)->ldvp));
3948
3949 (*ldgp)->nldvs++;
3950 if ((*ldgp)->ldg == (endldg - 1)) {
3951 if ((*ldgp)->ldvp == NULL) {
3952 (*ldgp)->ldvp = *ldvp;
3953 *ngrps += 1;
3954 NXGE_DEBUG_MSG((NULL, INT_CTL,
3955 "==> nxge_ldgv_setup: ngrps %d", *ngrps));
3956 }
3957 NXGE_DEBUG_MSG((NULL, INT_CTL,
3958 "==> nxge_ldgv_setup: ldvp $%p ngrps %d",
3959 *ldvp, *ngrps));
3960 ++*ldvp;
3961 } else {
3962 (*ldgp)->ldvp = *ldvp;
3963 *ngrps += 1;
3964 NXGE_DEBUG_MSG((NULL, INT_CTL, "==> nxge_ldgv_setup(done): "
3965 "ldv %d endldg %d ldg %d, ldvp $%p",
3966 ldv, endldg, (*ldgp)->ldg, (*ldgp)->ldvp));
3967 ++*ldvp;
3968 ++*ldgp;
3969 NXGE_DEBUG_MSG((NULL, INT_CTL,
3970 "==> nxge_ldgv_setup: new ngrps %d", *ngrps));
3971 }
3972
3973 NXGE_DEBUG_MSG((NULL, INT_CTL, "==> nxge_ldgv_setup: "
3974 "ldv %d ldvp $%p endldg %d ngrps %d",
3975 ldv, ldvp, endldg, *ngrps));
3976
3977 NXGE_DEBUG_MSG((NULL, INT_CTL, "<== nxge_ldgv_setup"));
3978 }
3979
3980 /*
3981 * Note: This function assumes the following distribution of mac
3982 * addresses among 4 ports in neptune:
3983 *
3984 * -------------
3985 * 0| |0 - local-mac-address for fn 0
3986 * -------------
3987 * 1| |1 - local-mac-address for fn 1
3988 * -------------
|