All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch net-next 1/2] rocker: enable support for scattered packets
@ 2015-08-02 18:56 Jiri Pirko
  2015-08-02 18:56 ` [patch net-next 2/2] rocker: linearize skb in case frags would not fit into tx descriptor Jiri Pirko
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jiri Pirko @ 2015-08-02 18:56 UTC (permalink / raw)
  To: netdev; +Cc: davem, sfeldma, idosch

From: Ido Schimmel <idosch@mellanox.com>

rocker supports the transmission of scattered packets, so let the kernel
know about it by setting the NETIF_F_SG bit in the device's features.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
 drivers/net/ethernet/rocker/rocker.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c
index 7b4c347..730bdc0 100644
--- a/drivers/net/ethernet/rocker/rocker.c
+++ b/drivers/net/ethernet/rocker/rocker.c
@@ -4970,7 +4970,7 @@ static int rocker_probe_port(struct rocker *rocker, unsigned int port_number)
 		       NAPI_POLL_WEIGHT);
 	rocker_carrier_init(rocker_port);
 
-	dev->features |= NETIF_F_NETNS_LOCAL;
+	dev->features |= NETIF_F_NETNS_LOCAL | NETIF_F_SG;
 
 	err = register_netdev(dev);
 	if (err) {
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [patch net-next 2/2] rocker: linearize skb in case frags would not fit into tx descriptor
  2015-08-02 18:56 [patch net-next 1/2] rocker: enable support for scattered packets Jiri Pirko
@ 2015-08-02 18:56 ` Jiri Pirko
  2015-08-03 18:31   ` Scott Feldman
  2015-08-03 21:22   ` David Miller
  2015-08-03 18:30 ` [patch net-next 1/2] rocker: enable support for scattered packets Scott Feldman
  2015-08-03 21:22 ` David Miller
  2 siblings, 2 replies; 6+ messages in thread
From: Jiri Pirko @ 2015-08-02 18:56 UTC (permalink / raw)
  To: netdev; +Cc: davem, sfeldma, idosch

Suggested-by: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
 drivers/net/ethernet/rocker/rocker.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c
index 730bdc0..4cd5a71 100644
--- a/drivers/net/ethernet/rocker/rocker.c
+++ b/drivers/net/ethernet/rocker/rocker.c
@@ -4157,8 +4157,11 @@ static netdev_tx_t rocker_port_xmit(struct sk_buff *skb, struct net_device *dev)
 					  skb->data, skb_headlen(skb));
 	if (err)
 		goto nest_cancel;
-	if (skb_shinfo(skb)->nr_frags > ROCKER_TX_FRAGS_MAX)
-		goto nest_cancel;
+	if (skb_shinfo(skb)->nr_frags > ROCKER_TX_FRAGS_MAX) {
+		err = skb_linearize(skb);
+		if (err)
+			goto unmap_frags;
+	}
 
 	for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
 		const skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [patch net-next 1/2] rocker: enable support for scattered packets
  2015-08-02 18:56 [patch net-next 1/2] rocker: enable support for scattered packets Jiri Pirko
  2015-08-02 18:56 ` [patch net-next 2/2] rocker: linearize skb in case frags would not fit into tx descriptor Jiri Pirko
@ 2015-08-03 18:30 ` Scott Feldman
  2015-08-03 21:22 ` David Miller
  2 siblings, 0 replies; 6+ messages in thread
From: Scott Feldman @ 2015-08-03 18:30 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: Netdev, David S. Miller, Ido Schimmel

On Sun, Aug 2, 2015 at 11:56 AM, Jiri Pirko <jiri@resnulli.us> wrote:
> From: Ido Schimmel <idosch@mellanox.com>
>
> rocker supports the transmission of scattered packets, so let the kernel
> know about it by setting the NETIF_F_SG bit in the device's features.
>
> Signed-off-by: Ido Schimmel <idosch@mellanox.com>
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>

Acked-by: Scott Feldman <sfeldma@gmail.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch net-next 2/2] rocker: linearize skb in case frags would not fit into tx descriptor
  2015-08-02 18:56 ` [patch net-next 2/2] rocker: linearize skb in case frags would not fit into tx descriptor Jiri Pirko
@ 2015-08-03 18:31   ` Scott Feldman
  2015-08-03 21:22   ` David Miller
  1 sibling, 0 replies; 6+ messages in thread
From: Scott Feldman @ 2015-08-03 18:31 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: Netdev, David S. Miller, Ido Schimmel

On Sun, Aug 2, 2015 at 11:56 AM, Jiri Pirko <jiri@resnulli.us> wrote:
> Suggested-by: Scott Feldman <sfeldma@gmail.com>
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>

Acked-by: Scott Feldman <sfeldma@gmail.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch net-next 1/2] rocker: enable support for scattered packets
  2015-08-02 18:56 [patch net-next 1/2] rocker: enable support for scattered packets Jiri Pirko
  2015-08-02 18:56 ` [patch net-next 2/2] rocker: linearize skb in case frags would not fit into tx descriptor Jiri Pirko
  2015-08-03 18:30 ` [patch net-next 1/2] rocker: enable support for scattered packets Scott Feldman
@ 2015-08-03 21:22 ` David Miller
  2 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2015-08-03 21:22 UTC (permalink / raw)
  To: jiri; +Cc: netdev, sfeldma, idosch

From: Jiri Pirko <jiri@resnulli.us>
Date: Sun,  2 Aug 2015 20:56:37 +0200

> From: Ido Schimmel <idosch@mellanox.com>
> 
> rocker supports the transmission of scattered packets, so let the kernel
> know about it by setting the NETIF_F_SG bit in the device's features.
> 
> Signed-off-by: Ido Schimmel <idosch@mellanox.com>
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>

Applied.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch net-next 2/2] rocker: linearize skb in case frags would not fit into tx descriptor
  2015-08-02 18:56 ` [patch net-next 2/2] rocker: linearize skb in case frags would not fit into tx descriptor Jiri Pirko
  2015-08-03 18:31   ` Scott Feldman
@ 2015-08-03 21:22   ` David Miller
  1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2015-08-03 21:22 UTC (permalink / raw)
  To: jiri; +Cc: netdev, sfeldma, idosch

From: Jiri Pirko <jiri@resnulli.us>
Date: Sun,  2 Aug 2015 20:56:38 +0200

> Suggested-by: Scott Feldman <sfeldma@gmail.com>
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>

Applied.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-08-03 21:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-02 18:56 [patch net-next 1/2] rocker: enable support for scattered packets Jiri Pirko
2015-08-02 18:56 ` [patch net-next 2/2] rocker: linearize skb in case frags would not fit into tx descriptor Jiri Pirko
2015-08-03 18:31   ` Scott Feldman
2015-08-03 21:22   ` David Miller
2015-08-03 18:30 ` [patch net-next 1/2] rocker: enable support for scattered packets Scott Feldman
2015-08-03 21:22 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.