* Re: [PATCH 02/12 -Rev2] Changes to netdevice.h
[not found] <OFFAB073E4.487DACF3-ON65257321.00101BE3-65257321.00104971@LocalDomain>
@ 2007-07-25 4:40 ` Krishna Kumar2
0 siblings, 0 replies; 2+ messages in thread
From: Krishna Kumar2 @ 2007-07-25 4:40 UTC (permalink / raw)
To: Krishna Kumar2
Cc: davem, gaagaan, general, hadi, herbert, jagana, jeff, johnpol,
Patrick McHardy, kumarkr, mcarlson, mchan, netdev,
peter.p.waskiewicz.jr, rdreier, rick.jones2, Robert.Olsson, sri,
tgraf, xma
Hi Patrick,
Krishna Kumar2/India/IBM wrote on 07/23/2007 08:27:53 AM:
> Hi Patrick,
>
> Patrick McHardy <kaber@trash.net> wrote on 07/22/2007 10:36:51 PM:
>
> > Krishna Kumar wrote:
> > > @@ -472,6 +474,9 @@ struct net_device
> > > void *priv; /* pointer to private data */
> > > int (*hard_start_xmit) (struct sk_buff *skb,
> > > struct net_device *dev);
> > > + int (*hard_start_xmit_batch) (struct net_device
> > > + *dev);
> > > +
> >
> >
> > Os this function really needed? Can't you just call hard_start_xmit
with
> > a NULL skb and have the driver use dev->blist?
> Probably not. I will see how to do it this way and get back to you.
I think this is a good idea and makes code everywhere simpler. I
will try this change and test to make sure it doesn't have any
negative impact. Will mostly send out rev3 tomorrow.
Thanks,
- KK
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 02/12 -Rev2] Changes to netdevice.h
2007-07-22 9:04 [PATCH 00/12 -Rev2] Implement batching skb API Krishna Kumar
@ 2007-07-22 9:05 ` Krishna Kumar
0 siblings, 0 replies; 2+ messages in thread
From: Krishna Kumar @ 2007-07-22 9:05 UTC (permalink / raw)
To: davem, rdreier
Cc: johnpol, Robert.Olsson, peter.p.waskiewicz.jr, herbert, gaagaan,
kumarkr, xma, rick.jones2, mcarlson, netdev, jagana, general,
mchan, tgraf, jeff, hadi, kaber, Krishna Kumar, sri
diff -ruNp org/include/linux/netdevice.h rev2/include/linux/netdevice.h
--- org/include/linux/netdevice.h 2007-07-20 07:49:28.000000000 +0530
+++ rev2/include/linux/netdevice.h 2007-07-22 13:20:16.000000000 +0530
@@ -340,6 +340,7 @@ struct net_device
#define NETIF_F_VLAN_CHALLENGED 1024 /* Device cannot handle VLAN packets */
#define NETIF_F_GSO 2048 /* Enable software GSO. */
#define NETIF_F_LLTX 4096 /* LockLess TX */
+#define NETIF_F_BATCH_ON 8192 /* Batching skbs xmit API is enabled */
#define NETIF_F_MULTI_QUEUE 16384 /* Has multiple TX/RX queues */
/* Segmentation offload features */
@@ -452,6 +453,7 @@ struct net_device
struct Qdisc *qdisc_sleeping;
struct list_head qdisc_list;
unsigned long tx_queue_len; /* Max frames per queue allowed */
+ struct sk_buff_head skb_blist; /* List of batch skbs */
/* Partially transmitted GSO packet. */
struct sk_buff *gso_skb;
@@ -472,6 +474,9 @@ struct net_device
void *priv; /* pointer to private data */
int (*hard_start_xmit) (struct sk_buff *skb,
struct net_device *dev);
+ int (*hard_start_xmit_batch) (struct net_device
+ *dev);
+
/* These may be needed for future network-power-down code. */
unsigned long trans_start; /* Time (in jiffies) of last Tx */
@@ -582,6 +587,8 @@ struct net_device
#define NETDEV_ALIGN 32
#define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1)
+#define BATCHING_ON(dev) ((dev->features & NETIF_F_BATCH_ON) != 0)
+
static inline void *netdev_priv(const struct net_device *dev)
{
return dev->priv;
@@ -832,6 +839,8 @@ extern int dev_set_mac_address(struct n
struct sockaddr *);
extern int dev_hard_start_xmit(struct sk_buff *skb,
struct net_device *dev);
+extern int dev_add_skb_to_blist(struct sk_buff *skb,
+ struct net_device *dev);
extern void dev_init(void);
@@ -1104,6 +1113,8 @@ extern void dev_set_promiscuity(struct
extern void dev_set_allmulti(struct net_device *dev, int inc);
extern void netdev_state_change(struct net_device *dev);
extern void netdev_features_change(struct net_device *dev);
+extern int dev_change_tx_batching(struct net_device *dev,
+ unsigned long new_batch_skb);
/* Load a device via the kmod */
extern void dev_load(const char *name);
extern void dev_mcast_init(void);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-07-25 4:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <OFFAB073E4.487DACF3-ON65257321.00101BE3-65257321.00104971@LocalDomain>
2007-07-25 4:40 ` [PATCH 02/12 -Rev2] Changes to netdevice.h Krishna Kumar2
2007-07-22 9:04 [PATCH 00/12 -Rev2] Implement batching skb API Krishna Kumar
2007-07-22 9:05 ` [PATCH 02/12 -Rev2] Changes to netdevice.h Krishna Kumar
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.