[ofa-general] Re: [PATCH 02/12 -Rev2] Changes to netdevice.h

Patrick McHardy kaber at trash.net
Sun Jul 22 10:06:51 PDT 2007


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?

>  	/* 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);


Again, function signatures should be introduced in the same patch
that contains the function. Splitting by file doesn't make sense.





More information about the general mailing list