* [PATCH net 4/6] bnx2x: prevent masking error from cnic
From: Yuval Mintz @ 2013-09-23 7:12 UTC (permalink / raw)
To: davem, netdev; +Cc: ariele, eilong, Yuval Mintz
In-Reply-To: <1379920375-10303-1-git-send-email-yuvalmin@broadcom.com>
During error flows while loading cnic the return value was incorrectly replaced
by that of bnx2x_set_real_num_queues(); If that function was to finish
successfully then the cnic would have mistakenly thought the load ended
successfully, causing issues (& panics) later on.
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index 61726af..e66beff 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -2481,8 +2481,7 @@ load_error_cnic2:
load_error_cnic1:
bnx2x_napi_disable_cnic(bp);
/* Update the number of queues without the cnic queues */
- rc = bnx2x_set_real_num_queues(bp, 0);
- if (rc)
+ if (bnx2x_set_real_num_queues(bp, 0))
BNX2X_ERR("Unable to set real_num_queues not including cnic\n");
load_error_cnic0:
BNX2X_ERR("CNIC-related load failed\n");
--
1.8.1.4
^ permalink raw reply related
* [PATCH net 1/6] bnx2x: Prevent mistaken hangup between driver & FW
From: Yuval Mintz @ 2013-09-23 7:12 UTC (permalink / raw)
To: davem, netdev; +Cc: ariele, eilong, Yuval Mintz
In-Reply-To: <1379920375-10303-1-git-send-email-yuvalmin@broadcom.com>
From: Eilon Greenstein <eilong@broadcom.com>
When system CPU is stressed it's possible that the driver will not be able
to pulse the FW every second, which will cause the log to be filled with
error messages.
Increasing the threshold to 5 seconds seems to be enough to eliminate the
issue.
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index a6704b5..f403c6b 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -5447,26 +5447,24 @@ static void bnx2x_timer(unsigned long data)
if (IS_PF(bp) &&
!BP_NOMCP(bp)) {
int mb_idx = BP_FW_MB_IDX(bp);
- u32 drv_pulse;
- u32 mcp_pulse;
+ u16 drv_pulse;
+ u16 mcp_pulse;
++bp->fw_drv_pulse_wr_seq;
bp->fw_drv_pulse_wr_seq &= DRV_PULSE_SEQ_MASK;
- /* TBD - add SYSTEM_TIME */
drv_pulse = bp->fw_drv_pulse_wr_seq;
bnx2x_drv_pulse(bp);
mcp_pulse = (SHMEM_RD(bp, func_mb[mb_idx].mcp_pulse_mb) &
MCP_PULSE_SEQ_MASK);
/* The delta between driver pulse and mcp response
- * should be 1 (before mcp response) or 0 (after mcp response)
+ * should not get too big. If the MFW is more than 5 pulses
+ * behind, we should worry about it enough to generate an error
+ * log.
*/
- if ((drv_pulse != mcp_pulse) &&
- (drv_pulse != ((mcp_pulse + 1) & MCP_PULSE_SEQ_MASK))) {
- /* someone lost a heartbeat... */
- BNX2X_ERR("drv_pulse (0x%x) != mcp_pulse (0x%x)\n",
+ if (((drv_pulse - mcp_pulse) & MCP_PULSE_SEQ_MASK) > 5)
+ BNX2X_ERR("MFW seems hanged: drv_pulse (0x%x) != mcp_pulse (0x%x)\n",
drv_pulse, mcp_pulse);
- }
}
if (bp->state == BNX2X_STATE_OPEN)
--
1.8.1.4
^ permalink raw reply related
* [PATCH net 0/6] bnx2x: Bug fixes patch series
From: Yuval Mintz @ 2013-09-23 7:12 UTC (permalink / raw)
To: davem, netdev; +Cc: ariele, eilong
Hi Dave,
This patch contains various bug fixes, half of which are SR-IOV related
(some fixing issues in the recently added VF RSS support), while the other fix
a wide assortments of issues in the driver.
Please consider applying these patches to `net'.
Thanks,
Yuval Mintz
^ permalink raw reply
* Re: [PATCH V3 4/6] vhost_net: determine whether or not to use zerocopy at one time
From: Michael S. Tsirkin @ 2013-09-23 7:16 UTC (permalink / raw)
To: Jason Wang; +Cc: netdev, linux-kernel, kvm, virtualization
In-Reply-To: <5227F274.9040506@redhat.com>
On Thu, Sep 05, 2013 at 10:54:44AM +0800, Jason Wang wrote:
> On 09/04/2013 07:59 PM, Michael S. Tsirkin wrote:
> > On Mon, Sep 02, 2013 at 04:40:59PM +0800, Jason Wang wrote:
> >> Currently, even if the packet length is smaller than VHOST_GOODCOPY_LEN, if
> >> upend_idx != done_idx we still set zcopy_used to true and rollback this choice
> >> later. This could be avoided by determining zerocopy once by checking all
> >> conditions at one time before.
> >>
> >> Signed-off-by: Jason Wang <jasowang@redhat.com>
> >> ---
> >> drivers/vhost/net.c | 47 ++++++++++++++++++++---------------------------
> >> 1 files changed, 20 insertions(+), 27 deletions(-)
> >>
> >> diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
> >> index 8a6dd0d..3f89dea 100644
> >> --- a/drivers/vhost/net.c
> >> +++ b/drivers/vhost/net.c
> >> @@ -404,43 +404,36 @@ static void handle_tx(struct vhost_net *net)
> >> iov_length(nvq->hdr, s), hdr_size);
> >> break;
> >> }
> >> - zcopy_used = zcopy && (len >= VHOST_GOODCOPY_LEN ||
> >> - nvq->upend_idx != nvq->done_idx);
> >> +
> >> + zcopy_used = zcopy && len >= VHOST_GOODCOPY_LEN
> >> + && (nvq->upend_idx + 1) % UIO_MAXIOV !=
> >> + nvq->done_idx
> > Thinking about this, this looks strange.
> > The original idea was that once we start doing zcopy, we keep
> > using the heads ring even for short packets until no zcopy is outstanding.
>
> What's the reason for keep using the heads ring?
To keep completions in order.
> >
> > What's the logic behind (nvq->upend_idx + 1) % UIO_MAXIOV != nvq->done_idx
> > here?
>
> Because we initialize both upend_idx and done_idx to zero, so upend_idx
> != done_idx could not be used to check whether or not the heads ring
> were full.
But what does ring full have to do with zerocopy use?
> >> + && vhost_net_tx_select_zcopy(net);
> >>
> >> /* use msg_control to pass vhost zerocopy ubuf info to skb */
> >> if (zcopy_used) {
> >> + struct ubuf_info *ubuf;
> >> + ubuf = nvq->ubuf_info + nvq->upend_idx;
> >> +
> >> vq->heads[nvq->upend_idx].id = head;
> >> - if (!vhost_net_tx_select_zcopy(net) ||
> >> - len < VHOST_GOODCOPY_LEN) {
> >> - /* copy don't need to wait for DMA done */
> >> - vq->heads[nvq->upend_idx].len =
> >> - VHOST_DMA_DONE_LEN;
> >> - msg.msg_control = NULL;
> >> - msg.msg_controllen = 0;
> >> - ubufs = NULL;
> >> - } else {
> >> - struct ubuf_info *ubuf;
> >> - ubuf = nvq->ubuf_info + nvq->upend_idx;
> >> -
> >> - vq->heads[nvq->upend_idx].len =
> >> - VHOST_DMA_IN_PROGRESS;
> >> - ubuf->callback = vhost_zerocopy_callback;
> >> - ubuf->ctx = nvq->ubufs;
> >> - ubuf->desc = nvq->upend_idx;
> >> - msg.msg_control = ubuf;
> >> - msg.msg_controllen = sizeof(ubuf);
> >> - ubufs = nvq->ubufs;
> >> - kref_get(&ubufs->kref);
> >> - }
> >> + vq->heads[nvq->upend_idx].len = VHOST_DMA_IN_PROGRESS;
> >> + ubuf->callback = vhost_zerocopy_callback;
> >> + ubuf->ctx = nvq->ubufs;
> >> + ubuf->desc = nvq->upend_idx;
> >> + msg.msg_control = ubuf;
> >> + msg.msg_controllen = sizeof(ubuf);
> >> + ubufs = nvq->ubufs;
> >> + kref_get(&ubufs->kref);
> >> nvq->upend_idx = (nvq->upend_idx + 1) % UIO_MAXIOV;
> >> - } else
> >> + } else {
> >> msg.msg_control = NULL;
> >> + ubufs = NULL;
> >> + }
> >> /* TODO: Check specific error and bomb out unless ENOBUFS? */
> >> err = sock->ops->sendmsg(NULL, sock, &msg, len);
> >> if (unlikely(err < 0)) {
> >> if (zcopy_used) {
> >> - if (ubufs)
> >> - vhost_net_ubuf_put(ubufs);
> >> + vhost_net_ubuf_put(ubufs);
> >> nvq->upend_idx = ((unsigned)nvq->upend_idx - 1)
> >> % UIO_MAXIOV;
> >> }
> >> --
> >> 1.7.1
> > --
> > To unsubscribe from this list: send the line "unsubscribe kvm" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Device tree node for Freescale Gianfar PTP reference clock source selection
From: Aida Mynzhasova @ 2013-09-23 7:37 UTC (permalink / raw)
To: linuxppc-dev; +Cc: netdev, devicetree, Richard Cochran, Claudiu Manoil
Hi,
Currently, Freescale Gianfar PTP reference clock source is determined
through hard-coded value in gianfar_ptp driver. I don't think that
recompilation of the entire module (or even worse - the kernel) is a god
idea when we want to change one clock source to another. So, I want to
add new device tree binding, which can be used as:
ptp_clock@24E00 {
compatible = "fsl,etsec-ptp";
reg = <0x24E00 0xB0>;
interrupts = <12 0x8 13 0x8>;
interrupt-parent = < &ipic >;
fsl,cksel = <0>; /* <-- New entry */
fsl,tclk-period = <10>;
fsl,tmr-prsc = <100>;
fsl,tmr-add = <0x999999A4>;
fsl,tmr-fiper1 = <0x3B9AC9F6>;
fsl,tmr-fiper2 = <0x00018696>;
fsl,max-adj = <659999998>;
};
fsl,cksel acceptable values:
<0> for external clock;
<1> for eTSEC system clock;
<2> for eTSEC1 transmit clock;
<3> for RTC clock input.
I am new in this mailing list, and as far as I know, I have to discuss
all updates for device tree files here before sending patch, which uses
new attributes.
Also, should I define new bindings in some special way? I want to add
description of cksel attribute in
/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt. Is it enough or
not?
Thanks!
--
Regards,
Aida
^ permalink raw reply
* RE: [Xen-devel] [PATCH net-next v2 1/2] xen-netback: add a vif-is-connected flag
From: Paul Durrant @ 2013-09-23 8:51 UTC (permalink / raw)
To: annie li
Cc: netdev@vger.kernel.org, xen-devel@lists.xen.org, Wei Liu,
David Vrabel, Ian Campbell
In-Reply-To: <523E5C63.9080804@oracle.com>
> -----Original Message-----
> From: annie li [mailto:annie.li@oracle.com]
> Sent: 22 September 2013 03:57
> To: Paul Durrant
> Cc: netdev@vger.kernel.org; xen-devel@lists.xen.org; Wei Liu; David Vrabel;
> Ian Campbell
> Subject: Re: [Xen-devel] [PATCH net-next v2 1/2] xen-netback: add a vif-is-
> connected flag
>
>
> On 2013-9-20 21:57, Paul Durrant wrote:
> > Having applied my patch to separate vif disconnect and free, I ran into a
> > BUG when testing resume from S3 with a Windows frontend because the
> vif task
> > pointer was not cleared by xenvif_disconnect() and so a double call to this
> > function tries to stop the thread twice.
> Or it is better to do more implements in windows netfront? For example,
> when the windows vm hibernates, disconnect the vif as required by
> netback: connect-> closing-> closed.
>
S3 != hibernation; that is S4. The backend does not go away when the VM goes into S3 as the domain remains intact. We do go through the correct closing->closed transition on the way down but, because of the way the D3->D0 code in the frontend needs to be generalized, we attempt a second closing->closed transition on the way back up. In the S4 case this ok because we have a fresh backend, but in the S3 case we don't and therefore hit the double-disconnect issue. The fact the backend BUGs in this case clearly shows a vulnerability in the backend and thus that is where the fix needs to be made; the frontend is doing nothing wrong.
Paul
^ permalink raw reply
* RE: [Xen-devel] [PATCH net-next v2 2/2] xen-netback: handle frontends that fail to transition through Closing
From: Paul Durrant @ 2013-09-23 8:59 UTC (permalink / raw)
To: Bastian Blank
Cc: netdev@vger.kernel.org, xen-devel@lists.xen.org, Wei Liu,
David Vrabel, Ian Campbell
In-Reply-To: <20130920161431.GA19095@mail.waldi.eu.org>
> -----Original Message-----
> From: Bastian Blank [mailto:bastian@waldi.eu.org]
> Sent: 20 September 2013 17:15
> To: Paul Durrant
> Cc: netdev@vger.kernel.org; xen-devel@lists.xen.org; Wei Liu; David Vrabel;
> Ian Campbell
> Subject: Re: [Xen-devel] [PATCH net-next v2 2/2] xen-netback: handle
> frontends that fail to transition through Closing
>
> On Fri, Sep 20, 2013 at 02:57:40PM +0100, Paul Durrant wrote:
> > Some old Windows frontends fail to transition through the xenbus Closing
> > state and move directly from Connected to Closed. Handle this case
> properly.
>
> What happens in this case? Are there other state changes that will do
> unwanted things?
>
Hmm, now you mention it I suspect a transition directly to an unknown state may also not do the right thing. Perhaps it would be better to go straight to a more robust state model as suggested by David Vrabel.
Paul
^ permalink raw reply
* [PATCH net-next] xfrm: Force SA to be lookup again if SA in acquire state
From: Fan Du @ 2013-09-23 9:18 UTC (permalink / raw)
To: steffen.klassert; +Cc: davem, netdev
If SA is in the process of acquiring, which indicates this SA is more
promising and precise than the fall back option, i.e. using wild card
source address for searching less suitable SA.
So, here bail out, and try again.
Signed-off-by: Fan Du <fan.du@windriver.com>
---
net/xfrm/xfrm_state.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index b9c3f9e..e1373d5 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -815,7 +815,7 @@ xfrm_state_find(const xfrm_address_t *daddr, const xfrm_address_t *saddr,
xfrm_state_look_at(pol, x, fl, encap_family,
&best, &acquire_in_progress, &error);
}
- if (best)
+ if (best || acquire_in_progress)
goto found;
h_wildcard = xfrm_dst_hash(net, daddr, &saddr_wildcard, tmpl->reqid, encap_family);
--
1.7.9.5
^ permalink raw reply related
* [PATCH net-next] xfrm: Simplify SA looking up when using wildcard source address
From: Fan Du @ 2013-09-23 9:18 UTC (permalink / raw)
To: steffen.klassert; +Cc: davem, netdev
I'm not quite sure I get this "wildcard source address" right,
IMHO if a host needs to protect every traffic for a given remote host,
then the source address is wildcard address, i.e. all ZEROs.
(Please correct me if I'm bloodly wrong。。。)
Here is the argument if above statement stands true:
__xfrm4/6_state_addr_check is a four steps check, all we need to do
is checking whether the destination address match. Passing saddr from
flow is worst option, as the checking needs to reach the fourth step.
So, simply this process by only checking destination address only when
using wildcard source address for looking up SAs.
Signed-off-by: Fan Du <fan.du@windriver.com>
---
include/net/xfrm.h | 31 +++++++++++++++++++++++++++++++
net/xfrm/xfrm_state.c | 2 +-
2 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index e253bf0..fdb9343 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -1282,6 +1282,37 @@ xfrm_state_addr_check(const struct xfrm_state *x,
}
static __inline__ int
+__xfrm4_state_daddr_check(const struct xfrm_state *x,
+ const xfrm_address_t *daddr)
+{
+ return ((daddr->a4 == x->id.daddr.a4) ? 1 : 0);
+}
+
+static __inline__ int
+__xfrm6_state_daddr_check(const struct xfrm_state *x,
+ const xfrm_address_t *daddr)
+{
+ if (ipv6_addr_equal((struct in6_addr *)daddr, (struct in6_addr *)&x->id.daddr))
+ return 1;
+ else
+ return 0;
+}
+
+static __inline__ int
+xfrm_state_daddr_check(const struct xfrm_state *x,
+ const xfrm_address_t *daddr,
+ unsigned short family)
+{
+ switch (family) {
+ case AF_INET:
+ return __xfrm4_state_daddr_check(x, daddr);
+ case AF_INET6:
+ return __xfrm6_state_daddr_check(x, daddr);
+ }
+ return 0;
+}
+
+static __inline__ int
xfrm_state_addr_flow_check(const struct xfrm_state *x, const struct flowi *fl,
unsigned short family)
{
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index e1373d5..87c99da 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -824,7 +824,7 @@ xfrm_state_find(const xfrm_address_t *daddr, const xfrm_address_t *saddr,
x->props.reqid == tmpl->reqid &&
(mark & x->mark.m) == x->mark.v &&
!(x->props.flags & XFRM_STATE_WILDRECV) &&
- xfrm_state_addr_check(x, daddr, saddr, encap_family) &&
+ xfrm_state_daddr_check(x, daddr, encap_family) &&
tmpl->mode == x->props.mode &&
tmpl->id.proto == x->id.proto &&
(tmpl->id.spi == x->id.spi || !tmpl->id.spi))
--
1.7.9.5
^ permalink raw reply related
* Re: [alsa-devel] [PATCH 23/51] DMA-API: dma: pl08x: add dma_set_mask_and_coherent() call
From: Vinod Koul @ 2013-09-23 10:12 UTC (permalink / raw)
To: Russell King
Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
b43-dev-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b,
devicetree-u79uwXL29TY76Z2rM5mHXA,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
e1000-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-crypto-u79uwXL29TY76Z2rM5mHXA,
linux-doc-u79uwXL29TY76Z2rM5mHXA,
linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
linux-ide-u79uwXL29TY76Z2rM5mHXA,
linux-media-u79uwXL29TY76Z2rM5mHXA,
linux-mmc-u79uwXL29TY76Z2rM5mHXA,
linux-nvme-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
linux-scsi-u79uwXL29TY76Z2rM5mHXA,
linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA, Solarflare linux maintainers,
uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b, Dan Williams
In-Reply-To: <E1VMm4v-0007hz-RC-eh5Bv4kxaXIANfyc6IWni62ZND6+EDdj@public.gmane.org>
On Thu, Sep 19, 2013 at 10:48:01PM +0100, Russell King wrote:
> The DMA API requires drivers to call the appropriate dma_set_mask()
> functions before doing any DMA mapping. Add this required call to
> the AMBA PL08x driver.
>
> Signed-off-by: Russell King <rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
Acked-by: Vinod Koul <vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
~Vinod
> ---
> drivers/dma/amba-pl08x.c | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
> index fce46c5..e51a983 100644
> --- a/drivers/dma/amba-pl08x.c
> +++ b/drivers/dma/amba-pl08x.c
> @@ -2055,6 +2055,11 @@ static int pl08x_probe(struct amba_device *adev, const struct amba_id *id)
> if (ret)
> return ret;
>
> + /* Ensure that we can do DMA */
> + ret = dma_set_mask_and_coherent(&adev->dev, DMA_BIT_MASK(32));
> + if (ret)
> + goto out_no_pl08x;
> +
> /* Create the driver state holder */
> pl08x = kzalloc(sizeof(*pl08x), GFP_KERNEL);
> if (!pl08x) {
> --
> 1.7.4.4
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
--
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [alsa-devel] [PATCH 43/51] DMA-API: dma: edma.c: no need to explicitly initialize DMA masks
From: Vinod Koul @ 2013-09-23 10:25 UTC (permalink / raw)
To: Russell King
Cc: alsa-devel, linux-doc, linux-mmc, linux-fbdev, linux-nvme,
linux-ide, devel, linux-samsung-soc, linux-scsi, e1000-devel,
b43-dev, linux-media, devicetree, dri-devel, linux-tegra,
Dan Williams, linux-omap, linux-arm-kernel,
Solarflare linux maintainers, netdev, linux-usb, linux-wireless,
linux-crypto, uclinux-dist-devel, linuxppc-dev
In-Reply-To: <E1VMnRj-0007sg-1Z@rmk-PC.arm.linux.org.uk>
On Fri, Sep 20, 2013 at 12:15:39AM +0100, Russell King wrote:
> register_platform_device_full() can setup the DMA mask provided the
> appropriate member is set in struct platform_device_info. So lets
> make that be the case. This avoids a direct reference to the DMA
> masks by this driver.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Vinod Koul <vinod.koul@intel.com>
This also brings me question that should we force the driver to use the
dma_set_mask_and_coherent() API or they have below flexiblity too?
~Vinod
> ---
> drivers/dma/edma.c | 6 ++----
> 1 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
> index ff50ff4..7f9fe30 100644
> --- a/drivers/dma/edma.c
> +++ b/drivers/dma/edma.c
> @@ -702,11 +702,13 @@ static struct platform_device *pdev0, *pdev1;
> static const struct platform_device_info edma_dev_info0 = {
> .name = "edma-dma-engine",
> .id = 0,
> + .dma_mask = DMA_BIT_MASK(32),
> };
>
> static const struct platform_device_info edma_dev_info1 = {
> .name = "edma-dma-engine",
> .id = 1,
> + .dma_mask = DMA_BIT_MASK(32),
> };
>
> static int edma_init(void)
> @@ -720,8 +722,6 @@ static int edma_init(void)
> ret = PTR_ERR(pdev0);
> goto out;
> }
> - pdev0->dev.dma_mask = &pdev0->dev.coherent_dma_mask;
> - pdev0->dev.coherent_dma_mask = DMA_BIT_MASK(32);
> }
>
> if (EDMA_CTLRS == 2) {
> @@ -731,8 +731,6 @@ static int edma_init(void)
> platform_device_unregister(pdev0);
> ret = PTR_ERR(pdev1);
> }
> - pdev1->dev.dma_mask = &pdev1->dev.coherent_dma_mask;
> - pdev1->dev.coherent_dma_mask = DMA_BIT_MASK(32);
> }
>
> out:
> --
> 1.7.4.4
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
--
^ permalink raw reply
* Re: [alsa-devel] [PATCH 24/51] DMA-API: dma: pl330: add dma_set_mask_and_coherent() call
From: Vinod Koul @ 2013-09-23 10:43 UTC (permalink / raw)
To: Russell King - ARM Linux
Cc: alsa-devel, linux-doc, linux-wireless, linux-fbdev, dri-devel,
linux-ide, devel, linux-samsung-soc, linux-scsi, e1000-devel,
b43-dev, linux-media, devicetree, linux-nvme, linux-tegra,
Dan Williams, linux-omap, linux-arm-kernel,
Solarflare linux maintainers, netdev, linux-usb, linux-mmc,
linux-crypto, uclinux-dist-devel, linuxppc-dev
In-Reply-To: <20130921200000.GS25647@n2100.arm.linux.org.uk>
On Sat, Sep 21, 2013 at 09:00:00PM +0100, Russell King - ARM Linux wrote:
> On Fri, Sep 20, 2013 at 07:26:27PM +0200, Heiko Stübner wrote:
> > Am Donnerstag, 19. September 2013, 23:49:01 schrieb Russell King:
> > > The DMA API requires drivers to call the appropriate dma_set_mask()
> > > functions before doing any DMA mapping. Add this required call to
> > > the AMBA PL08x driver.
> > ^--- copy and paste error - should of course be PL330
>
> Fixed, thanks.
with fixed changelog...
Acked-by: Vinod Koul <vinod.koul@intel.com>
~Vinod
--
^ permalink raw reply
* iSCSI support in Linux
From: Rayagond K @ 2013-09-23 10:54 UTC (permalink / raw)
To: netdev
Hi All,
I am checking iSCSI support in Linux, during the search over internet
I got to know that iSCSI standard is implemented in Linux with kernel
version 2.6.20 and later. But I didn't understand one thing clearly
that is there any NIC offloading features related iSCSI ? if so, is
there any support in Linux for such offloading features ? Any example
NIC driver in LXR with iSCSI implementation ?
Thanks
Rayagond.
^ permalink raw reply
* Re: [PATCH 43/51] DMA-API: dma: edma.c: no need to explicitly initialize DMA masks
From: Russell King - ARM Linux @ 2013-09-23 11:37 UTC (permalink / raw)
To: Vinod Koul
Cc: alsa-devel, linux-doc, linux-mmc, linux-fbdev, linux-nvme,
linux-ide, devel, linux-samsung-soc, linux-scsi, e1000-devel,
b43-dev, linux-media, devicetree, dri-devel, linux-tegra,
Dan Williams, linux-omap, linux-arm-kernel,
Solarflare linux maintainers, netdev, linux-usb, linux-wireless,
linux-crypto, uclinux-dist-devel, linuxppc-dev
In-Reply-To: <20130923102533.GI17188@intel.com>
On Mon, Sep 23, 2013 at 03:55:33PM +0530, Vinod Koul wrote:
> On Fri, Sep 20, 2013 at 12:15:39AM +0100, Russell King wrote:
> > register_platform_device_full() can setup the DMA mask provided the
> > appropriate member is set in struct platform_device_info. So lets
> > make that be the case. This avoids a direct reference to the DMA
> > masks by this driver.
> >
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> Acked-by: Vinod Koul <vinod.koul@intel.com>
>
> This also brings me question that should we force the driver to use the
> dma_set_mask_and_coherent() API or they have below flexiblity too?
There's two issues here:
1. dma_set_mask_and_coherent() will only work if dev->dma_mask points at
some storage for the mask. This needs to have .dma_mask in the
platform_device_info initialised.
2. Yes, this driver should also be calling the appropriate DMA mask setting
functions in addition to having the mask initialized at device creation
time.
Here's a replacement patch, though maybe it would be better to roll all
the additions of dma_set_mask_and_coherent() in drivers/dma into one
patch? In other words, combine the addition of this with these two
patches:
dma: pl330: add dma_set_mask_and_coherent() call
dma: pl08x: add dma_set_mask_and_coherent() call
8<=====
From: Russell King <rmk+kernel@arm.linux.org.uk>
Subject: [PATCH] DMA-API: dma: edma.c: no need to explicitly initialize DMA
masks
register_platform_device_full() can setup the DMA mask provided the
appropriate member is set in struct platform_device_info. So lets
make that be the case. This avoids a direct reference to the DMA
masks by this driver.
While here, add the dma_set_mask_and_coherent() call which the DMA API
requires DMA-using drivers to call.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
drivers/dma/edma.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
index ff50ff4..fd5e48c 100644
--- a/drivers/dma/edma.c
+++ b/drivers/dma/edma.c
@@ -631,6 +631,10 @@ static int edma_probe(struct platform_device *pdev)
struct edma_cc *ecc;
int ret;
+ ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
+ if (ret)
+ return ret;
+
ecc = devm_kzalloc(&pdev->dev, sizeof(*ecc), GFP_KERNEL);
if (!ecc) {
dev_err(&pdev->dev, "Can't allocate controller\n");
@@ -702,11 +706,13 @@ static struct platform_device *pdev0, *pdev1;
static const struct platform_device_info edma_dev_info0 = {
.name = "edma-dma-engine",
.id = 0,
+ .dma_mask = DMA_BIT_MASK(32),
};
static const struct platform_device_info edma_dev_info1 = {
.name = "edma-dma-engine",
.id = 1,
+ .dma_mask = DMA_BIT_MASK(32),
};
static int edma_init(void)
@@ -720,8 +726,6 @@ static int edma_init(void)
ret = PTR_ERR(pdev0);
goto out;
}
- pdev0->dev.dma_mask = &pdev0->dev.coherent_dma_mask;
- pdev0->dev.coherent_dma_mask = DMA_BIT_MASK(32);
}
if (EDMA_CTLRS == 2) {
@@ -731,8 +735,6 @@ static int edma_init(void)
platform_device_unregister(pdev0);
ret = PTR_ERR(pdev1);
}
- pdev1->dev.dma_mask = &pdev1->dev.coherent_dma_mask;
- pdev1->dev.coherent_dma_mask = DMA_BIT_MASK(32);
}
out:
--
1.7.4.4
^ permalink raw reply related
* [PATCH] ipvs: improved SH fallback strategy
From: Alexander Frolkin @ 2013-09-23 11:51 UTC (permalink / raw)
To: Julian Anastasov, lvs-devel
Cc: Wensong Zhang, Simon Horman, netdev, linux-kernel
Improve the SH fallback realserver selection strategy.
With sh and sh-fallback, if a realserver is down, this attempts to
distribute the traffic that would have gone to that server evenly
among the remaining servers.
Signed-off-by: Alexander Frolkin <avf@eldamar.org.uk>
---
diff --git a/net/netfilter/ipvs/ip_vs_sh.c b/net/netfilter/ipvs/ip_vs_sh.c
index f16c027..1676354 100644
--- a/net/netfilter/ipvs/ip_vs_sh.c
+++ b/net/netfilter/ipvs/ip_vs_sh.c
@@ -120,22 +120,35 @@ static inline struct ip_vs_dest *
ip_vs_sh_get_fallback(struct ip_vs_service *svc, struct ip_vs_sh_state *s,
const union nf_inet_addr *addr, __be16 port)
{
- unsigned int offset;
- unsigned int hash;
+ unsigned int offset, roffset;
+ unsigned int hash, ihash;
struct ip_vs_dest *dest;
- for (offset = 0; offset < IP_VS_SH_TAB_SIZE; offset++) {
- hash = ip_vs_sh_hashkey(svc->af, addr, port, offset);
- dest = rcu_dereference(s->buckets[hash].dest);
- if (!dest)
- break;
- if (is_unavailable(dest))
- IP_VS_DBG_BUF(6, "SH: selected unavailable server "
- "%s:%d (offset %d)",
+ ihash = ip_vs_sh_hashkey(svc->af, addr, port, 0);
+ dest = rcu_dereference(s->buckets[ihash].dest);
+
+ if (!dest)
+ return NULL;
+
+ if (is_unavailable(dest)) {
+ IP_VS_DBG_BUF(6, "SH: selected unavailable server "
+ "%s:%d, reselecting",
+ IP_VS_DBG_ADDR(svc->af, &dest->addr),
+ ntohs(dest->port));
+ for (offset = 0; offset < IP_VS_SH_TAB_SIZE; offset++) {
+ roffset = (offset + ihash) % IP_VS_SH_TAB_SIZE;
+ hash = ip_vs_sh_hashkey(svc->af, addr, port, roffset);
+ dest = rcu_dereference(s->buckets[hash].dest);
+ if (is_unavailable(dest))
+ IP_VS_DBG_BUF(6, "SH: selected unavailable "
+ "server %s:%d (offset %d), reselecting",
IP_VS_DBG_ADDR(svc->af, &dest->addr),
- ntohs(dest->port), offset);
- else
- return dest;
+ ntohs(dest->port), roffset);
+ else
+ return dest;
+ }
+ } else {
+ return dest;
}
return NULL;
^ permalink raw reply related
* Re: [PATCH 36/51] DMA-API: usb: use dma_set_coherent_mask()
From: Nicolas Ferre @ 2013-09-23 12:30 UTC (permalink / raw)
To: Russell King, alsa-devel, b43-dev, devel, devicetree, dri-devel,
e1000-devel, linux-arm-kernel, linux-crypto, linux-doc,
linux-fbdev, linux-ide, linux-media, linux-mmc, linux-nvme,
linux-omap, linuxppc-dev, linux-samsung-soc, linux-scsi,
linux-tegra, linux-usb, linux-wireless, netdev,
Solarflare linux maintainers, uclinux-dist-devel
Cc: Kukjin Kim, Stephen Warren, Alexander Shishkin,
Greg Kroah-Hartman, Felipe Balbi, Alan Stern
In-Reply-To: <E1VMmHX-0007jq-Cj@rmk-PC.arm.linux.org.uk>
On 20/09/2013 00:01, Russell King :
> The correct way for a driver to specify the coherent DMA mask is
> not to directly access the field in the struct device, but to use
> dma_set_coherent_mask(). Only arch and bus code should access this
> member directly.
>
> Convert all direct write accesses to using the correct API.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
> drivers/usb/chipidea/ci_hdrc_imx.c | 5 +++--
> drivers/usb/dwc3/dwc3-exynos.c | 5 +++--
> drivers/usb/gadget/lpc32xx_udc.c | 4 +++-
> drivers/usb/host/ehci-atmel.c | 5 +++--
For Atmel driver:
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
[..]
> diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c
> index 3b645ff..5831a88 100644
> --- a/drivers/usb/host/ehci-atmel.c
> +++ b/drivers/usb/host/ehci-atmel.c
> @@ -92,8 +92,9 @@ static int ehci_atmel_drv_probe(struct platform_device *pdev)
> */
> if (!pdev->dev.dma_mask)
> pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask;
> - if (!pdev->dev.coherent_dma_mask)
> - pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
> + retval = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
> + if (retval)
> + goto fail_create_hcd;
>
> hcd = usb_create_hcd(driver, &pdev->dev, dev_name(&pdev->dev));
> if (!hcd) {
[..]
Thanks,
--
Nicolas Ferre
^ permalink raw reply
* Re: [PATCH 37/51] DMA-API: usb: use new dma_coerce_mask_and_coherent()
From: Nicolas Ferre @ 2013-09-23 12:34 UTC (permalink / raw)
To: Russell King, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
b43-dev-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b,
devicetree-u79uwXL29TY76Z2rM5mHXA,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
e1000-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-crypto-u79uwXL29TY76Z2rM5mHXA,
linux-doc-u79uwXL29TY76Z2rM5mHXA,
linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
linux-ide-u79uwXL29TY76Z2rM5mHXA,
linux-media-u79uwXL29TY76Z2rM5mHXA,
linux-mmc-u79uwXL29TY76Z2rM5mHXA,
linux-nvme-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
linux-scsi-u79uwXL29TY76Z2rM5mHXA,
linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA, Solarflare linux maintainers,
uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b
Cc: Alexander Shishkin, Greg Kroah-Hartman, Felipe Balbi, Kukjin Kim,
Alan Stern, Tony Prisk, Stephen Warren
In-Reply-To: <E1VMmIV-0007jw-Gq-eh5Bv4kxaXIANfyc6IWni62ZND6+EDdj@public.gmane.org>
On 20/09/2013 00:02, Russell King :
> Signed-off-by: Russell King <rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
> ---
> drivers/usb/chipidea/ci_hdrc_imx.c | 4 +---
> drivers/usb/dwc3/dwc3-exynos.c | 4 +---
> drivers/usb/host/ehci-atmel.c | 4 +---
For Atmel driver:
Acked-by: Nicolas Ferre <nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
[..]
> diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c
> index 5831a88..8e7323e 100644
> --- a/drivers/usb/host/ehci-atmel.c
> +++ b/drivers/usb/host/ehci-atmel.c
> @@ -90,9 +90,7 @@ static int ehci_atmel_drv_probe(struct platform_device *pdev)
> * Since shared usb code relies on it, set it here for now.
> * Once we have dma capability bindings this can go away.
> */
> - if (!pdev->dev.dma_mask)
> - pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask;
> - retval = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
> + retval = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
> if (retval)
> goto fail_create_hcd;
>
[..]
Thanks Russell,
--
Nicolas Ferre
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH v1] USBNET: fix handling padding packet
From: Ming Lei @ 2013-09-23 12:59 UTC (permalink / raw)
To: David S. Miller, Greg Kroah-Hartman
Cc: Oliver Neukum, netdev, linux-usb, Ming Lei
Commit 638c5115a7949(USBNET: support DMA SG) introduces DMA SG
if the usb host controller is capable of building packet from
discontinuous buffers, but missed handling padding packet when
building DMA SG.
This patch attachs the pre-allocated padding packet at the
end of the sg list, so padding packet can be sent to device
if drivers require that.
Reported-by: David Laight <David.Laight@aculab.com>
Acked-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
---
v1:
- fix bug in case of dev->can_dma_sg and !urb->num_sgs
---
drivers/net/usb/usbnet.c | 27 +++++++++++++++++++++------
include/linux/usb/usbnet.h | 1 +
2 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 7b331e6..bf94e10 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -1241,7 +1241,9 @@ static int build_dma_sg(const struct sk_buff *skb, struct urb *urb)
if (num_sgs == 1)
return 0;
- urb->sg = kmalloc(num_sgs * sizeof(struct scatterlist), GFP_ATOMIC);
+ /* reserve one for zero packet */
+ urb->sg = kmalloc((num_sgs + 1) * sizeof(struct scatterlist),
+ GFP_ATOMIC);
if (!urb->sg)
return -ENOMEM;
@@ -1305,7 +1307,7 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
if (build_dma_sg(skb, urb) < 0)
goto drop;
}
- entry->length = length = urb->transfer_buffer_length;
+ length = urb->transfer_buffer_length;
/* don't assume the hardware handles USB_ZERO_PACKET
* NOTE: strictly conforming cdc-ether devices should expect
@@ -1317,15 +1319,18 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
if (length % dev->maxpacket == 0) {
if (!(info->flags & FLAG_SEND_ZLP)) {
if (!(info->flags & FLAG_MULTI_PACKET)) {
- urb->transfer_buffer_length++;
- if (skb_tailroom(skb)) {
+ length++;
+ if (skb_tailroom(skb) && !urb->num_sgs) {
skb->data[skb->len] = 0;
__skb_put(skb, 1);
- }
+ } else if (urb->num_sgs)
+ sg_set_buf(&urb->sg[urb->num_sgs++],
+ dev->padding_pkt, 1);
}
} else
urb->transfer_flags |= URB_ZERO_PACKET;
}
+ entry->length = urb->transfer_buffer_length = length;
spin_lock_irqsave(&dev->txq.lock, flags);
retval = usb_autopm_get_interface_async(dev->intf);
@@ -1509,6 +1514,7 @@ void usbnet_disconnect (struct usb_interface *intf)
usb_kill_urb(dev->interrupt);
usb_free_urb(dev->interrupt);
+ kfree(dev->padding_pkt);
free_netdev(net);
}
@@ -1679,9 +1685,16 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
/* initialize max rx_qlen and tx_qlen */
usbnet_update_max_qlen(dev);
+ if (dev->can_dma_sg && !(info->flags & FLAG_SEND_ZLP) &&
+ !(info->flags & FLAG_MULTI_PACKET)) {
+ dev->padding_pkt = kzalloc(1, GFP_KERNEL);
+ if (!dev->padding_pkt)
+ goto out4;
+ }
+
status = register_netdev (net);
if (status)
- goto out4;
+ goto out5;
netif_info(dev, probe, dev->net,
"register '%s' at usb-%s-%s, %s, %pM\n",
udev->dev.driver->name,
@@ -1699,6 +1712,8 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
return 0;
+out5:
+ kfree(dev->padding_pkt);
out4:
usb_free_urb(dev->interrupt);
out3:
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
index 9cb2fe8..e303eef 100644
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -42,6 +42,7 @@ struct usbnet {
struct usb_host_endpoint *status;
unsigned maxpacket;
struct timer_list delay;
+ const char *padding_pkt;
/* protocol/interface state */
struct net_device *net;
--
1.7.9.5
^ permalink raw reply related
* [PATCH net-next] igb: fix driver reload with VF assigned to guest
From: Stefan Assmann @ 2013-09-23 13:06 UTC (permalink / raw)
To: netdev
Cc: e1000-devel, davem, alexander.h.duyck, carolyn.wyborny,
jeffrey.t.kirsher, gregory.v.rose, sassmann
commit fa44f2f185f7f9da19d331929bb1b56c1ccd1d93 broke reloading of igb, when
VFs are assigned to a guest, in several ways.
1. on module load adapter->vf_data does not get properly allocated,
resulting in a null pointer exception when accessing adapter->vf_data in
igb_reset() on module reload.
modprobe -r igb ; modprobe igb max_vfs=7
[ 215.215837] igb 0000:01:00.1: removed PHC on eth1
[ 216.932072] igb 0000:01:00.1: IOV Disabled
[ 216.937038] igb 0000:01:00.0: removed PHC on eth0
[ 217.127032] igb 0000:01:00.0: Cannot deallocate SR-IOV virtual functions while they are assigned - VFs will not be deallocated
[ 217.146178] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.0.5-k
[ 217.154050] igb: Copyright (c) 2007-2013 Intel Corporation.
[ 217.160688] igb 0000:01:00.0: Enabling SR-IOV VFs using the module parameter is deprecated - please use the pci sysfs interface.
[ 217.173703] igb 0000:01:00.0: irq 103 for MSI/MSI-X
[ 217.179227] igb 0000:01:00.0: irq 104 for MSI/MSI-X
[ 217.184735] igb 0000:01:00.0: irq 105 for MSI/MSI-X
[ 217.220082] BUG: unable to handle kernel NULL pointer dereference at 0000000000000048
[ 217.228846] IP: [<ffffffffa007c5e5>] igb_reset+0xc5/0x4b0 [igb]
[ 217.235472] PGD 3607ec067 PUD 36170b067 PMD 0
[ 217.240461] Oops: 0002 [#1] SMP
[ 217.244085] Modules linked in: igb(+) igbvf mptsas mptscsih mptbase scsi_transport_sas [last unloaded: igb]
[ 217.255040] CPU: 4 PID: 4833 Comm: modprobe Not tainted 3.11.0+ #46
[...]
[ 217.390007] [<ffffffffa007fab2>] igb_probe+0x892/0xfd0 [igb]
[ 217.396422] [<ffffffff81470b3e>] local_pci_probe+0x1e/0x40
[ 217.402641] [<ffffffff81472029>] pci_device_probe+0xf9/0x110
[...]
2. A follow up issue, pci_enable_sriov() should only be called if no VFs were
still allocated on module unload. Otherwise pci_enable_sriov() gets called
multiple times in a row rendering the NIC unusable until reset.
3. simply calling igb_enable_sriov() in igb_probe_vfs() is not enough as the
interrupts need to be re-setup. Switching that to igb_pci_enable_sriov().
Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
---
drivers/net/ethernet/intel/igb/igb_main.c | 37 +++++++++++++------------------
1 file changed, 16 insertions(+), 21 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 8cf44f2..421f3f1 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -182,6 +182,7 @@ static void igb_check_vf_rate_limit(struct igb_adapter *);
#ifdef CONFIG_PCI_IOV
static int igb_vf_configure(struct igb_adapter *adapter, int vf);
+static int igb_pci_enable_sriov(struct pci_dev *dev, int num_vfs);
#endif
#ifdef CONFIG_PM
@@ -2429,7 +2430,7 @@ err_dma:
}
#ifdef CONFIG_PCI_IOV
-static int igb_disable_sriov(struct pci_dev *pdev)
+static int igb_disable_sriov(struct pci_dev *pdev)
{
struct net_device *netdev = pci_get_drvdata(pdev);
struct igb_adapter *adapter = netdev_priv(netdev);
@@ -2470,27 +2471,19 @@ static int igb_enable_sriov(struct pci_dev *pdev, int num_vfs)
int err = 0;
int i;
- if (!adapter->msix_entries) {
+ if (!adapter->msix_entries || num_vfs > 7) {
err = -EPERM;
goto out;
}
-
if (!num_vfs)
goto out;
- else if (old_vfs && old_vfs == num_vfs)
- goto out;
- else if (old_vfs && old_vfs != num_vfs)
- err = igb_disable_sriov(pdev);
-
- if (err)
- goto out;
- if (num_vfs > 7) {
- err = -EPERM;
- goto out;
- }
-
- adapter->vfs_allocated_count = num_vfs;
+ if (old_vfs) {
+ dev_info(&pdev->dev, "%d pre-allocated VFs found - override max_vfs setting of %d\n",
+ old_vfs, max_vfs);
+ adapter->vfs_allocated_count = old_vfs;
+ } else
+ adapter->vfs_allocated_count = num_vfs;
adapter->vf_data = kcalloc(adapter->vfs_allocated_count,
sizeof(struct vf_data_storage), GFP_KERNEL);
@@ -2504,10 +2497,12 @@ static int igb_enable_sriov(struct pci_dev *pdev, int num_vfs)
goto out;
}
- err = pci_enable_sriov(pdev, adapter->vfs_allocated_count);
- if (err)
- goto err_out;
-
+ /* only call pci_enable_sriov() if no VFs are allocated already */
+ if (!old_vfs) {
+ err = pci_enable_sriov(pdev, adapter->vfs_allocated_count);
+ if (err)
+ goto err_out;
+ }
dev_info(&pdev->dev, "%d VFs allocated\n",
adapter->vfs_allocated_count);
for (i = 0; i < adapter->vfs_allocated_count; i++)
@@ -2623,7 +2618,7 @@ static void igb_probe_vfs(struct igb_adapter *adapter)
return;
pci_sriov_set_totalvfs(pdev, 7);
- igb_enable_sriov(pdev, max_vfs);
+ igb_pci_enable_sriov(pdev, max_vfs);
#endif /* CONFIG_PCI_IOV */
}
--
1.8.3.1
^ permalink raw reply related
* Re: [PATCH net-next] net ipv4: Convert ipv4.ip_local_port_range to be per netns
From: Nicolas Dichtel @ 2013-09-23 13:43 UTC (permalink / raw)
To: Eric W. Biederman; +Cc: David Miller, netdev
In-Reply-To: <87fvswt5m5.fsf@tw-ebiederman.twitter.com>
Le 23/09/2013 08:27, Eric W. Biederman a écrit :
>
> - Move sysctl_local_ports from a global variable into struct netns_ipv4.
> - Modify inet_get_local_port_range to take a struct net.
> - Manually expand inet_get_local_range into ipv4_local_port_range
> because I do not know the struct net.
> - Move the initialization of sysctl_local_ports into
> sysctl_net_ipv4.c:ipv4_sysctl_init_net from inet_connection_sock.c
>
> Originally-by: Samya <samya@twitter.com>
> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Two minor comments, please see below.
After that: Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> ---
> drivers/infiniband/core/cma.c | 2 +-
> drivers/net/vxlan.c | 2 +-
> include/net/ip.h | 7 +----
> include/net/netns/ipv4.h | 6 +++++
> net/ipv4/inet_connection_sock.c | 20 +++++---------
> net/ipv4/inet_hashtables.c | 2 +-
> net/ipv4/ping.c | 4 +--
> net/ipv4/sysctl_net_ipv4.c | 57 ++++++++++++++++++++++++++-------------
> net/ipv4/udp.c | 2 +-
> net/sctp/socket.c | 2 +-
> security/selinux/hooks.c | 3 ++-
> 11 files changed, 61 insertions(+), 46 deletions(-)
>
> diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
> index 7c0f953..9627545 100644
> --- a/drivers/infiniband/core/cma.c
> +++ b/drivers/infiniband/core/cma.c
> @@ -2302,7 +2302,7 @@ static int cma_alloc_any_port(struct idr *ps, struct rdma_id_private *id_priv)
> int low, high, remaining;
> unsigned int rover;
>
> - inet_get_local_port_range(&low, &high);
> + inet_get_local_port_range(&init_net, &low, &high);
> remaining = (high - low) + 1;
> rover = net_random() % remaining + low;
> retry:
> diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
> index 767f7af..a105376 100644
> --- a/drivers/net/vxlan.c
> +++ b/drivers/net/vxlan.c
> @@ -1501,7 +1501,7 @@ static void vxlan_setup(struct net_device *dev)
> vxlan->age_timer.function = vxlan_cleanup;
> vxlan->age_timer.data = (unsigned long) vxlan;
>
> - inet_get_local_port_range(&low, &high);
> + inet_get_local_port_range(dev_net(net), &low, &high);
> vxlan->port_min = low;
> vxlan->port_max = high;
> vxlan->dst_port = htons(vxlan_port);
> diff --git a/include/net/ip.h b/include/net/ip.h
> index a68f838..5e46435 100644
> --- a/include/net/ip.h
> +++ b/include/net/ip.h
> @@ -195,12 +195,7 @@ static inline u64 snmp_fold_field64(void __percpu *mib[], int offt, size_t syncp
> #endif
> extern int snmp_mib_init(void __percpu *ptr[2], size_t mibsize, size_t align);
> extern void snmp_mib_free(void __percpu *ptr[2]);
> -
> -extern struct local_ports {
> - seqlock_t lock;
> - int range[2];
> -} sysctl_local_ports;
> -extern void inet_get_local_port_range(int *low, int *high);
> +extern void inet_get_local_port_range(struct net *net, int *low, int *high);
>
> extern unsigned long *sysctl_local_reserved_ports;
> static inline int inet_is_reserved_local_port(int port)
> diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h
> index 2ba9de8..d685e50 100644
> --- a/include/net/netns/ipv4.h
> +++ b/include/net/netns/ipv4.h
> @@ -15,6 +15,10 @@ struct fib_rules_ops;
> struct hlist_head;
> struct fib_table;
> struct sock;
> +struct local_ports {
> + seqlock_t lock;
> + int range[2];
> +};
>
> struct netns_ipv4 {
> #ifdef CONFIG_SYSCTL
> @@ -62,6 +66,8 @@ struct netns_ipv4 {
> int sysctl_icmp_ratemask;
> int sysctl_icmp_errors_use_inbound_ifaddr;
>
> + struct local_ports sysctl_local_ports;
> +
> int sysctl_tcp_ecn;
>
> kgid_t sysctl_ping_group_range[2];
> diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
> index 6acb541..7ac7aa1 100644
> --- a/net/ipv4/inet_connection_sock.c
> +++ b/net/ipv4/inet_connection_sock.c
> @@ -29,27 +29,19 @@ const char inet_csk_timer_bug_msg[] = "inet_csk BUG: unknown timer value\n";
> EXPORT_SYMBOL(inet_csk_timer_bug_msg);
> #endif
>
> -/*
> - * This struct holds the first and last local port number.
> - */
> -struct local_ports sysctl_local_ports __read_mostly = {
> - .lock = __SEQLOCK_UNLOCKED(sysctl_local_ports.lock),
> - .range = { 32768, 61000 },
> -};
> -
> unsigned long *sysctl_local_reserved_ports;
> EXPORT_SYMBOL(sysctl_local_reserved_ports);
>
> -void inet_get_local_port_range(int *low, int *high)
> +void inet_get_local_port_range(struct net *net, int *low, int *high)
> {
> unsigned int seq;
>
> do {
> - seq = read_seqbegin(&sysctl_local_ports.lock);
> + seq = read_seqbegin(&net->ipv4.sysctl_local_ports.lock);
>
> - *low = sysctl_local_ports.range[0];
> - *high = sysctl_local_ports.range[1];
> - } while (read_seqretry(&sysctl_local_ports.lock, seq));
> + *low = net->ipv4.sysctl_local_ports.range[0];
> + *high = net->ipv4.sysctl_local_ports.range[1];
> + } while (read_seqretry(&net->ipv4.sysctl_local_ports.lock, seq));
> }
> EXPORT_SYMBOL(inet_get_local_port_range);
>
> @@ -116,7 +108,7 @@ int inet_csk_get_port(struct sock *sk, unsigned short snum)
> int remaining, rover, low, high;
>
> again:
> - inet_get_local_port_range(&low, &high);
> + inet_get_local_port_range(net, &low, &high);
> remaining = (high - low) + 1;
> smallest_rover = rover = net_random() % remaining + low;
>
> diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c
> index 7bd8983..2779037 100644
> --- a/net/ipv4/inet_hashtables.c
> +++ b/net/ipv4/inet_hashtables.c
> @@ -494,7 +494,7 @@ int __inet_hash_connect(struct inet_timewait_death_row *death_row,
> u32 offset = hint + port_offset;
> struct inet_timewait_sock *tw = NULL;
>
> - inet_get_local_port_range(&low, &high);
> + inet_get_local_port_range(net, &low, &high);
> remaining = (high - low) + 1;
>
> local_bh_disable();
> diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
> index 746427c..d71ecc4 100644
> --- a/net/ipv4/ping.c
> +++ b/net/ipv4/ping.c
> @@ -237,11 +237,11 @@ static void inet_get_ping_group_range_net(struct net *net, kgid_t *low,
> unsigned int seq;
>
> do {
> - seq = read_seqbegin(&sysctl_local_ports.lock);
> + seq = read_seqbegin(&net->ipv4.sysctl_local_ports.lock);
>
> *low = data[0];
> *high = data[1];
> - } while (read_seqretry(&sysctl_local_ports.lock, seq));
> + } while (read_seqretry(&net->ipv4.sysctl_local_ports.lock, seq));
> }
>
>
> diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
> index 610e324..b91f963 100644
> --- a/net/ipv4/sysctl_net_ipv4.c
> +++ b/net/ipv4/sysctl_net_ipv4.c
> @@ -42,12 +42,12 @@ static int ip_ping_group_range_min[] = { 0, 0 };
> static int ip_ping_group_range_max[] = { GID_T_MAX, GID_T_MAX };
>
> /* Update system visible IP port range */
> -static void set_local_port_range(int range[2])
> +static void set_local_port_range(struct local_ports *ports, int range[2])
> {
> - write_seqlock(&sysctl_local_ports.lock);
> - sysctl_local_ports.range[0] = range[0];
> - sysctl_local_ports.range[1] = range[1];
> - write_sequnlock(&sysctl_local_ports.lock);
> + write_seqlock(&ports->lock);
> + ports->range[0] = range[0];
> + ports->range[1] = range[1];
> + write_sequnlock(&ports->lock);
> }
>
> /* Validate changes from /proc interface. */
> @@ -55,6 +55,9 @@ static int ipv4_local_port_range(struct ctl_table *table, int write,
> void __user *buffer,
> size_t *lenp, loff_t *ppos)
> {
> + struct local_ports *ports =
> + container_of(table->data, struct local_ports, range);
> + unsigned int seq;
> int ret;
> int range[2];
> struct ctl_table tmp = {
> @@ -65,14 +68,19 @@ static int ipv4_local_port_range(struct ctl_table *table, int write,
> .extra2 = &ip_local_port_range_max,
> };
>
> - inet_get_local_port_range(range, range + 1);
> + do {
> + seq = read_seqbegin(&ports->lock);
> + range[0] = ports->range[0];
> + range[1] = ports->range[1];
> + } while (read_seqretry(&ports->lock, seq));
> +
> ret = proc_dointvec_minmax(&tmp, write, buffer, lenp, ppos);
>
> if (write && ret == 0) {
> if (range[1] < range[0])
> ret = -EINVAL;
> else
> - set_local_port_range(range);
> + set_local_port_range(ports, range);
> }
>
> return ret;
> @@ -82,23 +90,27 @@ static int ipv4_local_port_range(struct ctl_table *table, int write,
> static void inet_get_ping_group_range_table(struct ctl_table *table, kgid_t *low, kgid_t *high)
> {
> kgid_t *data = table->data;
> + struct netns_ipv4 *ipv4 =
There is spaces here instead of tabs.
> + container_of(table->data, struct netns_ipv4, sysctl_ping_group_range);
> unsigned int seq;
> do {
> - seq = read_seqbegin(&sysctl_local_ports.lock);
> + seq = read_seqbegin(&ipv4->sysctl_local_ports.lock);
>
> *low = data[0];
> *high = data[1];
> - } while (read_seqretry(&sysctl_local_ports.lock, seq));
> + } while (read_seqretry(&ipv4->sysctl_local_ports.lock, seq));
> }
>
> /* Update system visible IP port range */
> static void set_ping_group_range(struct ctl_table *table, kgid_t low, kgid_t high)
> {
> kgid_t *data = table->data;
> - write_seqlock(&sysctl_local_ports.lock);
> + struct netns_ipv4 *ipv4 =
Same here.
^ permalink raw reply
* [PATCH] igbvf: add missing iounmap() on error in igbvf_probe()
From: Wei Yongjun @ 2013-09-23 13:50 UTC (permalink / raw)
To: jeffrey.t.kirsher, jesse.brandeburg, bruce.w.allan,
carolyn.wyborny, donald.c.skidmore, gregory.v.rose,
peter.p.waskiewicz.jr, alexander.h.duyck, john.ronciak,
tushar.n.dave, davem, mitch.a.williams, kaber, gregkh
Cc: yongjun_wei, e1000-devel, netdev
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Add the missing iounmap() before return from igbvf_probe()
in the error handling case.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
drivers/net/ethernet/intel/igbvf/netdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c
index 95d5430..b0b1c99 100644
--- a/drivers/net/ethernet/intel/igbvf/netdev.c
+++ b/drivers/net/ethernet/intel/igbvf/netdev.c
@@ -2700,7 +2700,7 @@ static int igbvf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if (ei->get_variants) {
err = ei->get_variants(adapter);
if (err)
- goto err_ioremap;
+ goto err_get_variants;
}
/* setup adapter struct */
@@ -2797,6 +2797,7 @@ err_hw_init:
kfree(adapter->rx_ring);
err_sw_init:
igbvf_reset_interrupt_capability(adapter);
+err_get_variants:
iounmap(adapter->hw.hw_addr);
err_ioremap:
free_netdev(netdev);
^ permalink raw reply related
* [PATCH -next] openvswitch: remove duplicated include from vport-vxlan.c
From: Wei Yongjun @ 2013-09-23 13:55 UTC (permalink / raw)
To: jesse, davem; +Cc: yongjun_wei, dev, netdev
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Remove duplicated include.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
net/openvswitch/vport-vxlan.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/openvswitch/vport-vxlan.c b/net/openvswitch/vport-vxlan.c
index 36848bd..8515c66 100644
--- a/net/openvswitch/vport-vxlan.c
+++ b/net/openvswitch/vport-vxlan.c
@@ -29,7 +29,6 @@
#include <net/ip.h>
#include <net/udp.h>
#include <net/ip_tunnels.h>
-#include <net/udp.h>
#include <net/rtnetlink.h>
#include <net/route.h>
#include <net/dsfield.h>
^ permalink raw reply related
* [PATCH -next] openvswitch: remove duplicated include from vport-gre.c
From: Wei Yongjun @ 2013-09-23 13:56 UTC (permalink / raw)
To: jesse, davem; +Cc: yongjun_wei, dev, netdev
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Remove duplicated include.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
net/openvswitch/vport-gre.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/openvswitch/vport-gre.c b/net/openvswitch/vport-gre.c
index 21d5073..c03a964c 100644
--- a/net/openvswitch/vport-gre.c
+++ b/net/openvswitch/vport-gre.c
@@ -24,8 +24,6 @@
#include <linux/if_tunnel.h>
#include <linux/if_vlan.h>
#include <linux/in.h>
-#include <linux/if_vlan.h>
-#include <linux/in.h>
#include <linux/in_route.h>
#include <linux/inetdevice.h>
#include <linux/jhash.h>
^ permalink raw reply related
* [PATCH net-next] dev: advertise rx_flags changes
From: Nicolas Dichtel @ 2013-09-23 14:25 UTC (permalink / raw)
To: netdev; +Cc: davem, Nicolas Dichtel
There is no netlink message/call to notifier chains when rx_flags are updated,
let's advertise everybody.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
net/core/dev.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 5c713f2239cc..6c91d3919279 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4818,8 +4818,13 @@ static void dev_change_rx_flags(struct net_device *dev, int flags)
{
const struct net_device_ops *ops = dev->netdev_ops;
- if ((dev->flags & IFF_UP) && ops->ndo_change_rx_flags)
- ops->ndo_change_rx_flags(dev, flags);
+ if (dev->flags & IFF_UP) {
+ if (ops->ndo_change_rx_flags)
+ ops->ndo_change_rx_flags(dev, flags);
+
+ call_netdevice_notifiers(NETDEV_CHANGE, dev);
+ rtmsg_ifinfo(RTM_NEWLINK, dev, flags);
+ }
}
static int __dev_set_promiscuity(struct net_device *dev, int inc)
--
1.8.2.1
^ permalink raw reply related
* Re: [PATCH net 0/4] bridge: Fix problems around the PVID
From: Vlad Yasevich @ 2013-09-23 14:41 UTC (permalink / raw)
To: Toshiaki Makita
Cc: Toshiaki Makita, David Miller, netdev, Fernando Luis Vazquez Cao,
Patrick McHardy
In-Reply-To: <1379405552.6177.31.camel@ubuntu-vm-makita>
On 09/17/2013 04:12 AM, Toshiaki Makita wrote:
> On Mon, 2013-09-16 at 13:49 -0400, Vlad Yasevich wrote:
>> On 09/13/2013 08:06 AM, Toshiaki Makita wrote:
>>> On Thu, 2013-09-12 at 16:00 -0400, David Miller wrote:
>>>> From: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
>>>> Date: Tue, 10 Sep 2013 19:27:54 +0900
>>>>
>>>>> There seem to be some undesirable behaviors related with PVID.
>>>>> 1. It has no effect assigning PVID to a port. PVID cannot be applied
>>>>> to any frame regardless of whether we set it or not.
>>>>> 2. FDB entries learned via frames applied PVID are registered with
>>>>> VID 0 rather than VID value of PVID.
>>>>> 3. We can set 0 or 4095 as a PVID that are not allowed in IEEE 802.1Q.
>>>>> This leads interoperational problems such as sending frames with VID
>>>>> 4095, which is not allowed in IEEE 802.1Q, and treating frames with VID
>>>>> 0 as they belong to VLAN 0, which is expected to be handled as they have
>>>>> no VID according to IEEE 802.1Q.
>>>>>
>>>>> Note: 2nd and 3rd problems are potential and not exposed unless 1st problem
>>>>> is fixed, because we cannot activate PVID due to it.
>>>>
>>>> Please work out the issues in patch #2 with Vlad and resubmit this
>>>> series.
>>>>
>>>> Thank you.
>>>
>>> I'm hovering between whether we should fix the issue by changing vlan 0
>>> interface behavior in 8021q module or enabling a bridge port to sending
>>> priority-tagged frames, or another better way.
>>>
>>> If you could comment it, I'd appreciate it :)
>>>
>>>
>>> BTW, I think what is discussed in patch #2 is another problem about
>>> handling priority-tags, and it exists without this patch set applied.
>>> It looks like that we should prepare another patch set than this to fix
>>> that problem.
>>>
>>> Should I include patches that fix the priority-tags problem in this
>>> patch set and resubmit them all together?
>>>
>>
>> I am thinking that we might need to do it in bridge and it looks like
>> the simplest way to do it is to have default priority regeneration table
>> (table 6-5 from 802.1Q doc).
>>
>> That way I think we would conform to the spec.
>>
>> -vlad
>
> Unfortunately I don't think the default priority regeneration table
> resolves the problem because IEEE 802.1Q says that a VLAN-aware bridge
> can transmit untagged or VLAN-tagged frames only (the end of section 7.5
> and 8.1.7).
>
> No mechanism to send priority-tagged frames is found as far as I can see
> the standard. I think the regenerated priority is used for outgoing PCP
> field only if egress policy is not untagged (i.e. transmitting as
> VLAN-tagged), and unused if untagged (Section 6.9.2 3rd/4th Paragraph).
>
> If we want to transmit priority-tagged frames from a bridge port, I
> think we need to implement a new (optional) feature that is above the
> standard, as I stated previously.
>
> How do you feel about adding a per-port policy that enables a bridge to
> send priority-tagged frames instead of untagged frames when egress
> policy for the port is untagged?
> With this change, we can transmit frames for a given vlan as either all
> untagged, all priority-tagged or all VLAN-tagged.
That would work. What I am thinking is that we do it by special casing
the vid 0 egress policy specification. Let it be untagged by default
and if it is tagged, then we preserve the priority field and forward
it on.
This keeps the API stable and doesn't require user/admin from knowing
exactly what happens. Default operation conforms to the spec and allows
simple change to make it backward-compatible.
What do you think. I've done a simple prototype of this an it seems to
work with the VMs I am testing with.
-vlad
>
> Thanks,
>
> Toshiaki Makita
>
>>
>>>
>>> Thanks,
>>>
>>> Toshiaki Makita
>>>
>>>>
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe netdev" in
>>>> the body of a message to majordomo@vger.kernel.org
>>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>>
>>>
>>>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox