On 3/9/21 3:12 PM, Vladimir Makarov via Gcc-patches wrote:
The patch was successfully bootstrapped and tested on x86-64, ppc64le, and 
arm64.  Unfortunately, I did not manage to reduce the test (whose size is 5MB).

I've just reduced test-case from it:

$ cat a.c
struct skb_shared_info {
  short gso_size;
};

enum { NETDEV_TX_OK };

struct iphdr {
  short tot_len;
  int daddr;
};

int tg3_tso_bug();
int netdev_priv();
int skb_cow_head();
int tcp_hdrlen__builtin_expect();
struct iphdr *ip_hdr();
int _tg3_flag();
int tg3_tso_bug_gso_check();

int
tg3_start_xmit() {
  int *tp = netdev_priv();
  int mss, tnapi;
  struct iphdr *iph;
  tnapi = mss = ((struct skb_shared_info *)0)->gso_size;
  if (mss) {
    int hdr_len;
    if (skb_cow_head())
      iph = ip_hdr();
    hdr_len = tcp_hdrlen__builtin_expect() && _tg3_flag();
    if (tg3_tso_bug_gso_check())
      return tg3_tso_bug(tp, tnapi);
    iph->tot_len = mss + hdr_len;
    if (_tg3_flag(tp) || tp)
      ;
    else
      asm("" : : "g"(iph->daddr));
  }
  return 0;
}

Please add it into test-suite.
Thanks,
Martin

Reply via email to